This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Flashing custom NRF52832 module (Taiyo Yuden EYSHCNZWZ) with nrf52 DK. Program will upload but won't execute

Hello,

I'm using nrf52 DK with SDK 14, to flash a Taiyo Yuden EYSHCNZWZ module (Module Datasheet). The flashing is successful, as stated by the output console in Segger, but the program never starts. (I.e: I can't see my device in the nRF Connect app, or when using examples with leds, board pins never change their state.

Additionally, if I run the debugger, it doesn't even stop on the first breakpoint I put just inside main().

After many reading, I found that in other posts advised to change clock settings to the following values in sdk_config.h

#define NRF_SDH_CLOCK_LF_SRC 0

#define NRF_SDH_CLOCK_LF_RC_CTIV 16

#define NRF_SDH_CLOCK_LF_RC_TEMP_CTIV 2

#define NRF_SDH_CLOCK_LF_ACCURACY 1

I've tried those with no luck.

The examples I'm trying are the ones coming with the SDK, which run fine with the nrf52 DK on board module. My connection scheme to the module is exactly the same as here.

What I'm missing here?

EDIT:

I attach a picture of the setup, just in case there is something wrong here:

This is my output after I upload ble_app_beacon_pca10040_s132:

Connecting ‘J-Link’ using ‘USB’
Connecting to target using SWD
Loaded /Applications/SEGGER Embedded Studio for ARM 3.52/bin/libjlinkarm.dylib
Firmware Version: J-Link OB-SAM3U128-V2-NordicSemi compiled Jul 12 2018 11:44:41
DLL Version: 6.34f
Hardware Version: V1.00
Target Voltage: 3.300
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_5.0.0_softdevice.hex’ to J-Link
Programming 2.3 KB of addresses 00000000 — 00000967
Programming 133.1 KB of addresses 00001000 — 000224a7
J-Link: Flash download: Bank 0 @ 0x00000000: Skipped. Contents already match
Connecting ‘J-Link’ using ‘USB’
Connecting to target using SWD
Loaded /Applications/SEGGER Embedded Studio for ARM 3.52/bin/libjlinkarm.dylib
Firmware Version: J-Link OB-SAM3U128-V2-NordicSemi compiled Jul 12 2018 11:44:41
DLL Version: 6.34f
Hardware Version: V1.00
Target Voltage: 3.300
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_5.0.0_softdevice.hex’ to J-Link
Programming 2.3 KB of addresses 00000000 — 00000967
Programming 133.1 KB of addresses 00001000 — 000224a7
J-Link: Flash download: Bank 0 @ 0x00000000: Skipped. Contents already match
Downloading ‘ble_app_beacon_pca10040_s132.elf’ to J-Link
Programming 32.9 KB of addresses 00023000 — 0002b39f
Programming 0.1 KB of addresses 0002b3a0 — 0002b40b
Programming 6.3 KB of .rodata addresses 0002b40c — 0002cd83
Programming 0.1 KB of addresses 0002cd84 — 0002cdfb
J-Link: Flash download: Bank 0 @ 0x00000000: 1 range affected (40960 bytes)
J-Link: Flash download: Total time needed: 0.900s (Prepare: 0.089s, Compare: 0.006s, Erase: 0.033s, Program: 0.711s, Verify: 0.000s, Restore: 0.058s)

And this is how my screen looks after clicking Debug > Go

As you can see, it doesn't seem to be debugging, even if the output says that everything is OK. Breakpoint is never reached. The "CortexM4 on J-Link" green indicator is blinking

Related