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

Failure to burn nRF52840 on the nRF52840 DK

I'm using the nRF52840 DK.

I managed to burn the on-board nRF52840 MCU several times, using the nRF connect windows app.

After several such successful burns, with various test images taken from the SDK, the DK is no longer able to burn the on-board MCU.

The "nRF Connect" fails to connect and read the MCU's flash content, and this is its log:

2019-04-15T07:38:03.032Z INFO Using nrfjprog to communicate with target
2019-04-15T07:41:29.895Z INFO Target device closed.

The log produced by this command: "nrfjprog -e -f nrf52 --log" is this:

2019-Apr-15 10:58:27  --------------------------------------------------------------------------------
2019-Apr-15 10:58:27  nrfjprog -e -f nrf52 --log
2019-Apr-15 10:58:27  nrfjprog version 9.8.1
2019-Apr-15 10:58:27  --------------------------------------------------------------------------------
2019-Apr-15 10:58:27  nRF_open_dll
2019-Apr-15 10:58:27  . nRF52_open_dll
2019-Apr-15 10:58:27  . . nRF52_dll_version
2019-Apr-15 10:58:27  nRF_enum_emu_snr
2019-Apr-15 10:58:27  . nRF52_enum_emu_snr
2019-Apr-15 10:58:27  . . nRF52_enum_emu_snr
2019-Apr-15 10:58:27  nRF_enum_emu_snr
2019-Apr-15 10:58:27  . nRF52_enum_emu_snr
2019-Apr-15 10:58:27  . . nRF52_enum_emu_snr
2019-Apr-15 10:58:27  nRF_connect_to_emu_with_snr
2019-Apr-15 10:58:27  . nRF52_connect_to_emu_with_snr
2019-Apr-15 10:58:27  . . nRF52_is_connected_to_emu
2019-Apr-15 10:58:27  . . nRF52_enum_emu_snr
2019-Apr-15 10:58:27  . . nRF52_connect_to_emu_with_snr
2019-Apr-15 10:58:27  . . . nRF52_connect_to_emu_without_snr
2019-Apr-15 10:58:27  . . . nRF52_connect_to_emu_without_snr:	JLink:	 Firmware: J-Link OB-SAM3U128-V2-NordicSemi compiled Jan  7 2019 14:07:15
2019-Apr-15 10:58:27  . . . nRF52_connect_to_emu_without_snr:	JLink:	 Hardware: V1.00
2019-Apr-15 10:58:27  . . . nRF52_connect_to_emu_without_snr:	JLink:	 S/N: 683138976
2019-Apr-15 10:58:27  . . . nRF52_connect_to_emu_without_snr:	JLink:	 TELNET listener socket opened on port 19021
2019-Apr-15 10:58:27  . . . nRF52_connect_to_emu_without_snr:	JLink:	WEBSRV  Starting webserver
2019-Apr-15 10:58:27  . . . nRF52_connect_to_emu_without_snr:	JLink:	 (0019ms, 0024ms total)  
2019-Apr-15 10:58:27  . . . nRF52_connect_to_emu_without_snr:	JLink:	T13BE4 000:016 
2019-Apr-15 10:58:27  . . . nRF52_connect_to_emu_without_snr:	JLink:	WEBSRV Webserver running on local port 19080
2019-Apr-15 10:58:27  . . . nRF52_connect_to_emu_without_snr:	JLink:	 (0022ms, 0027ms total)  
2019-Apr-15 10:58:27  . . . nRF52_connect_to_emu_without_snr:	JLink:	T13BE4 000:016 
2019-Apr-15 10:58:27  . . . nRF52_connect_to_emu_without_snr:	JLink:	  returns O.K.
2019-Apr-15 10:58:27  . . . nRF52_connect_to_emu_without_snr:	JLink:	 (0025ms, 0030ms total)  
2019-Apr-15 10:58:27  . . . nRF52_connect_to_emu_without_snr:	JLink:	T13BE4 000:042 
2019-Apr-15 10:58:27  . . . nRF52_connect_to_emu_without_snr:	JLink:	JLINK_GetHWStatus(...)
2019-Apr-15 10:58:27  . . . nRF52_connect_to_emu_without_snr:	JLink:	  returns 0x00
2019-Apr-15 10:58:27  . . . nRF52_connect_to_emu_without_snr:	JLink:	 (0005ms, 0036ms total)  
2019-Apr-15 10:58:27  . . . nRF52_connect_to_emu_without_snr:	There is no generic nRF52 device in J-Link, so we select NRF52832_xxAA.

