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

nRF52 not connecting to Jlink anymore

The prototype I was working on has a nRF52832 on it and for some time it was working fine with the Segger Jlink base. However today I started to try to use the low power modes of the nRF. I know that debuggers and low power modes don't mix well, I made sure that my code whould not go into low power for a few second after starting. That went well, however at some point I disconnected the debugger to see what the real power consumption of the device was. However after that I am no longer able to connect with it.

Every time I try to connect to it the Jlink gives one or more red blinks and I get a (useless) error. I tried connecting quickly after a powercyle of the device. I can see that my code that is still in the device is being run and that with every connect try it is restarted. I have the reset line connected to the jlink.

I have tried the recovery and the chip erase of the nrfjporg tool, but those also don't work. I even tried on a different pc. Unfortunately I don't have access to a new proto at this time, blame working from home. I have checked the custom cable between the jlink and the prototype and that is still good.

This is log of a recovery try.

[2021-Apr-28 15:36:53] [ info] --------------------------------------------------------------------------------
[2021-Apr-28 15:36:53] [ info] nrfjprog --recover --log 
[2021-Apr-28 15:36:53] [ info] nrfjprog version 10.12.1 
[2021-Apr-28 15:36:53] [ info] --------------------------------------------------------------------------------
[2021-Apr-28 15:36:53] [debug] [ nRF0x0] - open_dll
[2021-Apr-28 15:36:53] [ info] [ nRF0x0] - Load library at C:\Program Files\Nordic Semiconductor\nrf-command-line-tools\bin\JLINKARM_UNKNOWN_NRFJPROG.dll.
[2021-Apr-28 15:36:53] [ info] [ nRF0x0] - Library loaded, loading member functions.
[2021-Apr-28 15:36:53] [ info] [ nRF0x0] - Member functions succesfully loaded.
[2021-Apr-28 15:36:53] [ info] [Backend] - Logger callback at 0x7ff61a7356f0 registered in Segger backend logger.
[2021-Apr-28 15:36:53] [ info] [  JLink] - [Info    ] [JLink     ] Logger callback at 0x7ff61a7356f0 registered in JLink logger.
[2021-Apr-28 15:36:53] [debug] [nRFUnknown] - Just_open_dll_tagged_callback
[2021-Apr-28 15:36:53] [debug] [Backend] - open_dll
[2021-Apr-28 15:36:53] [ info] [Backend] - No J-Link DLL path was provided. Attempting to auto detect.
[2021-Apr-28 15:36:53] [ info] [Backend] - Load library at C:\Program Files (x86)\SEGGER\JLink\JLink_x64.dll.
[2021-Apr-28 15:36:53] [ info] [Backend] - Library loaded, loading member functions.
[2021-Apr-28 15:36:53] [ info] [Backend] - Member functions succesfully loaded.
[2021-Apr-28 15:36:53] [debug] [Backend] - dll_version
[2021-Apr-28 15:36:53] [ info] [Backend] - Segger dll version 6.92.  loaded.
[2021-Apr-28 15:36:53] [debug] [Backend] - set_core_data
[2021-Apr-28 15:36:53] [debug] [ nRF0x0] - enum_emu_snr
[2021-Apr-28 15:36:53] [debug] [nRFUnknown] - Just_enum_emu_snr
[2021-Apr-28 15:36:53] [debug] [Backend] - enum_emu_snr
[2021-Apr-28 15:36:53] [debug] [Backend] - ---just_enum_emu_snr
[2021-Apr-28 15:36:53] [debug] [Backend] - ---just_get_num_emus
[2021-Apr-28 15:36:53] [debug] [ nRF0x0] - connect_to_emu_with_snr
[2021-Apr-28 15:36:53] [debug] [nRFUnknown] - Just_connect_to_emu_with_snr
[2021-Apr-28 15:36:53] [debug] [Backend] - connect_to_emu_with_snr
[2021-Apr-28 15:36:53] [debug] [Backend] - is_connected_to_emu
[2021-Apr-28 15:36:53] [debug] [Backend] - ---just_enum_emu_snr
[2021-Apr-28 15:36:53] [debug] [Backend] - ---just_get_num_emus
[2021-Apr-28 15:36:53] [debug] [Backend] - ---just_connect_to_emu_with_snr
[2021-Apr-28 15:36:53] [debug] [Backend] - ---just_connect_to_emu_without_snr
[2021-Apr-28 15:36:53] [ info] [Backend] - Segger logging enabled.
[2021-Apr-28 15:36:53] [ info] [  JLink] - [Info    ] [JLink     ] Firmware: J-Link V10 compiled Jan  4 2021 16:15:44
[2021-Apr-28 15:36:53] [ info] [  JLink] - [Info    ] [JLink     ] Decompressing FW timestamp took 153 us
[2021-Apr-28 15:36:53] [ info] [  JLink] - [Info    ] [JLink     ] Hardware: V10.10
[2021-Apr-28 15:36:53] [ info] [  JLink] - [Info    ] [JLink     ] S/N: 50126313
[2021-Apr-28 15:36:53] [ info] [  JLink] - [Info    ] [JLink     ] OEM: SEGGER
[2021-Apr-28 15:36:53] [ info] [  JLink] - [Info    ] [JLink     ] Feature(s): GDB
[2021-Apr-28 15:36:53] [ info] [  JLink] - [Info    ] [JLink     ] TELNET listener socket opened on port 19021
[2021-Apr-28 15:36:53] [ info] [  JLink] - [Info    ] [JLink     ] WEBSRV Starting webserver
[2021-Apr-28 15:36:53] [ info] [  JLink] - [Info    ] [JLink     ] WEBSRV Webserver running on local port 19080
[2021-Apr-28 15:36:53] [ info] [  JLink] - [Info    ] [JLink     ] - 11.667ms returns "O.K."  
[2021-Apr-28 15:36:53] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2021-Apr-28 15:36:53] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_GetHWStatus(...)  
[2021-Apr-28 15:36:53] [ info] [  JLink] - [Info    ] [JLink     ] - 0.270ms returns 0  
[2021-Apr-28 15:36:53] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2021-Apr-28 15:36:53] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_ExecCommand("SetRestartOnClose = 0", ...).   
[2021-Apr-28 15:36:53] [ info] [  JLink] - [Info    ] [JLink     ] - 0.006ms returns 0x01  
[2021-Apr-28 15:36:53] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2021-Apr-28 15:36:53] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_ExecCommand("DisableFlashDL", ...).   
[2021-Apr-28 15:36:53] [ info] [  JLink] - [Info    ] [JLink     ] - 0.006ms returns 0x00  
[2021-Apr-28 15:36:53] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2021-Apr-28 15:36:53] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_ExecCommand("ExcludeFlashCacheRange 0x0-0xFFFFFFFF", ...).   
[2021-Apr-28 15:36:53] [ info] [  JLink] - [Info    ] [JLink     ] - 0.005ms returns 0x00  
[2021-Apr-28 15:36:53] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2021-Apr-28 15:36:53] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_SetHookUnsecureDialog  
[2021-Apr-28 15:36:53] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_SetHookUnsecureDialog(...)
[2021-Apr-28 15:36:53] [ info] [  JLink] - [Info    ] [JLink     ] - 0.019ms returns 0  
[2021-Apr-28 15:36:53] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2021-Apr-28 15:36:53] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_TIF_Select(JLINKARM_TIF_SWD)  
[2021-Apr-28 15:36:53] [ info] [  JLink] - [Info    ] [JLink     ] - 0.829ms returns 0x00  
[2021-Apr-28 15:36:53] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2021-Apr-28 15:36:53] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_SetSpeed(2000)  
[2021-Apr-28 15:36:53] [ info] [  JLink] - [Info    ] [JLink     ] - 0.106ms  
[2021-Apr-28 15:36:53] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2021-Apr-28 15:36:53] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_GetSN()  
[2021-Apr-28 15:36:53] [ info] [  JLink] - [Info    ] [JLink     ] - 0.007ms returns 50126313  
[2021-Apr-28 15:36:53] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2021-Apr-28 15:36:53] [debug] [Backend] - ---just_load_core_data
[2021-Apr-28 15:36:53] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_ExecCommand("CORESIGHT_SetIndexAHBAPToUse = 0", ...).   
[2021-Apr-28 15:36:53] [ info] [  JLink] - [Info    ] [JLink     ] - 0.007ms returns 0x00  
[2021-Apr-28 15:36:53] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2021-Apr-28 15:36:53] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_ExecCommand("device = Cortex-M4", ...).   
[2021-Apr-28 15:36:53] [ info] [  JLink] - [Info    ] [JLink     ] XML file found at: C:\Program Files (x86)\SEGGER\JLink\JLinkDevices.xml 
[2021-Apr-28 15:36:53] [ info] [  JLink] - [Info    ] [JLink     ] C:\Program Files (x86)\SEGGER\JLink\JLinkDevices.xml evaluated successfully. 
[2021-Apr-28 15:36:53] [ info] [  JLink] - [Info    ] [JLink     ] Device "CORTEX-M4" selected.
[2021-Apr-28 15:36:53] [ info] [  JLink] - [Info    ] [JLink     ] Device "CORTEX-M4" selected.
[2021-Apr-28 15:36:53] [ info] [  JLink] - [Info    ] [JLink     ] - 44.000ms returns 0x00  
[2021-Apr-28 15:36:53] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2021-Apr-28 15:36:53] [debug] [ nRF0x0] - read_connected_emu_snr
[2021-Apr-28 15:36:53] [debug] [nRFUnknown] - Just_read_connected_emu_snr
[2021-Apr-28 15:36:53] [debug] [Backend] - read_connected_emu_snr
[2021-Apr-28 15:36:53] [debug] [Backend] - is_connected_to_emu
[2021-Apr-28 15:36:53] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_IsOpen()  
[2021-Apr-28 15:36:53] [ info] [  JLink] - [Info    ] [JLink     ] - 0.017ms returns 0x01  
[2021-Apr-28 15:36:53] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2021-Apr-28 15:36:53] [debug] [ nRF0x0] - read_device_family
[2021-Apr-28 15:36:53] [debug] [nRFUnknown] - Just_read_device_family
[2021-Apr-28 15:36:53] [debug] [Backend] - is_connected_to_emu
[2021-Apr-28 15:36:53] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_IsOpen()  
[2021-Apr-28 15:36:53] [ info] [  JLink] - [Info    ] [JLink     ] - 0.007ms returns 0x01  
[2021-Apr-28 15:36:53] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2021-Apr-28 15:36:53] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_Lock()  
[2021-Apr-28 15:36:53] [debug] [Backend] - read_debug_port_idr
[2021-Apr-28 15:36:53] [debug] [Backend] - read_debug_port_register
[2021-Apr-28 15:36:53] [debug] [Backend] - ---just_read_debug_port_register
[2021-Apr-28 15:36:53] [debug] [Backend] - coresight_configure
[2021-Apr-28 15:36:53] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_CORESIGHT_Configure()  
[2021-Apr-28 15:36:53] [ info] [  JLink] - [Info    ] [JLink     ] - 100.321ms returns 0  
[2021-Apr-28 15:36:53] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2021-Apr-28 15:36:53] [debug] [Backend] - ---just_select_debug_port_register
[2021-Apr-28 15:36:53] [debug] [Backend] - Select AP 255, DP Bank 0, AP Bank 255
[2021-Apr-28 15:36:53] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)  
[2021-Apr-28 15:36:53] [ info] [  JLink] - [Info    ] [JLink     ] - 0.881ms returns -1  
[2021-Apr-28 15:36:53] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2021-Apr-28 15:36:53] [ info] [Backend] - JLinkARM.dll reported "-1", an unknown error.
[2021-Apr-28 15:36:53] [debug] [Backend] - ---just_abort_debug_action
[2021-Apr-28 15:36:53] [ info] [Backend] - Attempting to clear any configuration errors in debug port before closing connection. 
[2021-Apr-28 15:36:53] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
[2021-Apr-28 15:36:53] [ info] [  JLink] - [Info    ] [JLink     ] - 0.749ms returns -1  
[2021-Apr-28 15:36:53] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2021-Apr-28 15:36:53] [ info] [Backend] - JLinkARM.dll reported "-1", an unknown error.
[2021-Apr-28 15:36:53] [ info] [  JLink] - [Info    ] [JLink     ] - 0.077ms  
[2021-Apr-28 15:36:53] [debug] [ nRF0x0] - close_dll
[2021-Apr-28 15:36:53] [debug] [nRFUnknown] - Just_close_dll
[2021-Apr-28 15:36:53] [debug] [Backend] - close
[2021-Apr-28 15:36:53] [debug] [Backend] - disconnect_from_emu
[2021-Apr-28 15:36:53] [debug] [Backend] - is_connected_to_emu
[2021-Apr-28 15:36:53] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_IsOpen()  
[2021-Apr-28 15:36:53] [ info] [  JLink] - [Info    ] [JLink     ] - 0.030ms returns 0x01  
[2021-Apr-28 15:36:53] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2021-Apr-28 15:36:53] [debug] [Backend] - ---just_disconnect_from_emu
[2021-Apr-28 15:36:53] [debug] [Backend] - is_connected_to_device
[2021-Apr-28 15:36:53] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_IsConnected()  
[2021-Apr-28 15:36:53] [ info] [  JLink] - [Info    ] [JLink     ] - 0.067ms returns FALSE  
[2021-Apr-28 15:36:53] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2021-Apr-28 15:36:53] [debug] [Backend] - ---just_is_debug_region_powered
[2021-Apr-28 15:36:53] [debug] [Backend] - ---just_read_debug_port_register
[2021-Apr-28 15:36:53] [debug] [Backend] - is_connected_to_emu
[2021-Apr-28 15:36:53] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_IsOpen()  
[2021-Apr-28 15:36:53] [ info] [  JLink] - [Info    ] [JLink     ] - 0.028ms returns 0x01  
[2021-Apr-28 15:36:53] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2021-Apr-28 15:36:53] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_Lock()  
[2021-Apr-28 15:36:53] [debug] [Backend] - ---just_select_debug_port_register
[2021-Apr-28 15:36:53] [debug] [Backend] - Select AP 255, DP Bank 0, AP Bank 255
[2021-Apr-28 15:36:53] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)  
[2021-Apr-28 15:36:53] [ info] [  JLink] - [Info    ] [JLink     ] - 0.820ms returns -1  
[2021-Apr-28 15:36:53] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2021-Apr-28 15:36:53] [ info] [Backend] - JLinkARM.dll reported "-1", an unknown error.
[2021-Apr-28 15:36:53] [debug] [Backend] - ---just_abort_debug_action
[2021-Apr-28 15:36:53] [ info] [Backend] - Attempting to clear any configuration errors in debug port before closing connection. 
[2021-Apr-28 15:36:53] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
[2021-Apr-28 15:36:53] [ info] [  JLink] - [Info    ] [JLink     ] - 0.735ms returns -1  
[2021-Apr-28 15:36:53] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2021-Apr-28 15:36:53] [ info] [Backend] - JLinkARM.dll reported "-1", an unknown error.
[2021-Apr-28 15:36:53] [ info] [  JLink] - [Info    ] [JLink     ] - 0.075ms  
[2021-Apr-28 15:36:53] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_Close()  
[2021-Apr-28 15:36:53] [debug] [Backend] - Segger Backend closed.

Can someone help me get this thing back to work. And maybe shed some light on what I did wrong.

Parents Reply Children
Related