Hello World,
I checked the Developers Zone, but I have not found the direct example of my problem.
I use the RuuviTag board with NRF52832_XXAA.
I use it as a development board, connected over SWD to JLink, v6.2x
I am at the novice level.
I have the boards with the chip "empty".
- I try to do the step by step the procedure described in the github.com/.../README.md
After compiling all software (no changes):
-> In the beginning, the chip is empty, all seems to be fine:
marcin@ub40:/opt/SEGGER/JLink$ JLinkExe -device nrf52 -if swd -speed 1000
SEGGER J-Link Commander V6.22f (Compiled Jan 12 2018 16:19:03)
DLL version V6.22f, compiled Jan 12 2018 16:18:57
Connecting to J-Link via USB...O.K.
Firmware: J-Link V10 compiled Jan 11 2018 10:41:05
Hardware version: V10.10
S/N: xxx
License(s): FlashBP, GDB
OEM: SEGGER-EDU
VTref = 2.341V
Type "connect" to establish a target connection, '?' for help
J-Link>connect
Device "NRF52" selected.
Connecting to target via SWD
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
Cortex-M4 identified.
-> Now I proceed to program the SoftDevice 132, the soft device comes directly from nRF52 SDK 12:
J-Link>loadfile /home/marcin/ruuvitag_fw/s132_nrf52_3.0.0_softdevice.hex
Downloading file [/home/marcin/ruuvitag_fw/s132_nrf52_3.0.0_softdevice.hex]...
Comparing flash [100%] Done.
Erasing flash [100%] Done.
Programming flash [100%] Done.
Verifying flash [100%] Done.
J-Link: Flash download: Bank 0 @ 0x00000000: 1 range affected (126976 bytes)
J-Link: Flash download: Total time needed: 2.225s (Prepare: 0.056s, Compare: 0.019s, Erase: 0.000s, Program: 2.134s, Verify: 0.003s, Restore: 0.011s)
O.K.
-> Now, without touching the reset, I proceed to download the bootloader app (compiled from ruuvi_hw) J-Link>loadfile /home/marcin/ruuvitag_fw/bootloader/ruuvitag_b_production/armgcc/_build/ruuvitag_b_bootloader.hex
Downloading file [/home/marcin/ruuvitag_fw/bootloader/ruuvitag_b_production/armgcc/_build/ruuvitag_b_bootloader.hex]...
Comparing flash [100%] Done.
Erasing flash [100%] Done.
Programming flash [100%] Done.
Verifying flash [100%] Done.
J-Link: Flash download: Bank 0 @ 0x00000000: 2 ranges affected (28672 bytes)
J-Link: Flash download: Total time needed: 0.493s (Prepare: 0.061s, Compare: 0.016s, Erase: 0.000s, Program: 0.398s, Verify: 0.004s, Restore: 0.012s)
O.K.
J-Link>qc
I have not touched reset yet, nor I have executed the softreset via Jlink, however, from this moment, the chip is "dead": marcin@ub40:/opt/SEGGER/JLink$ JLinkExe SEGGER J-Link Commander V6.22f (Compiled Jan 12 2018 16:19:03) DLL version V6.22f, compiled Jan 12 2018 16:18:57 Connecting to J-Link via USB...O.K. Firmware: J-Link V10 compiled Jan 11 2018 10:41:05 Hardware version: V10.10 S/N: 260106722 License(s): FlashBP, GDB OEM: SEGGER-EDU VTref = 2.854V Type "connect" to establish a target connection, '?' for help J-Link>connect Please specify device / core. : NRF52832_XXAA Type '?' for selection dialog Device> Please specify target interface: J) JTAG (Default) S) SWD TIF>S Specify target interface speed [kHz]. : 4000 kHz Speed>1000 Device "NRF52832_XXAA" selected. Connecting to target via SWD Found SW-DP with ID 0x2BA01477 Found SW-DP with ID 0x2BA01477 Could not power-up debug power domain. Scanning AP map to find all available APs AP[0]: Stopped AP scan as end of AP map has been reached Iterating through AP map to find AHB-AP to use Found SW-DP with ID 0x2BA01477 Found SW-DP with ID 0x2BA01477 Could not power-up debug power domain. Scanning AP map to find all available APs AP[0]: Stopped AP scan as end of AP map has been reached Iterating through AP map to find AHB-AP to use ****** Error: Could not find core in Coresight setup Found SW-DP with ID 0x2BA01477 Found SW-DP with ID 0x2BA01477 Could not power-up debug power domain. Scanning AP map to find all available APs AP[0]: Stopped AP scan as end of AP map has been reached Iterating through AP map to find AHB-AP to use Found SW-DP with ID 0x2BA01477 Found SW-DP with ID 0x2BA01477 Could not power-up debug power domain. Scanning AP map to find all available APs AP[0]: Stopped AP scan as end of AP map has been reached Iterating through AP map to find AHB-AP to use Cannot connect to target. J-Link> Unknown command. '?' for help. J-Link>connect Device "NRF52832_XXAA" selected. Connecting to target via SWD Found SW-DP with ID 0x2BA01477 Found SW-DP with ID 0x2BA01477 Could not power-up debug power domain. Scanning AP map to find all available APs AP[0]: Stopped AP scan as end of AP map has been reached Iterating through AP map to find AHB-AP to use Found SW-DP with ID 0x2BA01477 Found SW-DP with ID 0x2BA01477 Could not power-up debug power domain. Scanning AP map to find all available APs AP[0]: Stopped AP scan as end of AP map has been reached Iterating through AP map to find AHB-AP to use ****** Error: Could not find core in Coresight setup Found SW-DP with ID 0x2BA01477 Found SW-DP with ID 0x2BA01477 Could not power-up debug power domain. Scanning AP map to find all available APs AP[0]: Stopped AP scan as end of AP map has been reached Iterating through AP map to find AHB-AP to use Found SW-DP with ID 0x2BA01477 Found SW-DP with ID 0x2BA01477 Could not power-up debug power domain. Scanning AP map to find all available APs AP[0]: Stopped AP scan as end of AP map has been reached Iterating through AP map to find AHB-AP to use Cannot connect to target. J-Link>connect Device "NRF52832_XXAA" selected. Connecting to target via SWD Found SW-DP with ID 0x2BA01477 Found SW-DP with ID 0x2BA01477 Could not power-up debug power domain. Scanning AP map to find all available APs AP[0]: Stopped AP scan as end of AP map has been reached Iterating through AP map to find AHB-AP to use Found SW-DP with ID 0x2BA01477 Found SW-DP with ID 0x2BA01477 Could not power-up debug power domain. Scanning AP map to find all available APs AP[0]: Stopped AP scan as end of AP map has been reached Iterating through AP map to find AHB-AP to use ****** Error: Could not find core in Coresight setup Found SW-DP with ID 0x2BA01477 Found SW-DP with ID 0x2BA01477 Could not power-up debug power domain. Scanning AP map to find all available APs AP[0]: Stopped AP scan as end of AP map has been reached Iterating through AP map to find AHB-AP to use Found SW-DP with ID 0x2BA01477 Found SW-DP with ID 0x2BA01477 Could not power-up debug power domain. Scanning AP map to find all available APs AP[0]: Stopped AP scan as end of AP map has been reached Iterating through AP map to find AHB-AP to use Cannot connect to target. J-Link>connect Device "NRF52832_XXAA" selected. Connecting to target via SWD Found SW-DP with ID 0x2BA01477 Found SW-DP with ID 0x2BA01477 Could not power-up debug power domain. Scanning AP map to find all available APs AP[0]: Stopped AP scan as end of AP map has been reached Iterating through AP map to find AHB-AP to use Found SW-DP with ID 0x2BA01477 Found SW-DP with ID 0x2BA01477 Could not power-up debug power domain. Scanning AP map to find all available APs AP[0]: Stopped AP scan as end of AP map has been reached Iterating through AP map to find AHB-AP to use ****** Error: Could not find core in Coresight setup Found SW-DP with ID 0x2BA01477 Found SW-DP with ID 0x2BA01477 Could not power-up debug power domain. Scanning AP map to find all available APs AP[0]: Stopped AP scan as end of AP map has been reached Iterating through AP map to find AHB-AP to use Found SW-DP with ID 0x2BA01477 Found SW-DP with ID 0x2BA01477 Could not power-up debug power domain. Scanning AP map to find all available APs AP[0]: Stopped AP scan as end of AP map has been reached Iterating through AP map to find AHB-AP to use Cannot connect to target. J-Link>connect Device "NRF52832_XXAA" selected. Connecting to target via SWD Found SW-DP with ID 0x2BA01477 Found SW-DP with ID 0x2BA01477 Could not power-up debug power domain. Scanning AP map to find all available APs AP[0]: Stopped AP scan as end of AP map has been reached Iterating through AP map to find AHB-AP to use Found SW-DP with ID 0x2BA01477 Found SW-DP with ID 0x2BA01477 Could not power-up debug power domain. Scanning AP map to find all available APs AP[0]: Stopped AP scan as end of AP map has been reached Iterating through AP map to find AHB-AP to use ****** Error: Could not find core in Coresight setup Found SW-DP with ID 0x2BA01477 Found SW-DP with ID 0x2BA01477 Could not power-up debug power domain. Scanning AP map to find all available APs AP[0]: Stopped AP scan as end of AP map has been reached Iterating through AP map to find AHB-AP to use Found SW-DP with ID 0x2BA01477 Found SW-DP with ID 0x2BA01477 Could not power-up debug power domain. Scanning AP map to find all available APs AP[0]: Stopped AP scan as end of AP map has been reached Iterating through AP map to find AHB-AP to use Cannot connect to target. -> What do I do wrong?
-> Using nrfjprog --recover does not help either (in blinks jlink for 2 seconds in red, when device family is defined to NRF52. When defined to UNKNOWN, it blinks Jlink for 20 seconds but fails the same):
marcin@ub40:~/nrfjprog/nrfjprog$ ./nrfjprog --recover
Recovering device. This operation might take 30s.
ERROR: Recover failed. Please make sure that the correct device family is given
ERROR: and try again.
I have just "bricked" 3 boards...what I do wrong, how to recover??? Please help... With the other example, github.com/.../nrf52-minimal-c
it works fine, I program the boards and it blinks the led, so the board is ok from the HW point of view...
Marcin