2019-Apr-15 10:58:27  . . . nRF52_connect_to_emu_without_snr:	JLink:	T13BE4 000:049 
2019-Apr-15 10:58:27  . . . nRF52_connect_to_emu_without_snr:	JLink:	JLINK_ExecCommand("Device = NRF52832_xxAA", ...). 
2019-Apr-15 10:58:27  . . . nRF52_connect_to_emu_without_snr:	JLink:	XML file found at: C:\Program Files (x86)\SEGGER\JLink_V644d\JLinkDevices.xml
2019-Apr-15 10:58:27  . . . nRF52_connect_to_emu_without_snr:	JLink:	 (0009ms, 0049ms total)  
2019-Apr-15 10:58:27  . . . nRF52_connect_to_emu_without_snr:	JLink:	T13BE4 000:052 
2019-Apr-15 10:58:27  . . . nRF52_connect_to_emu_without_snr:	JLink:	C:\Program Files (x86)\SEGGER\JLink_V644d\JLinkDevices.xml evaluated successfully.
2019-Apr-15 10:58:27  . . . nRF52_connect_to_emu_without_snr:	JLink:	Device "NRF52832_XXAA" selected.
2019-Apr-15 10:58:27  . . . nRF52_connect_to_emu_without_snr:	JLink:	Device "NRF52832_XXAA" selected.
2019-Apr-15 10:58:27  . . . nRF52_connect_to_emu_without_snr:	JLink:	  returns 0x00
2019-Apr-15 10:58:27  . . . nRF52_connect_to_emu_without_snr:	JLink:	 (0106ms, 0146ms total)  
2019-Apr-15 10:58:27  . . . nRF52_connect_to_emu_without_snr:	JLink:	T13BE4 000:158 
2019-Apr-15 10:58:27  . . . nRF52_connect_to_emu_without_snr:	JLink:	JLINK_ExecCommand("SetRestartOnClose = 0", ...). 
2019-Apr-15 10:58:27  . . . nRF52_connect_to_emu_without_snr:	JLink:	  returns 0x01
2019-Apr-15 10:58:27  . . . nRF52_connect_to_emu_without_snr:	JLink:	 (0000ms, 0148ms total)  
2019-Apr-15 10:58:27  . . . nRF52_connect_to_emu_without_snr:	JLink:	T13BE4 000:161 
2019-Apr-15 10:58:27  . . . nRF52_connect_to_emu_without_snr:	JLink:	JLINK_ExecCommand("DisableFlashDL", ...). 
2019-Apr-15 10:58:27  . . . nRF52_connect_to_emu_without_snr:	JLink:	  returns 0x00
2019-Apr-15 10:58:27  . . . nRF52_connect_to_emu_without_snr:	JLink:	 (0001ms, 0151ms total)  
2019-Apr-15 10:58:27  . . . nRF52_connect_to_emu_without_snr:	JLink:	T13BE4 000:164 
2019-Apr-15 10:58:27  . . . nRF52_connect_to_emu_without_snr:	JLink:	JLINK_ExecCommand("SetDbgPowerDownOnClose = 1", ...). 
2019-Apr-15 10:58:27  . . . nRF52_connect_to_emu_without_snr:	JLink:	  returns 0x01
2019-Apr-15 10:58:27  . . . nRF52_connect_to_emu_without_snr:	JLink:	 (0001ms, 0154ms total)  
2019-Apr-15 10:58:27  . . . nRF52_connect_to_emu_without_snr:	JLink:	T13BE4 000:167 
2019-Apr-15 10:58:27  . . . nRF52_connect_to_emu_without_snr:	JLink:	JLINK_ExecCommand("ExcludeFlashCacheRange 0x0-0xFFFFFFFF", ...). 
2019-Apr-15 10:58:27  . . . nRF52_connect_to_emu_without_snr:	JLink:	  returns 0x00
2019-Apr-15 10:58:27  . . . nRF52_connect_to_emu_without_snr:	JLink:	 (0001ms, 0158ms total)  
2019-Apr-15 10:58:27  . . . nRF52_connect_to_emu_without_snr:	JLink:	T13BE4 000:171 
2019-Apr-15 10:58:27  . . . nRF52_connect_to_emu_without_snr:	JLink:	JLINK_TIF_Select(JLINKARM_TIF_SWD)
2019-Apr-15 10:58:27  . . . nRF52_connect_to_emu_without_snr:	JLink:	  returns 0x00
2019-Apr-15 10:58:27  . . . nRF52_connect_to_emu_without_snr:	JLink:	 (0003ms, 0162ms total)  
2019-Apr-15 10:58:27  . . . nRF52_connect_to_emu_without_snr:	JLink:	T13BE4 000:175 
2019-Apr-15 10:58:27  . . . nRF52_connect_to_emu_without_snr:	JLink:	JLINK_SetSpeed(2000)
2019-Apr-15 10:58:27  . . . nRF52_connect_to_emu_without_snr:	JLink:	 (0001ms, 0164ms total)  
2019-Apr-15 10:58:27  nRF_read_device_version
2019-Apr-15 10:58:27  . nRF52_read_device_version
2019-Apr-15 10:58:27  . . nRF52_is_connected_to_emu
2019-Apr-15 10:58:27  . . nRF52_is_connected_to_emu:	JLink:	T13BE4 000:180 
2019-Apr-15 10:58:27  . . nRF52_is_connected_to_emu:	JLink:	JLINK_IsOpen()
2019-Apr-15 10:58:27  . . nRF52_is_connected_to_emu:	JLink:	  returns 0x01
2019-Apr-15 10:58:27  . . nRF52_is_connected_to_emu:	JLink:	 (0003ms, 0168ms total)  
2019-Apr-15 10:58:27  . . nRF52_is_connected_to_device
2019-Apr-15 10:58:27  . . nRF52_is_connected_to_device:	JLink:	T13BE4 000:185 
2019-Apr-15 10:58:27  . . nRF52_is_connected_to_device:	JLink:	JLINK_IsConnected()
2019-Apr-15 10:58:27  . . nRF52_is_connected_to_device:	JLink:	  returns FALSE
2019-Apr-15 10:58:27  . . nRF52_is_connected_to_device:	JLink:	 (0004ms, 0172ms total)  
2019-Apr-15 10:58:27  . . nRF52_readback_status
2019-Apr-15 10:58:27  . . . nRF52_is_ctrl_ap_available
2019-Apr-15 10:58:27  . . . . nRF52_read_access_port_register
2019-Apr-15 10:58:27  . . . . . nRF52_coresight_configure
2019-Apr-15 10:58:27  . . . . . nRF52_coresight_configure:	JLink:	T13BE4 000:193 
2019-Apr-15 10:58:27  . . . . . nRF52_coresight_configure:	JLink:	JLINK_CORESIGHT_Configure()
2019-Apr-15 10:58:27  . . . . . nRF52_coresight_configure:	JLink:	  returns 0
2019-Apr-15 10:58:27  . . . . . nRF52_coresight_configure:	JLink:	 (0103ms, 0276ms total)  
2019-Apr-15 10:58:27  . . . . . nRF52_power_debug_and_system_regions
2019-Apr-15 10:58:27  . . . . . . nRF52_write_debug_port_register
2019-Apr-15 10:58:27  . . . . . . nRF52_write_debug_port_register:	JLink:	T13BE4 000:299 
2019-Apr-15 10:58:27  . . . . . . nRF52_write_debug_port_register:	JLink:	JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)
2019-Apr-15 10:58:27  . . . . . . nRF52_write_debug_port_register:	JLink:	  returns -1
2019-Apr-15 10:58:27  . . . . . . nRF52_write_debug_port_register:	JLink:	 (0004ms, 0280ms total)  
2019-Apr-15 10:58:27  . . . . . . nRF52_write_debug_port_register:	JLinkARM.dll CORESIGHT_WriteAPDPReg returned error -1.

