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

Unable to connect to NRF52

Hello, I have a very strange problem with my nrf52-based custom board. After a bunch of successful programming cycles I am unable to program the board again. The firmware inside works as expected and I am getting the usart serial output from it. However, no matter what utility I use (openocd, nrfprog, JLink), I am unable to connect to the target and debug it. The configuration is still the same as on previous successful attempts, and the results reproducible for 2 dead boards with the same symptoms (I am unable to connect to them again) and for another 2 which continue to work normally (able to connect and program).

The logs from debuggers are here.

OpenOCD:

Open On-Chip Debugger 0.10.0-dev-00255-g57a19d4 (2016-07-21-15:09)
Licensed under GNU GPL v2
For bug reports, read
	openocd.org/.../bugs.html
adapter speed: 10000 kHz
cortex_m reset_config sysresetreq
Info : No device selected, using first device.
Info : J-Link OB-SAM3U128-V2-NordicSemi compiled Jul  5 2016 08:42:09
Info : Hardware version: 1.00
Info : VTarget = 3.300 V
Info : Reduced speed from 10000 kHz to 1000 kHz (maximum).
Info : Reduced speed from 10000 kHz to 1000 kHz (maximum).
Info : clock speed 10000 kHz
in procedure 'program' 
in procedure 'init' called at file "embedded:startup.tcl", line 473
in procedure 'ocd_bouncer'
** OpenOCD init failed **
shutdown command invoked

nrfjprog:

--------------------------------------------------------------------------------
./nrfjprog -f NRF52 --recover --log
nrfjprog verion 9.0.0
--------------------------------------------------------------------------------
FUNCTION: open_dll.
FUNCTION: open_dll.
FUNCTION: enum_emu_snr.
FUNCTION: enum_emu_snr.
FUNCTION: enum_emu_snr.
FUNCTION: enum_emu_snr.
FUNCTION: connect_to_emu_with_snr.
FUNCTION: connect_to_emu_with_snr.
FUNCTION: connect_to_emu_without_snr.
FUNCTION: enum_emu_snr.
Device "NRF52832_XXAA" selected.
FUNCTION: recover.
FUNCTION: recover.
JLinkARM.dll CORESIGHT_WriteAPDPReg returned error -1.
JLinkARM.dll CORESIGHT_WriteAPDPReg returned error -102.
FUNCTION: close_dll.
FUNCTION: close_dll.

JLink:

./JLinkExe -if swd -device nrf52
SEGGER J-Link Commander V6.00a (Compiled Jul 25 2016 19:04:29)
DLL version V6.00a, compiled Jul 25 2016 19:04:24

Connecting to J-Link via USB...O.K.
Firmware: J-Link OB-SAM3U128-V2-NordicSemi compiled Jul  5 2016 08:42:09
Hardware version: V1.00
S/N: 682088593
VTref = 3.300V


Type "connect" to establish a target connection, '?' for help
J-Link>connect
Specify target interface speed [kHz]. <Default>: 4000 kHz
Speed>
Device "NRF52" selected.



****** Error: Communication timed out: Requested 20 bytes, received 0 bytes !
Could not read hardware status!
Cannot connect to target.
Related