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

Cannot connect to my device

The device nRF52832 cannot connect over SWD and generates the following error. 

- Connecting via USB to J-Link device 0
- J-Link firmware: J-Link EDU Mini V1 compiled Apr 16 2020 17:23:57
- Device "NRF52832_XXAA" selected.
- InitTarget() start
- InitTarget() end
- InitTarget() start
- InitTarget() end
- Target interface speed: 200 kHz (Auto)
- VTarget = 1.767V
- InitTarget() start
- InitTarget() end
- InitTarget() start
- InitTarget() end
- ERROR: Failed to connect.
Could not establish a connection to target.

Using nRFjprog i ge tthe following error.

nrfjprog --recover --log
ERROR: JLinkARM DLL reported an error. Try again. If error condition
ERROR: persists, run the same command again with argument --log, contact Nordic
ERROR: Semiconductor and provide the generated log.log file to them.

I have attached the log.log file as well.log.log

  • Hi,

     

    From this page, it seems that your debugger probe only works on 3.3V:

    https://www.segger.com/products/debug-probes/j-link/models/j-link-edu-mini/

     

    Do you have the possibility to raise the voltage on your target board?

     

    Kind regards,

    Håkon

  • Hi, 

    Thank you for the reply. I purchased a Jlink edu with a VTREF of 1.8. Now I get the following error when i run 

    2020-Jul-12 11:40:29  --------------------------------------------------------------------------------
    2020-Jul-12 11:40:29  nrfjprog --recover --log 
    2020-Jul-12 11:40:29  nrfjprog version 10.8.0 
    2020-Jul-12 11:40:29  --------------------------------------------------------------------------------
    2020-Jul-12 11:40:29  nRF_logger_open
    2020-Jul-12 11:40:29  nRF_logger_open:	nRFJProg logger opened to callback at address 0X1F0940
    2020-Jul-12 11:40:29  nRF_open_dll
    2020-Jul-12 11:40:29  nRF_open_dll:	Load library at "C:\\Program Files (x86)\\Nordic Semiconductor\\nrf-command-line-tools\\bin\\JLINKARM_UNKNOWN_NRFJPROG.dll".
    
    2020-Jul-12 11:40:29  . nRFXX_logger_open
    2020-Jul-12 11:40:29  . nRFXX_logger_open:	nRFJProg logger opened to callback at address 0X6C0DB850
    2020-Jul-12 11:40:29  . . Segger_logger_open
    2020-Jul-12 11:40:29  . . Segger_logger_open:	nRFJProg logger opened to callback at address 0X6B7AC8A0
    2020-Jul-12 11:40:29  . . Segger_open_dll
    2020-Jul-12 11:40:29  . . Segger_open_dll:	Load library at "C:\\Program Files (x86)\\SEGGER\\JLink\\JLinkARM.dll".
    
    2020-Jul-12 11:40:29  . . . Segger_dll_version
    2020-Jul-12 11:40:29  . . Segger_set_core_data
    2020-Jul-12 11:40:29  nRF_enum_emu_snr
    2020-Jul-12 11:40:29  . nRFXX_enum_emu_snr
    2020-Jul-12 11:40:29  . . Segger_enum_emu_snr
    2020-Jul-12 11:40:29  . . . Segger_enum_emu_snr
    2020-Jul-12 11:40:29  . . . . Segger_get_num_emus
    2020-Jul-12 11:40:29  nRF_connect_to_emu_with_snr
    2020-Jul-12 11:40:29  . nRFXX_connect_to_emu_with_snr
    2020-Jul-12 11:40:29  . . Segger_connect_to_emu_with_snr
    2020-Jul-12 11:40:29  . . . Segger_is_connected_to_emu
    2020-Jul-12 11:40:29  . . . Segger_enum_emu_snr
    2020-Jul-12 11:40:29  . . . . Segger_get_num_emus
    2020-Jul-12 11:40:29  . . . Segger_connect_to_emu_with_snr
    2020-Jul-12 11:40:29  . . . . Segger_connect_to_emu_without_snr
    2020-Jul-12 11:40:29  . . . . Segger_connect_to_emu_without_snr:	Segger logging enabled with callback at 0x1803209776.
    
    2020-Jul-12 11:40:29  . . . . . Segger_load_core_data
    2020-Jul-12 11:40:29  nRF_read_connected_emu_snr
    2020-Jul-12 11:40:29  . nRFXX_read_connected_emu_snr
    2020-Jul-12 11:40:29  . . Segger_read_connected_emu_snr
    2020-Jul-12 11:40:29  . . . Segger_is_connected_to_emu
    2020-Jul-12 11:40:29  nRF_read_device_family
    2020-Jul-12 11:40:29  . nRFXX_read_device_family
    2020-Jul-12 11:40:29  . . Segger_is_connected_to_emu
    2020-Jul-12 11:40:29  . . Segger_read_debug_port_idr
    2020-Jul-12 11:40:29  . . . Segger_read_debug_port_register
    2020-Jul-12 11:40:29  . . . . Segger_read_debug_port_register
    2020-Jul-12 11:40:29  . . . . . Segger_coresight_configure
    2020-Jul-12 11:40:29  . . . . Segger_read_debug_port_register:	JLinkARM.dll reported "-1", an unknown error.
    
    2020-Jul-12 11:40:29  . . . . . Segger_abort_debug_action
    2020-Jul-12 11:40:29  . . . . . Segger_abort_debug_action:	Attempting to clear any configuration errors in debug port before closing connection. 
    
    2020-Jul-12 11:40:29  . . . . . Segger_abort_debug_action:	JLinkARM.dll reported "-1", an unknown error.
    
    2020-Jul-12 11:40:29  nRF_close_dll
    2020-Jul-12 11:40:29  . nRFXX_close_dll
    2020-Jul-12 11:40:29  . . Segger_close
    2020-Jul-12 11:40:29  . . . Segger_disconnect_from_emu
    2020-Jul-12 11:40:29  . . . . Segger_is_connected_to_emu
    2020-Jul-12 11:40:29  . . . . Segger_disconnect_from_emu
    2020-Jul-12 11:40:29  . . . . . Segger_is_connected_to_device
    2020-Jul-12 11:40:29  . . . . . Segger_is_debug_region_powered
    2020-Jul-12 11:40:29  . . . . . . Segger_read_debug_port_register
    2020-Jul-12 11:40:29  . . . . . . . Segger_is_connected_to_emu
    2020-Jul-12 11:40:29  . . . . . . . Segger_write_debug_port_register
    2020-Jul-12 11:40:29  . . . . . . . Segger_write_debug_port_register:	JLinkARM.dll reported "-1", an unknown error.
    
    2020-Jul-12 11:40:29  . . . . . . . . Segger_abort_debug_action
    2020-Jul-12 11:40:29  . . . . . . . . Segger_abort_debug_action:	Attempting to clear any configuration errors in debug port before closing connection. 
    
    2020-Jul-12 11:40:29  . . . . . . . . Segger_abort_debug_action:	JLinkARM.dll reported "-1", an unknown error.
    
    2020-Jul-12 11:40:29  . . Segger_close:	Freeing Library.
    
    2020-Jul-12 11:40:29  nRF_close_dll:	Freeing Library.
    
    2020-Jul-12 11:49:27  --------------------------------------------------------------------------------
    2020-Jul-12 11:49:27  nrfjprog.exe --clockspeed 250 --family NRF52 --eraseall --log 
    2020-Jul-12 11:49:27  nrfjprog version 10.8.0 
    2020-Jul-12 11:49:27  --------------------------------------------------------------------------------
    2020-Jul-12 11:49:27  nRF_logger_open
    2020-Jul-12 11:49:27  nRF_logger_open:	nRFJProg logger opened to callback at address 0X1F0940
    2020-Jul-12 11:49:27  nRF_open_dll
    2020-Jul-12 11:49:27  nRF_open_dll:	Load library at "C:\\Program Files (x86)\\Nordic Semiconductor\\nrf-command-line-tools\\bin\\JLINKARM_NRF52_NRFJPROG.dll".
    
    2020-Jul-12 11:49:27  . nRF52_logger_open
    2020-Jul-12 11:49:27  . nRF52_logger_open:	nRFJProg logger opened to callback at address 0X728BB850
    2020-Jul-12 11:49:27  . nRF52_open_dll
    2020-Jul-12 11:49:27  . . Segger_logger_open
    2020-Jul-12 11:49:27  . . Segger_logger_open:	nRFJProg logger opened to callback at address 0X725606A0
    2020-Jul-12 11:49:27  . . Segger_open_dll
    2020-Jul-12 11:49:27  . . Segger_open_dll:	Load library at "C:\\Program Files (x86)\\SEGGER\\JLink\\JLinkARM.dll".
    
    2020-Jul-12 11:49:27  . . . Segger_dll_version
    2020-Jul-12 11:49:27  . . Segger_set_core_data
    2020-Jul-12 11:49:27  nRF_enum_emu_snr
    2020-Jul-12 11:49:27  . nRF52_enum_emu_snr
    2020-Jul-12 11:49:27  . . Segger_enum_emu_snr
    2020-Jul-12 11:49:27  . . . Segger_enum_emu_snr
    2020-Jul-12 11:49:27  . . . . Segger_get_num_emus
    2020-Jul-12 11:49:27  nRF_connect_to_emu_with_snr
    2020-Jul-12 11:49:27  . nRF52_connect_to_emu_with_snr
    2020-Jul-12 11:49:27  . . Segger_connect_to_emu_with_snr
    2020-Jul-12 11:49:27  . . . Segger_is_connected_to_emu
    2020-Jul-12 11:49:27  . . . Segger_enum_emu_snr
    2020-Jul-12 11:49:27  . . . . Segger_get_num_emus
    2020-Jul-12 11:49:27  . . . Segger_connect_to_emu_with_snr
    2020-Jul-12 11:49:27  . . . . Segger_connect_to_emu_without_snr
    2020-Jul-12 11:49:27  . . . . Segger_connect_to_emu_without_snr:	Segger logging enabled with callback at 0x1918241328.
    
    2020-Jul-12 11:49:27  . . . . . Segger_load_core_data
    2020-Jul-12 11:49:28  . . Segger_read_debug_port_idr
    2020-Jul-12 11:49:28  . . . Segger_read_debug_port_register
    2020-Jul-12 11:49:28  . . . . Segger_is_connected_to_emu
    2020-Jul-12 11:49:28  . . . . Segger_read_debug_port_register
    2020-Jul-12 11:49:28  . . . . . Segger_coresight_configure
    2020-Jul-12 11:49:28  . . . . Segger_read_debug_port_register:	JLinkARM.dll reported "-1", an unknown error.
    
    2020-Jul-12 11:49:28  . . . . . Segger_abort_debug_action
    2020-Jul-12 11:49:28  . . . . . Segger_abort_debug_action:	Attempting to clear any configuration errors in debug port before closing connection. 
    
    2020-Jul-12 11:49:28  . . . . . Segger_abort_debug_action:	JLinkARM.dll reported "-1", an unknown error.
    
    2020-Jul-12 11:49:28  nRF_close_dll
    2020-Jul-12 11:49:28  . nRF52_close_dll
    2020-Jul-12 11:49:28  . . Segger_close
    2020-Jul-12 11:49:28  . . . Segger_disconnect_from_emu
    2020-Jul-12 11:49:28  . . . . Segger_is_connected_to_emu
    2020-Jul-12 11:49:28  . . . . Segger_disconnect_from_emu
    2020-Jul-12 11:49:28  . . . . . Segger_is_connected_to_device
    2020-Jul-12 11:49:28  . . . . . Segger_is_debug_region_powered
    2020-Jul-12 11:49:28  . . . . . . Segger_read_debug_port_register
    2020-Jul-12 11:49:28  . . . . . . . Segger_is_connected_to_emu
    2020-Jul-12 11:49:28  . . . . . . . Segger_write_debug_port_register
    2020-Jul-12 11:49:28  . . . . . . . Segger_write_debug_port_register:	JLinkARM.dll reported "-1", an unknown error.
    
    2020-Jul-12 11:49:28  . . . . . . . . Segger_abort_debug_action
    2020-Jul-12 11:49:28  . . . . . . . . Segger_abort_debug_action:	Attempting to clear any configuration errors in debug port before closing connection. 
    
    2020-Jul-12 11:49:28  . . . . . . . . Segger_abort_debug_action:	JLinkARM.dll reported "-1", an unknown error.
    
    2020-Jul-12 11:49:28  . . Segger_close:	Freeing Library.
    
    2020-Jul-12 11:49:28  nRF_close_dll:	Freeing Library.
    
    2020-Jul-12 11:51:29  --------------------------------------------------------------------------------
    2020-Jul-12 11:51:29  nrfjprog --recover --clockspeed 200 --log 
    2020-Jul-12 11:51:29  nrfjprog version 10.8.0 
    2020-Jul-12 11:51:29  --------------------------------------------------------------------------------
    2020-Jul-12 11:51:29  nRF_logger_open
    2020-Jul-12 11:51:29  nRF_logger_open:	nRFJProg logger opened to callback at address 0X1F0940
    2020-Jul-12 11:51:29  nRF_open_dll
    2020-Jul-12 11:51:29  nRF_open_dll:	Load library at "C:\\Program Files (x86)\\Nordic Semiconductor\\nrf-command-line-tools\\bin\\JLINKARM_UNKNOWN_NRFJPROG.dll".
    
    2020-Jul-12 11:51:29  . nRFXX_logger_open
    2020-Jul-12 11:51:29  . nRFXX_logger_open:	nRFJProg logger opened to callback at address 0X728BB850
    2020-Jul-12 11:51:29  . . Segger_logger_open
    2020-Jul-12 11:51:29  . . Segger_logger_open:	nRFJProg logger opened to callback at address 0X7256C8A0
    2020-Jul-12 11:51:29  . . Segger_open_dll
    2020-Jul-12 11:51:29  . . Segger_open_dll:	Load library at "C:\\Program Files (x86)\\SEGGER\\JLink\\JLinkARM.dll".
    
    2020-Jul-12 11:51:29  . . . Segger_dll_version
    2020-Jul-12 11:51:29  . . Segger_set_core_data
    2020-Jul-12 11:51:29  nRF_enum_emu_snr
    2020-Jul-12 11:51:29  . nRFXX_enum_emu_snr
    2020-Jul-12 11:51:29  . . Segger_enum_emu_snr
    2020-Jul-12 11:51:29  . . . Segger_enum_emu_snr
    2020-Jul-12 11:51:29  . . . . Segger_get_num_emus
    2020-Jul-12 11:51:29  nRF_connect_to_emu_with_snr
    2020-Jul-12 11:51:29  . nRFXX_connect_to_emu_with_snr
    2020-Jul-12 11:51:29  . . Segger_connect_to_emu_with_snr
    2020-Jul-12 11:51:29  . . . Segger_is_connected_to_emu
    2020-Jul-12 11:51:29  . . . Segger_enum_emu_snr
    2020-Jul-12 11:51:29  . . . . Segger_get_num_emus
    2020-Jul-12 11:51:29  . . . Segger_connect_to_emu_with_snr
    2020-Jul-12 11:51:29  . . . . Segger_connect_to_emu_without_snr
    2020-Jul-12 11:51:29  . . . . Segger_connect_to_emu_without_snr:	Segger logging enabled with callback at 0x1918290992.
    
    2020-Jul-12 11:51:29  . . . . . Segger_load_core_data
    2020-Jul-12 11:51:29  nRF_read_connected_emu_snr
    2020-Jul-12 11:51:29  . nRFXX_read_connected_emu_snr
    2020-Jul-12 11:51:29  . . Segger_read_connected_emu_snr
    2020-Jul-12 11:51:29  . . . Segger_is_connected_to_emu
    2020-Jul-12 11:51:29  nRF_read_device_family
    2020-Jul-12 11:51:29  . nRFXX_read_device_family
    2020-Jul-12 11:51:29  . . Segger_is_connected_to_emu
    2020-Jul-12 11:51:29  . . Segger_read_debug_port_idr
    2020-Jul-12 11:51:29  . . . Segger_read_debug_port_register
    2020-Jul-12 11:51:29  . . . . Segger_read_debug_port_register
    2020-Jul-12 11:51:29  . . . . . Segger_coresight_configure
    2020-Jul-12 11:51:29  . . . . Segger_read_debug_port_register:	JLinkARM.dll reported "-1", an unknown error.
    
    2020-Jul-12 11:51:29  . . . . . Segger_abort_debug_action
    2020-Jul-12 11:51:29  . . . . . Segger_abort_debug_action:	Attempting to clear any configuration errors in debug port before closing connection. 
    
    2020-Jul-12 11:51:29  . . . . . Segger_abort_debug_action:	JLinkARM.dll reported "-1", an unknown error.
    
    2020-Jul-12 11:51:29  nRF_close_dll
    2020-Jul-12 11:51:29  . nRFXX_close_dll
    2020-Jul-12 11:51:29  . . Segger_close
    2020-Jul-12 11:51:29  . . . Segger_disconnect_from_emu
    2020-Jul-12 11:51:29  . . . . Segger_is_connected_to_emu
    2020-Jul-12 11:51:29  . . . . Segger_disconnect_from_emu
    2020-Jul-12 11:51:29  . . . . . Segger_is_connected_to_device
    2020-Jul-12 11:51:29  . . . . . Segger_is_debug_region_powered
    2020-Jul-12 11:51:29  . . . . . . Segger_read_debug_port_register
    2020-Jul-12 11:51:29  . . . . . . . Segger_is_connected_to_emu
    2020-Jul-12 11:51:29  . . . . . . . Segger_write_debug_port_register
    2020-Jul-12 11:51:29  . . . . . . . Segger_write_debug_port_register:	JLinkARM.dll reported "-1", an unknown error.
    
    2020-Jul-12 11:51:29  . . . . . . . . Segger_abort_debug_action
    2020-Jul-12 11:51:29  . . . . . . . . Segger_abort_debug_action:	Attempting to clear any configuration errors in debug port before closing connection. 
    
    2020-Jul-12 11:51:29  . . . . . . . . Segger_abort_debug_action:	JLinkARM.dll reported "-1", an unknown error.
    
    2020-Jul-12 11:51:29  . . Segger_close:	Freeing Library.
    
    2020-Jul-12 11:51:29  nRF_close_dll:	Freeing Library.
    
    2020-Jul-12 11:51:45  --------------------------------------------------------------------------------
    2020-Jul-12 11:51:45  nrfjprog --recover --clockspeed 200 --family NRF52 --log 
    2020-Jul-12 11:51:45  nrfjprog version 10.8.0 
    2020-Jul-12 11:51:45  --------------------------------------------------------------------------------
    2020-Jul-12 11:51:45  nRF_logger_open
    2020-Jul-12 11:51:45  nRF_logger_open:	nRFJProg logger opened to callback at address 0X1F0940
    2020-Jul-12 11:51:45  nRF_open_dll
    2020-Jul-12 11:51:45  nRF_open_dll:	Load library at "C:\\Program Files (x86)\\Nordic Semiconductor\\nrf-command-line-tools\\bin\\JLINKARM_NRF52_NRFJPROG.dll".
    
    2020-Jul-12 11:51:45  . nRF52_logger_open
    2020-Jul-12 11:51:45  . nRF52_logger_open:	nRFJProg logger opened to callback at address 0X728BB850
    2020-Jul-12 11:51:45  . nRF52_open_dll
    2020-Jul-12 11:51:45  . . Segger_logger_open
    2020-Jul-12 11:51:45  . . Segger_logger_open:	nRFJProg logger opened to callback at address 0X725606A0
    2020-Jul-12 11:51:45  . . Segger_open_dll
    2020-Jul-12 11:51:45  . . Segger_open_dll:	Load library at "C:\\Program Files (x86)\\SEGGER\\JLink\\JLinkARM.dll".
    
    2020-Jul-12 11:51:45  . . . Segger_dll_version
    2020-Jul-12 11:51:45  . . Segger_set_core_data
    2020-Jul-12 11:51:45  nRF_enum_emu_snr
    2020-Jul-12 11:51:45  . nRF52_enum_emu_snr
    2020-Jul-12 11:51:45  . . Segger_enum_emu_snr
    2020-Jul-12 11:51:45  . . . Segger_enum_emu_snr
    2020-Jul-12 11:51:45  . . . . Segger_get_num_emus
    2020-Jul-12 11:51:45  nRF_connect_to_emu_with_snr
    2020-Jul-12 11:51:45  . nRF52_connect_to_emu_with_snr
    2020-Jul-12 11:51:45  . . Segger_connect_to_emu_with_snr
    2020-Jul-12 11:51:45  . . . Segger_is_connected_to_emu
    2020-Jul-12 11:51:45  . . . Segger_enum_emu_snr
    2020-Jul-12 11:51:45  . . . . Segger_get_num_emus
    2020-Jul-12 11:51:45  . . . Segger_connect_to_emu_with_snr
    2020-Jul-12 11:51:45  . . . . Segger_connect_to_emu_without_snr
    2020-Jul-12 11:51:45  . . . . Segger_connect_to_emu_without_snr:	Segger logging enabled with callback at 0x1918241328.
    
    2020-Jul-12 11:51:45  . . . . . Segger_load_core_data
    2020-Jul-12 11:51:45  . . Segger_read_debug_port_idr
    2020-Jul-12 11:51:45  . . . Segger_read_debug_port_register
    2020-Jul-12 11:51:45  . . . . Segger_is_connected_to_emu
    2020-Jul-12 11:51:45  . . . . Segger_read_debug_port_register
    2020-Jul-12 11:51:45  . . . . . Segger_coresight_configure
    2020-Jul-12 11:51:45  . . . . Segger_read_debug_port_register:	JLinkARM.dll reported "-1", an unknown error.
    
    2020-Jul-12 11:51:45  . . . . . Segger_abort_debug_action
    2020-Jul-12 11:51:45  . . . . . Segger_abort_debug_action:	Attempting to clear any configuration errors in debug port before closing connection. 
    
    2020-Jul-12 11:51:45  . . . . . Segger_abort_debug_action:	JLinkARM.dll reported "-1", an unknown error.
    
    2020-Jul-12 11:51:45  nRF_close_dll
    2020-Jul-12 11:51:45  . nRF52_close_dll
    2020-Jul-12 11:51:45  . . Segger_close
    2020-Jul-12 11:51:45  . . . Segger_disconnect_from_emu
    2020-Jul-12 11:51:45  . . . . Segger_is_connected_to_emu
    2020-Jul-12 11:51:45  . . . . Segger_disconnect_from_emu
    2020-Jul-12 11:51:45  . . . . . Segger_is_connected_to_device
    2020-Jul-12 11:51:45  . . . . . Segger_is_debug_region_powered
    2020-Jul-12 11:51:45  . . . . . . Segger_read_debug_port_register
    2020-Jul-12 11:51:45  . . . . . . . Segger_is_connected_to_emu
    2020-Jul-12 11:51:45  . . . . . . . Segger_write_debug_port_register
    2020-Jul-12 11:51:45  . . . . . . . Segger_write_debug_port_register:	JLinkARM.dll reported "-1", an unknown error.
    
    2020-Jul-12 11:51:45  . . . . . . . . Segger_abort_debug_action
    2020-Jul-12 11:51:45  . . . . . . . . Segger_abort_debug_action:	Attempting to clear any configuration errors in debug port before closing connection. 
    
    2020-Jul-12 11:51:45  . . . . . . . . Segger_abort_debug_action:	JLinkARM.dll reported "-1", an unknown error.
    
    2020-Jul-12 11:51:45  . . Segger_close:	Freeing Library.
    
    2020-Jul-12 11:51:45  nRF_close_dll:	Freeing Library.
    
    
    nrfjprog --recover --log

  • Hi,

     

    Thank you for the log files, and my apologies for the late response.

    It looks like it is not able to successfully detect the nRF, as it fails on the very first SWD-DP transfer. Have you checked the output when connecting with JLink Commander?

    Have you checked that the connection to SWDIO and SWDCLK is correct (not mirror-connected or similar) ?

    Are you able to successfully connect to other devices, or is this issue only present on one device?

     

    Kind regards,

    Håkon

  • Hi ,

    Did you solve this in the end? I am having the same issue.

Related