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

Error when using nrfjprog recover command

Hello Nordic DevZone,

While trying to recover nrf52832 chip using command nrfjprog -f nrf52 --recover, I received the following error:

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've generated the log using --log argument. Using this log info, can you please shed some light on what may have caused this error?

2019-Jul-11 14:01:05  --------------------------------------------------------------------------------
2019-Jul-11 14:01:05  nrfjprog -f nrf52 --recover --log
2019-Jul-11 14:01:05  nrfjprog version 9.8.1
2019-Jul-11 14:01:05  --------------------------------------------------------------------------------
2019-Jul-11 14:01:05  nRF_open_dll
2019-Jul-11 14:01:05  . nRF52_open_dll
2019-Jul-11 14:01:05  . . nRF52_dll_version
2019-Jul-11 14:01:05  nRF_enum_emu_snr
2019-Jul-11 14:01:05  . nRF52_enum_emu_snr
2019-Jul-11 14:01:05  . . nRF52_enum_emu_snr
2019-Jul-11 14:01:05  nRF_enum_emu_snr
2019-Jul-11 14:01:05  . nRF52_enum_emu_snr
2019-Jul-11 14:01:05  . . nRF52_enum_emu_snr
2019-Jul-11 14:01:05  nRF_connect_to_emu_without_snr
2019-Jul-11 14:01:05  . nRF52_connect_to_emu_without_snr
2019-Jul-11 14:01:05  . . nRF52_is_connected_to_emu
2019-Jul-11 14:01:05  . . nRF52_enum_emu_snr
2019-Jul-11 14:01:05  . . nRF52_connect_to_emu_without_snr
2019-Jul-11 14:01:06  . . nRF52_connect_to_emu_without_snr:	JLink:	 Firmware: J-Link OB-SAM3U128-V2-NordicSemi compiled Jan  7 2019 14:07:15
2019-Jul-11 14:01:06  . . nRF52_connect_to_emu_without_snr:	JLink:	 Hardware: V1.00
2019-Jul-11 14:01:06  . . nRF52_connect_to_emu_without_snr:	JLink:	 S/N: 682225977
2019-Jul-11 14:01:06  . . nRF52_connect_to_emu_without_snr:	JLink:	 TELNET listener socket opened on port 19021
2019-Jul-11 14:01:06  . . nRF52_connect_to_emu_without_snr:	JLink:	WEBSRV  Starting webserver
2019-Jul-11 14:01:06  . . nRF52_connect_to_emu_without_snr:	JLink:	 (1435ms, 1441ms total)  
2019-Jul-11 14:01:06  . . nRF52_connect_to_emu_without_snr:	JLink:	WEBSRV Webserver running on local port 19080
2019-Jul-11 14:01:06  . . nRF52_connect_to_emu_without_snr:	JLink:	 (1444ms, 1450ms total)  
2019-Jul-11 14:01:06  . . nRF52_connect_to_emu_without_snr:	JLink:	  returns O.K.
2019-Jul-11 14:01:06  . . nRF52_connect_to_emu_without_snr:	JLink:	 (1458ms, 1464ms total)  
2019-Jul-11 14:01:06  . . nRF52_connect_to_emu_without_snr:	JLink:	JLINK_GetHWStatus(...)
2019-Jul-11 14:01:06  . . nRF52_connect_to_emu_without_snr:	JLink:	  returns 0x00
2019-Jul-11 14:01:06  . . nRF52_connect_to_emu_without_snr:	JLink:	 (0003ms, 1468ms total)  
2019-Jul-11 14:01:06  . . nRF52_connect_to_emu_without_snr:	There is no generic nRF52 device in J-Link, so we select NRF52832_xxAA.

