I have two custom pcbs containing the nrf52832 chip with the EXACT same hardware and software.
When I program and run the old pcb,
The old pcb runs OK. It returns from the call nrf_sdh_enable_request() without issues.
But when I program and run my new pcb,
The new pcb FAILS during runtime. The nrf52832 fails to return from the call the nrf_sdh_enable_request() shown below.
The RTT debugger only prints out the "PRE" text, and does not show the "POST" print out. It seems to be stalling in the call or doing some kind of low-level interrupt to perhaps a handler.
Source code:
debugPrint("cpu_ble_softdevice_init() PRE nrf_sdh_enable_request");
err_code = nrf_sdh_enable_request();
debugPrint("cpu_ble_softdevice_init() POST nrf_sdh_enable_request");
Why is this happening? I am using the same hardware and software and compiler. Yet different behavior for both pcbs.
Any help is appreciated.
Ken Huebner
Software Developer
SEGGER IDE COMPILER SHOWS EXACT SAME COMPILE SIZE AND ADDRESSING FOR BOTH OLD AND NEW PCB...
Here's my Segger compiler notes for compiling and running both pcbs:
OLD PCB - MTAG1_0A
Connecting ‘J-Link’ using ‘USB’
Connecting to target using SWD
Loaded C:/Program Files (x86)/SEGGER/SEGGER Embedded Studio for ARM 4.12/bin/JLinkARM.dll
Firmware Version: J-Link V10 compiled May 17 2019 09:51:10
DLL Version: 6.44i
Hardware Version: V10.10
Target Voltage: 3.380
Device "NRF52832_XXAA" selected.
Found SW-DP with ID 0x2BA01477
Found SW-DP with ID 0x2BA01477
Scanning AP map to find all available APs
AP[2]: Stopped AP scan as end of AP map has been reached
AP[0]: AHB-AP (IDR: 0x24770011)
AP[1]: JTAG-AP (IDR: 0x02880000)
Iterating through AP map to find AHB-AP to use
AP[0]: Core found
AP[0]: AHB-AP ROM base: 0xE00FF000
CPUID register: 0x410FC241. Implementer code: 0x41 (ARM)
Found Cortex-M4 r0p1, Little endian.
FPUnit: 6 code (BP) slots and 2 literal slots
CoreSight components:
ROMTbl[0] @ E00FF000
ROMTbl[0][0]: E000E000, CID: B105E00D, PID: 000BB00C SCS-M7
ROMTbl[0][1]: E0001000, CID: B105E00D, PID: 003BB002 DWT
ROMTbl[0][2]: E0002000, CID: B105E00D, PID: 002BB003 FPB
ROMTbl[0][3]: E0000000, CID: B105E00D, PID: 003BB001 ITM
ROMTbl[0][4]: E0040000, CID: B105900D, PID: 000BB9A1 TPIU
ROMTbl[0][5]: E0041000, CID: B105900D, PID: 000BB925 ETM
Preparing target for download
Executing script TargetInterface.resetAndStop()
Reset: Halt core after reset via DEMCR.VC_CORERESET.
Reset: Reset device via AIRCR.SYSRESETREQ.
Downloading ‘s132_nrf52_6.1.0_softdevice.hex’ to J-Link
Programming 2.3 KB of addresses 00000000 — 00000967
Programming 144.8 KB of addresses 00001000 — 0002536b
J-Link: Flash download: Bank 0 @ 0x00000000: Skipped. Contents already match
Download successful
Downloading ‘ble_app_beacon_pca10040_s132.elf’ to J-Link
Programming 38.7 KB of addresses 00026000 — 0002fae7
Programming 0.1 KB of addresses 0002fae8 — 0002fb9b
J-Link: Flash download: Bank 0 @ 0x00000000: Skipped. Contents already match
Download successful
NEW PCB - mtag1_2a
Connecting ‘J-Link’ using ‘USB’
Connecting to target using SWD
Loaded C:/Program Files (x86)/SEGGER/SEGGER Embedded Studio for ARM 4.12/bin/JLinkARM.dll
Firmware Version: J-Link V10 compiled May 17 2019 09:51:10
DLL Version: 6.44i
Hardware Version: V10.10
Target Voltage: 3.386
Device "NRF52832_XXAA" selected.
Found SW-DP with ID 0x2BA01477
Found SW-DP with ID 0x2BA01477
Scanning AP map to find all available APs
AP[2]: Stopped AP scan as end of AP map has been reached
AP[0]: AHB-AP (IDR: 0x24770011)
AP[1]: JTAG-AP (IDR: 0x02880000)
Iterating through AP map to find AHB-AP to use
AP[0]: Core found
AP[0]: AHB-AP ROM base: 0xE00FF000
CPUID register: 0x410FC241. Implementer code: 0x41 (ARM)
Found Cortex-M4 r0p1, Little endian.
FPUnit: 6 code (BP) slots and 2 literal slots
CoreSight components:
ROMTbl[0] @ E00FF000
ROMTbl[0][0]: E000E000, CID: B105E00D, PID: 000BB00C SCS-M7
ROMTbl[0][1]: E0001000, CID: B105E00D, PID: 003BB002 DWT
ROMTbl[0][2]: E0002000, CID: B105E00D, PID: 002BB003 FPB
ROMTbl[0][3]: E0000000, CID: B105E00D, PID: 003BB001 ITM
ROMTbl[0][4]: E0040000, CID: B105900D, PID: 000BB9A1 TPIU
ROMTbl[0][5]: E0041000, CID: B105900D, PID: 000BB925 ETM
Preparing target for download
Executing script TargetInterface.resetAndStop()
Reset: Halt core after reset via DEMCR.VC_CORERESET.
Reset: Reset device via AIRCR.SYSRESETREQ.
Downloading ‘s132_nrf52_6.1.0_softdevice.hex’ to J-Link
Programming 2.3 KB of addresses 00000000 — 00000967
Programming 144.8 KB of addresses 00001000 — 0002536b
J-Link: Flash download: Bank 0 @ 0x00000000: Skipped. Contents already match
Download successful
Downloading ‘ble_app_beacon_pca10040_s132.elf’ to J-Link
Programming 38.7 KB of addresses 00026000 — 0002fae7
Programming 0.1 KB of addresses 0002fae8 — 0002fb9b
J-Link: Flash download: Bank 0 @ 0x00000000: Skipped. Contents already match
Download successful