nRF52833 - Jlink error

I’m using nrfjprog version 10.12.1 and JLinkARM.dll version 6.88.
I encountered an intermittent nrfjprog error when programming firmware to the nRF52833.

In most cases, I can successfully reset the device and update the firmware. However, after approximately 40–50 iterations, an error occurs.
I’ve tried rebooting the system, switching USB ports, and running nrfjprog --recover, but the issue persists.

Here is the error message:

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.




Below is the log from one of the failed reset attempts.

Since the issue appears to be related to JLinkARM.dll, I would like to ask:

1.  Can you help identify the root cause based on the log?

Since the version of JLinkARM.dll I was using was relatively old (v6.88), I updated it to v8.30.
After testing with 60 devices, I haven’t encountered the error so far.

2. If there’s still a chance it may occur again?






[2025-May-06 17:38:46] [ info] nrfjprog --log --reset
[2025-May-06 17:38:46] [ info] nrfjprog version 10.12.1
[2025-May-06 17:38:46] [ info] --------------------------------------------------------------------------------
[2025-May-06 17:38:46] [debug] [ nRF0x0] - open_dll
[2025-May-06 17:38:46] [ info] [ nRF0x0] - Load library at /opt/nrfjprog/libjlinkarm_unknown_nrfjprogdll.so.
[2025-May-06 17:38:46] [ info] [ nRF0x0] - Library loaded, loading member functions.
[2025-May-06 17:38:46] [ info] [ nRF0x0] - Member functions succesfully loaded.
[2025-May-06 17:38:46] [ info] [Backend] - Logger callback at 0x5c27f402e130 registered in Segger backend logger.
[2025-May-06 17:38:46] [ info] [ JLink] - [Info ] [JLink ] Logger callback at 0x5c27f402e130 registered in JLink logger.
[2025-May-06 17:38:46] [debug] [nRFUnknown] - Just_open_dll_tagged_callback
[2025-May-06 17:38:46] [debug] [Backend] - open_dll
[2025-May-06 17:38:46] [ info] [Backend] - No J-Link DLL path was provided. Attempting to auto detect.
[2025-May-06 17:38:46] [ info] [Backend] - Load library at /opt/SEGGER/JLink/libjlinkarm.so.6.88.1.
[2025-May-06 17:38:46] [ info] [Backend] - Library loaded, loading member functions.
[2025-May-06 17:38:46] [ info] [Backend] - Member functions succesfully loaded.
[2025-May-06 17:38:46] [debug] [Backend] - dll_version
[2025-May-06 17:38:46] [ info] [Backend] - Segger dll version 6.88.a loaded.
[2025-May-06 17:38:46] [debug] [Backend] - set_core_data
[2025-May-06 17:38:46] [debug] [ nRF0x0] - enum_emu_snr
[2025-May-06 17:38:46] [debug] [nRFUnknown] - Just_enum_emu_snr
[2025-May-06 17:38:46] [debug] [Backend] - enum_emu_snr
[2025-May-06 17:38:46] [debug] [Backend] - ---just_enum_emu_snr
[2025-May-06 17:38:46] [debug] [Backend] - ---just_get_num_emus
[2025-May-06 17:38:46] [debug] [ nRF0x0] - connect_to_emu_with_snr
[2025-May-06 17:38:46] [debug] [nRFUnknown] - Just_connect_to_emu_with_snr
[2025-May-06 17:38:46] [debug] [Backend] - connect_to_emu_with_snr
[2025-May-06 17:38:46] [debug] [Backend] - is_connected_to_emu
[2025-May-06 17:38:46] [debug] [Backend] - ---just_enum_emu_snr
[2025-May-06 17:38:46] [debug] [Backend] - ---just_get_num_emus
[2025-May-06 17:38:46] [debug] [Backend] - ---just_connect_to_emu_with_snr
[2025-May-06 17:38:46] [debug] [Backend] - ---just_connect_to_emu_without_snr
[2025-May-06 17:38:46] [ info] [Backend] - Segger logging enabled.
[2025-May-06 17:38:46] [ info] [ JLink] - [Info ] [JLink ] Firmware: J-Link V11 compiled May 18 2022 17:08:14
[2025-May-06 17:38:46] [ info] [ JLink] - [Info ] [JLink ] Decompressing FW timestamp took 120 us
[2025-May-06 17:38:46] [ info] [ JLink] - [Info ] [JLink ] Hardware: V11.00
[2025-May-06 17:38:46] [ info] [ JLink] - [Info ] [JLink ] S/N: 51018885
[2025-May-06 17:38:46] [ info] [ JLink] - [Info ] [JLink ] OEM: SEGGER
[2025-May-06 17:38:46] [ info] [ JLink] - [Info ] [JLink ] Feature(s): GDB
[2025-May-06 17:38:46] [ info] [ JLink] - [Info ] [JLink ] TELNET listener socket opened on port 19021
[2025-May-06 17:38:46] [ info] [ JLink] - [Info ] [JLink ] WEBSRV Starting webserver
[2025-May-06 17:38:46] [ info] [ JLink] - [Info ] [JLink ] WEBSRV Webserver running on local port 19080
[2025-May-06 17:38:46] [ info] [ JLink] - [Info ] [JLink ] - 6.326ms returns "O.K."
[2025-May-06 17:38:46] [ info] [ JLink] - [Info ] [JLink ] JLINK_HasError()
[2025-May-06 17:38:46] [ info] [ JLink] - [Info ] [JLink ] JLINK_GetHWStatus(...)
[2025-May-06 17:38:46] [ info] [ JLink] - [Info ] [JLink ] - 0.152ms returns 0
[2025-May-06 17:38:46] [ info] [ JLink] - [Info ] [JLink ] JLINK_HasError()
[2025-May-06 17:38:46] [ info] [ JLink] - [Info ] [JLink ] JLINK_ExecCommand("SetRestartOnClose = 0", ...).
[2025-May-06 17:38:46] [ info] [ JLink] - [Info ] [JLink ] - 0.002ms returns 0x01
[2025-May-06 17:38:46] [ info] [ JLink] - [Info ] [JLink ] JLINK_HasError()
[2025-May-06 17:38:46] [ info] [ JLink] - [Info ] [JLink ] JLINK_ExecCommand("DisableFlashDL", ...).
[2025-May-06 17:38:46] [ info] [ JLink] - [Info ] [JLink ] - 0.002ms returns 0x00
[2025-May-06 17:38:46] [ info] [ JLink] - [Info ] [JLink ] JLINK_HasError()
[2025-May-06 17:38:46] [ info] [ JLink] - [Info ] [JLink ] JLINK_ExecCommand("ExcludeFlashCacheRange 0x0-0xFFFFFFFF", ...).
[2025-May-06 17:38:46] [ info] [ JLink] - [Info ] [JLink ] - 0.001ms returns 0x00
[2025-May-06 17:38:46] [ info] [ JLink] - [Info ] [JLink ] JLINK_HasError()
[2025-May-06 17:38:46] [ info] [ JLink] - [Info ] [JLink ] JLINK_SetHookUnsecureDialog
[2025-May-06 17:38:46] [ info] [ JLink] - [Info ] [JLink ] JLINK_SetHookUnsecureDialog(...)
[2025-May-06 17:38:46] [ info] [ JLink] - [Info ] [JLink ] - 0.005ms returns 0
[2025-May-06 17:38:46] [ info] [ JLink] - [Info ] [JLink ] JLINK_HasError()
[2025-May-06 17:38:46] [ info] [ JLink] - [Info ] [JLink ] JLINK_TIF_Select(JLINKARM_TIF_SWD)
[2025-May-06 17:38:46] [ info] [ JLink] - [Info ] [JLink ] - 0.823ms returns 0x00
[2025-May-06 17:38:46] [ info] [ JLink] - [Info ] [JLink ] JLINK_HasError()
[2025-May-06 17:38:46] [ info] [ JLink] - [Info ] [JLink ] JLINK_SetSpeed(2000)
[2025-May-06 17:38:46] [ info] [ JLink] - [Info ] [JLink ] - 0.194ms
[2025-May-06 17:38:46] [ info] [ JLink] - [Info ] [JLink ] JLINK_HasError()
[2025-May-06 17:38:46] [ info] [ JLink] - [Info ] [JLink ] JLINK_GetSN()
[2025-May-06 17:38:46] [ info] [ JLink] - [Info ] [JLink ] - 0.002ms returns 51018885
[2025-May-06 17:38:46] [ info] [ JLink] - [Info ] [JLink ] JLINK_HasError()
[2025-May-06 17:38:46] [debug] [Backend] - ---just_load_core_data
[2025-May-06 17:38:46] [ info] [ JLink] - [Info ] [JLink ] JLINK_ExecCommand("CORESIGHT_SetIndexAHBAPToUse = 0", ...).
[2025-May-06 17:38:46] [ info] [ JLink] - [Info ] [JLink ] - 0.001ms returns 0x00
[2025-May-06 17:38:46] [ info] [ JLink] - [Info ] [JLink ] JLINK_HasError()
[2025-May-06 17:38:46] [ info] [ JLink] - [Info ] [JLink ] JLINK_ExecCommand("device = Cortex-M4", ...).
[2025-May-06 17:38:46] [ info] [ JLink] - [Info ] [JLink ] XML file found at: /opt/SEGGER/JLink/JLinkDevices.xml
[2025-May-06 17:38:46] [ info] [ JLink] - [Info ] [JLink ] /opt/SEGGER/JLink/JLinkDevices.xml evaluated successfully.
[2025-May-06 17:38:46] [ info] [ JLink] - [Info ] [JLink ] Device "CORTEX-M4" selected.
[2025-May-06 17:38:46] [ info] [ JLink] - [Info ] [JLink ] Device "CORTEX-M4" selected.
[2025-May-06 17:38:46] [ info] [ JLink] - [Info ] [JLink ] - 7.223ms returns 0x00
[2025-May-06 17:38:46] [ info] [ JLink] - [Info ] [JLink ] JLINK_HasError()
[2025-May-06 17:38:46] [debug] [ nRF0x0] - read_connected_emu_snr
[2025-May-06 17:38:46] [debug] [nRFUnknown] - Just_read_connected_emu_snr
[2025-May-06 17:38:46] [debug] [Backend] - read_connected_emu_snr
[2025-May-06 17:38:46] [debug] [Backend] - is_connected_to_emu
[2025-May-06 17:38:46] [ info] [ JLink] - [Info ] [JLink ] JLINK_IsOpen()
[2025-May-06 17:38:46] [ info] [ JLink] - [Info ] [JLink ] - 0.003ms returns 0x01
[2025-May-06 17:38:46] [ info] [ JLink] - [Info ] [JLink ] JLINK_HasError()
[2025-May-06 17:38:46] [debug] [ nRF0x0] - read_device_family
[2025-May-06 17:38:46] [debug] [nRFUnknown] - Just_read_device_family
[2025-May-06 17:38:46] [debug] [Backend] - is_connected_to_emu
[2025-May-06 17:38:46] [ info] [ JLink] - [Info ] [JLink ] JLINK_IsOpen()
[2025-May-06 17:38:46] [ info] [ JLink] - [Info ] [JLink ] - 0.003ms returns 0x01
[2025-May-06 17:38:46] [ info] [ JLink] - [Info ] [JLink ] JLINK_HasError()
[2025-May-06 17:38:46] [ info] [ JLink] - [Info ] [JLink ] JLINK_Lock()
[2025-May-06 17:38:46] [debug] [Backend] - read_debug_port_idr
[2025-May-06 17:38:46] [debug] [Backend] - read_debug_port_register
[2025-May-06 17:38:46] [debug] [Backend] - ---just_read_debug_port_register
[2025-May-06 17:38:46] [debug] [Backend] - coresight_configure
[2025-May-06 17:38:46] [ info] [ JLink] - [Info ] [JLink ] JLINK_CORESIGHT_Configure()
[2025-May-06 17:38:47] [ info] [ JLink] - [Info ] [JLink ] - 100.758ms returns 0
[2025-May-06 17:38:47] [ info] [ JLink] - [Info ] [JLink ] JLINK_HasError()
[2025-May-06 17:38:47] [debug] [Backend] - ---just_select_debug_port_register
[2025-May-06 17:38:47] [debug] [Backend] - Select AP 255, DP Bank 0, AP Bank 255
[2025-May-06 17:38:47] [ info] [ JLink] - [Info ] [JLink ] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)
[2025-May-06 17:38:47] [ info] [ JLink] - [Info ] [JLink ] - 0.845ms returns -1
[2025-May-06 17:38:47] [ info] [ JLink] - [Info ] [JLink ] JLINK_HasError()
[2025-May-06 17:38:47] [ info] [Backend] - JLinkARM.dll reported "-1", an unknown error.
[2025-May-06 17:38:47] [debug] [Backend] - ---just_abort_debug_action
[2025-May-06 17:38:47] [ info] [Backend] - Attempting to clear any configuration errors in debug port before closing connection.
[2025-May-06 17:38:47] [ info] [ JLink] - [Info ] [JLink ] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)
[2025-May-06 17:38:47] [ info] [ JLink] - [Info ] [JLink ] - 0.734ms returns -1
[2025-May-06 17:38:47] [ info] [ JLink] - [Info ] [JLink ] JLINK_HasError()
[2025-May-06 17:38:47] [ info] [Backend] - JLinkARM.dll reported "-1", an unknown error.
[2025-May-06 17:38:47] [ info] [ JLink] - [Info ] [JLink ] - 0.083ms
[2025-May-06 17:38:47] [debug] [ nRF0x0] - close_dll
[2025-May-06 17:38:47] [debug] [nRFUnknown] - Just_close_dll
[2025-May-06 17:38:47] [debug] [Backend] - close
[2025-May-06 17:38:47] [debug] [Backend] - disconnect_from_emu
[2025-May-06 17:38:47] [debug] [Backend] - is_connected_to_emu
[2025-May-06 17:38:47] [ info] [ JLink] - [Info ] [JLink ] JLINK_IsOpen()
[2025-May-06 17:38:47] [ info] [ JLink] - [Info ] [JLink ] - 0.013ms returns 0x01
[2025-May-06 17:38:47] [ info] [ JLink] - [Info ] [JLink ] JLINK_HasError()
[2025-May-06 17:38:47] [debug] [Backend] - ---just_disconnect_from_emu
[2025-May-06 17:38:47] [debug] [Backend] - is_connected_to_device
[2025-May-06 17:38:47] [ info] [ JLink] - [Info ] [JLink ] JLINK_IsConnected()
[2025-May-06 17:38:47] [ info] [ JLink] - [Info ] [JLink ] - 0.012ms returns FALSE
[2025-May-06 17:38:47] [ info] [ JLink] - [Info ] [JLink ] JLINK_HasError()
[2025-May-06 17:38:47] [debug] [Backend] - ---just_is_debug_region_powered
[2025-May-06 17:38:47] [debug] [Backend] - ---just_read_debug_port_register
[2025-May-06 17:38:47] [debug] [Backend] - is_connected_to_emu
[2025-May-06 17:38:47] [ info] [ JLink] - [Info ] [JLink ] JLINK_IsOpen()
[2025-May-06 17:38:47] [ info] [ JLink] - [Info ] [JLink ] - 0.017ms returns 0x01
[2025-May-06 17:38:47] [ info] [ JLink] - [Info ] [JLink ] JLINK_HasError()
[2025-May-06 17:38:47] [ info] [ JLink] - [Info ] [JLink ] JLINK_Lock()
[2025-May-06 17:38:47] [debug] [Backend] - ---just_select_debug_port_register
[2025-May-06 17:38:47] [debug] [Backend] - Select AP 255, DP Bank 0, AP Bank 255
[2025-May-06 17:38:47] [ info] [ JLink] - [Info ] [JLink ] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)
[2025-May-06 17:38:47] [ info] [ JLink] - [Info ] [JLink ] - 0.772ms returns -1
[2025-May-06 17:38:47] [ info] [ JLink] - [Info ] [JLink ] JLINK_HasError()
[2025-May-06 17:38:47] [ info] [Backend] - JLinkARM.dll reported "-1", an unknown error.
[2025-May-06 17:38:47] [debug] [Backend] - ---just_abort_debug_action
[2025-May-06 17:38:47] [ info] [Backend] - Attempting to clear any configuration errors in debug port before closing connection.
[2025-May-06 17:38:47] [ info] [ JLink] - [Info ] [JLink ] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)
[2025-May-06 17:38:47] [ info] [ JLink] - [Info ] [JLink ] - 0.679ms returns -1
[2025-May-06 17:38:47] [ info] [ JLink] - [Info ] [JLink ] JLINK_HasError()
[2025-May-06 17:38:47] [ info] [Backend] - JLinkARM.dll reported "-1", an unknown error.
[2025-May-06 17:38:47] [ info] [ JLink] - [Info ] [JLink ] - 0.036ms
[2025-May-06 17:38:47] [ info] [ JLink] - [Info ] [JLink ] JLINK_Close()
[2025-May-06 17:38:47] [debug] [Backend] - Segger Backend closed.