2019-Apr-15 10:58:27  . . . . . nRF52_power_debug_and_system_regions:	JLinkARM.dll CORESIGHT_WriteAPDPReg returned error -102.

2019-Apr-15 10:58:27  nRF_close_dll
2019-Apr-15 10:58:27  . nRF52_close_dll
2019-Apr-15 10:58:27  . . nRF52_is_connected_to_emu
2019-Apr-15 10:58:27  . . nRF52_is_connected_to_emu:	JLink:	T13BE4 000:309 
2019-Apr-15 10:58:27  . . nRF52_is_connected_to_emu:	JLink:	JLINK_IsOpen()
2019-Apr-15 10:58:27  . . nRF52_is_connected_to_emu:	JLink:	  returns 0x01
2019-Apr-15 10:58:27  . . nRF52_is_connected_to_emu:	JLink:	 (0003ms, 0284ms total)  
2019-Apr-15 10:58:27  . . nRF52_disconnect_from_emu
2019-Apr-15 10:58:27  . . . nRF52_is_connected_to_device
2019-Apr-15 10:58:27  . . . nRF52_is_connected_to_device:	JLink:	T13BE4 000:315 
2019-Apr-15 10:58:27  . . . nRF52_is_connected_to_device:	JLink:	JLINK_IsConnected()
2019-Apr-15 10:58:27  . . . nRF52_is_connected_to_device:	JLink:	  returns FALSE
2019-Apr-15 10:58:27  . . . nRF52_is_connected_to_device:	JLink:	 (0002ms, 0287ms total)  
2019-Apr-15 10:58:27  . . . nRF52_unpower_debug_and_system_regions
2019-Apr-15 10:58:27  . . nRF52_disconnect_from_emu:	JLink:	T13BE4 000:331 
2019-Apr-15 10:58:27  . . nRF52_disconnect_from_emu:	JLink:	JLINK_Close()

Here is the output of a failed connect attempt via the J-Link commander:

Type "connect" to establish a target connection, '?' for help
J-Link>connect
Please specify device / core. <Default>: NRF52840_XXAA
Type '?' for selection dialog
Device>
Please specify target interface:
  J) JTAG (Default)
  S) SWD
  T) cJTAG
TIF>s
Specify target interface speed [kHz]. <Default>: 4000 kHz
Speed>
Device "NRF52840_XXAA" selected.


Connecting to target via SWD
Cannot connect to target.

Related