2019-Jul-11 14:01:06  . . nRF52_connect_to_emu_without_snr:	JLink:	JLINK_ExecCommand("Device = NRF52832_xxAA", ...). 
2019-Jul-11 14:01:06  . . nRF52_connect_to_emu_without_snr:	JLink:	XML file found at: C:\Program Files (x86)\SEGGER\JLink_V644e\JLinkDevices.xml
2019-Jul-11 14:01:06  . . nRF52_connect_to_emu_without_snr:	JLink:	 (0002ms, 1476ms total)  
2019-Jul-11 14:01:06  . . nRF52_connect_to_emu_without_snr:	JLink:	C:\Program Files (x86)\SEGGER\JLink_V644e\JLinkDevices.xml evaluated successfully.
2019-Jul-11 14:01:07  . . nRF52_connect_to_emu_without_snr:	JLink:	Device "NRF52832_XXAA" selected.
2019-Jul-11 14:01:07  . . nRF52_connect_to_emu_without_snr:	JLink:	Device "NRF52832_XXAA" selected.
2019-Jul-11 14:01:07  . . nRF52_connect_to_emu_without_snr:	JLink:	  returns 0x00
2019-Jul-11 14:01:07  . . nRF52_connect_to_emu_without_snr:	JLink:	 (0114ms, 1588ms total)  
2019-Jul-11 14:01:07  . . nRF52_connect_to_emu_without_snr:	JLink:	JLINK_ExecCommand("SetRestartOnClose = 0", ...). 
2019-Jul-11 14:01:07  . . nRF52_connect_to_emu_without_snr:	JLink:	  returns 0x01
2019-Jul-11 14:01:07  . . nRF52_connect_to_emu_without_snr:	JLink:	 (0001ms, 1591ms total)  
2019-Jul-11 14:01:07  . . nRF52_connect_to_emu_without_snr:	JLink:	JLINK_ExecCommand("DisableFlashDL", ...). 
2019-Jul-11 14:01:07  . . nRF52_connect_to_emu_without_snr:	JLink:	  returns 0x00
2019-Jul-11 14:01:07  . . nRF52_connect_to_emu_without_snr:	JLink:	 (0001ms, 1594ms total)  
2019-Jul-11 14:01:07  . . nRF52_connect_to_emu_without_snr:	JLink:	JLINK_ExecCommand("SetDbgPowerDownOnClose = 1", ...). 
2019-Jul-11 14:01:07  . . nRF52_connect_to_emu_without_snr:	JLink:	  returns 0x01
2019-Jul-11 14:01:07  . . nRF52_connect_to_emu_without_snr:	JLink:	 (0001ms, 1597ms total)  
2019-Jul-11 14:01:07  . . nRF52_connect_to_emu_without_snr:	JLink:	JLINK_ExecCommand("ExcludeFlashCacheRange 0x0-0xFFFFFFFF", ...). 
2019-Jul-11 14:01:07  . . nRF52_connect_to_emu_without_snr:	JLink:	  returns 0x00
2019-Jul-11 14:01:07  . . nRF52_connect_to_emu_without_snr:	JLink:	 (0002ms, 1603ms total)  
2019-Jul-11 14:01:07  . . nRF52_connect_to_emu_without_snr:	JLink:	JLINK_TIF_Select(JLINKARM_TIF_SWD)
2019-Jul-11 14:01:07  . . nRF52_connect_to_emu_without_snr:	JLink:	  returns 0x00
2019-Jul-11 14:01:07  . . nRF52_connect_to_emu_without_snr:	JLink:	 (0003ms, 1607ms total)  
2019-Jul-11 14:01:07  . . nRF52_connect_to_emu_without_snr:	JLink:	JLINK_SetSpeed(2000)
2019-Jul-11 14:01:07  . . nRF52_connect_to_emu_without_snr:	JLink:	 (0002ms, 1610ms total)  
2019-Jul-11 14:01:07  nRF_recover
2019-Jul-11 14:01:07  . nRF52_recover
2019-Jul-11 14:01:07  . . nRF52_is_connected_to_emu
2019-Jul-11 14:01:07  . . nRF52_is_connected_to_emu:	JLink:	JLINK_IsOpen()
2019-Jul-11 14:01:07  . . nRF52_is_connected_to_emu:	JLink:	  returns 0x01
2019-Jul-11 14:01:07  . . nRF52_is_connected_to_emu:	JLink:	 (0003ms, 1614ms total)  
2019-Jul-11 14:01:07  . . nRF52_is_connected_to_device
2019-Jul-11 14:01:07  . . nRF52_is_connected_to_device:	JLink:	JLINK_IsConnected()
2019-Jul-11 14:01:07  . . nRF52_is_connected_to_device:	JLink:	  returns FALSE
2019-Jul-11 14:01:07  . . nRF52_is_connected_to_device:	JLink:	 (0003ms, 1618ms total)  
2019-Jul-11 14:01:07  . . nRF52_readback_status
2019-Jul-11 14:01:07  . . . nRF52_is_ctrl_ap_available
2019-Jul-11 14:01:07  . . . . nRF52_read_access_port_register
2019-Jul-11 14:01:07  . . . . . nRF52_coresight_configure
2019-Jul-11 14:01:07  . . . . . nRF52_coresight_configure:	JLink:	JLINK_CORESIGHT_Configure()
2019-Jul-11 14:01:07  . . . . . nRF52_coresight_configure:	JLink:	  returns 0
2019-Jul-11 14:01:07  . . . . . nRF52_coresight_configure:	JLink:	 (0103ms, 1722ms total)  
2019-Jul-11 14:01:07  . . . . . nRF52_power_debug_and_system_regions
2019-Jul-11 14:01:07  . . . . . . nRF52_write_debug_port_register
2019-Jul-11 14:01:07  . . . . . . nRF52_write_debug_port_register:	JLink:	JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)
2019-Jul-11 14:01:07  . . . . . . nRF52_write_debug_port_register:	JLink:	  returns -1
2019-Jul-11 14:01:07  . . . . . . nRF52_write_debug_port_register:	JLink:	 (0003ms, 1726ms total)  
2019-Jul-11 14:01:07  . . . . . . nRF52_write_debug_port_register:	JLinkARM.dll CORESIGHT_WriteAPDPReg returned error -1.

2019-Jul-11 14:01:07  . . . . . nRF52_power_debug_and_system_regions:	JLinkARM.dll CORESIGHT_WriteAPDPReg returned error -102.

2019-Jul-11 14:01:07  nRF_close_dll
2019-Jul-11 14:01:07  . nRF52_close_dll
2019-Jul-11 14:01:07  . . nRF52_is_connected_to_emu
2019-Jul-11 14:01:07  . . nRF52_is_connected_to_emu:	JLink:	JLINK_IsOpen()
2019-Jul-11 14:01:07  . . nRF52_is_connected_to_emu:	JLink:	  returns 0x01
2019-Jul-11 14:01:07  . . nRF52_is_connected_to_emu:	JLink:	 (0002ms, 1729ms total)  
2019-Jul-11 14:01:07  . . nRF52_disconnect_from_emu
2019-Jul-11 14:01:07  . . . nRF52_is_connected_to_device
2019-Jul-11 14:01:07  . . . nRF52_is_connected_to_device:	JLink:	JLINK_IsConnected()
2019-Jul-11 14:01:07  . . . nRF52_is_connected_to_device:	JLink:	  returns FALSE
2019-Jul-11 14:01:07  . . . nRF52_is_connected_to_device:	JLink:	 (0003ms, 1733ms total)  
2019-Jul-11 14:01:07  . . . nRF52_unpower_debug_and_system_regions
2019-Jul-11 14:01:07  . . nRF52_disconnect_from_emu:	JLink:	JLINK_Close()


Related