Parents
  • Hi,

     

    [2025-May-06 17:38:47] [ info] [ JLink] - [Info ] [JLink ] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)
    [2025-May-06 17:38:47] [ info] [ JLink] - [Info ] [JLink ] - 0.845ms returns -1
    [2025-May-06 17:38:47] [ info] [ JLink] - [Info ] [JLink ] JLINK_HasError()

    The logs show that the debugger is not able to connect to a device. The log will be similar as if trying to connect to a non-connected device.

     

    This log output can happen if the device is in a reset-loop state, where the debugger has problems opening a SWD connection before the nRF boots up again and faults/asserts where the default behavior is to run a soft-reset.

     

    Try running "nrfjprog --recover -f nrf52" in a loop while simultaneously powering on/off the nRF, similar to what is described here:

     RE: nRF52832 not connected anymore after first trying to debug (Keil) 

    Since the version of JLinkARM.dll I was using was relatively old (v6.88), I updated it to v8.30.
    After testing with 60 devices, I haven’t encountered the error so far.

    I am glad to hear that it is more stable on your end now.

    You had an older jlink installation, and it is recommended to upgrade if you run into issues like these.

     

    Kind regards,

    Håkon

Reply
  • Hi,

     

    [2025-May-06 17:38:47] [ info] [ JLink] - [Info ] [JLink ] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)
    [2025-May-06 17:38:47] [ info] [ JLink] - [Info ] [JLink ] - 0.845ms returns -1
    [2025-May-06 17:38:47] [ info] [ JLink] - [Info ] [JLink ] JLINK_HasError()

    The logs show that the debugger is not able to connect to a device. The log will be similar as if trying to connect to a non-connected device.

     

    This log output can happen if the device is in a reset-loop state, where the debugger has problems opening a SWD connection before the nRF boots up again and faults/asserts where the default behavior is to run a soft-reset.

     

    Try running "nrfjprog --recover -f nrf52" in a loop while simultaneously powering on/off the nRF, similar to what is described here:

     RE: nRF52832 not connected anymore after first trying to debug (Keil) 

    Since the version of JLinkARM.dll I was using was relatively old (v6.88), I updated it to v8.30.
    After testing with 60 devices, I haven’t encountered the error so far.

    I am glad to hear that it is more stable on your end now.

    You had an older jlink installation, and it is recommended to upgrade if you run into issues like these.

     

    Kind regards,

    Håkon

Children
Related