This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to write the bootloader back to nRF52840 Dongle ?

hi,

I have accidentally selected "Erase All" under the Segger Embedded Studio, now my nRF52840 Dongle unable to show its USB port under Windows 10 Device Manager anymore.

How to resolve this issues and where to get the right bootloader image for nRF52840, as the nRF52840 Dongle unable to report its serial port, Segger J-Link was unable to connect.

Please advise.

Parents
  • thx but Windows is unable to detect the serial port of nRF52840 dongle ( i think the bootloader is erased ) and J-Link was unable to connect as well, how to write the .HEX then ?

  • I did used a genuine Segger J-Link the second time but result still the same, unable to connect.

  • Try to use a nrfjprog instead of nrfconnect.  nrfconnect is not reliable using jlink when bootloader is erased.

  • hi, the nrfjprog.exe totally failed reporting something like below:

    C:\Program Files\SEGGER\JLink>nrfjprog -v
    nrfjprog version: 10.13.0
    JLinkARM.dll version: 7.50a

    C:\Program Files\SEGGER\JLink>nrfjprog.exe -f NRF52 --program c:\scratch\graviton_bootloader_mbr_v1.0.1.hex --chiperase --log


    ERROR: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    ERROR: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    ERROR: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    ERROR: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    ERROR: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    ERROR: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    ERROR: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    ERROR: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    ERROR: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    ERROR: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    ERROR: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    ERROR: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    ERROR: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    ERROR: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    ERROR: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    ERROR: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    ERROR: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    ERROR: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    ERROR: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    ERROR: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    ERROR: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    ERROR: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    ERROR: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    ERROR: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    ERROR: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    ERROR: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    ERROR: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    ERROR: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    ERROR: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    ERROR: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    ERROR: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    ERROR: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    ERROR: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    ERROR: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    ERROR: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    ERROR: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    ERROR: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    ERROR: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    ERROR: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    ERROR: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    ERROR: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    ERROR: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    ERROR: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    ERROR: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    ERROR: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    ERROR: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    ERROR: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    ERROR: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    ERROR: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    ERROR: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    ERROR: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    ERROR: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    ERROR: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    ERROR: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    ERROR: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    ERROR: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    ERROR: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    ERROR: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    ERROR: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    ERROR: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    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.

    ------------------------------------------------------------------------------------------------------------------------------------------------

    THE .LOG FILE LOOK LIKE BELOW:

    [2021-Jul-19 19:56:35] [ info] --------------------------------------------------------------------------------
    [2021-Jul-19 19:56:35] [ info] nrfjprog.exe -f NRF52 --program c:\scratch\graviton_bootloader_mbr_v1.0.1.hex --chiperase --log
    [2021-Jul-19 19:56:35] [ info] nrfjprog version 10.13.0
    [2021-Jul-19 19:56:35] [ info] --------------------------------------------------------------------------------
    [2021-Jul-19 19:56:35] [ info] Load library at C:\Program Files (x86)\Nordic Semiconductor\nrf-command-line-tools\bin\nrfjprog.dll.
    [2021-Jul-19 19:56:35] [ info] Library loaded, loading member functions.
    [2021-Jul-19 19:56:35] [ info] Member functions succesfully loaded.
    [2021-Jul-19 19:56:35] [debug] [ Client] - open
    [2021-Jul-19 19:56:35] [debug] [ Client] - start
    [2021-Jul-19 19:56:35] [ info] [ Client] - stdout: Jlinkarm nRF Worker ready. Handling sequence 60627e97-c7f0-4def-a767-b34e021156f9.

    [2021-Jul-19 19:56:35] [trace] [ Client] - Command open executed for 36 milliseconds with result 0
    [2021-Jul-19 19:56:35] [debug] [ Client] - enum_emu_snr
    [2021-Jul-19 19:56:35] [trace] [ Client] - Command enum_emu_snr executed for 15 milliseconds with result 0
    [2021-Jul-19 19:56:35] [debug] [SeggerBackend] - Logger sink registered in Segger backend logger
    [2021-Jul-19 19:56:35] [debug] [  JLink] - Logger sink registered in JLink logger
    [2021-Jul-19 19:56:35] [debug] [  nRF52] - open
    [2021-Jul-19 19:56:35] [debug] [ Client] - connect_to_emu_with_snr
    [2021-Jul-19 19:56:35] [debug] [SeggerBackend] - open_dll
    [2021-Jul-19 19:56:35] [debug] [SeggerBackend] - No J-Link DLL path was provided. Attempting to auto detect.
    [2021-Jul-19 19:56:35] [ info] [SeggerBackend] - Load library at C:\Program Files\SEGGER\JLink\JLinkARM.dll.
    [2021-Jul-19 19:56:35] [ info] [SeggerBackend] - Library loaded, loading member functions.
    [2021-Jul-19 19:56:35] [ info] [SeggerBackend] - Member functions succesfully loaded.
    [2021-Jul-19 19:56:35] [debug] [SeggerBackend] - dll_version
    [2021-Jul-19 19:56:35] [ info] [SeggerBackend] - Segger dll version 7.50.a loaded.
    [2021-Jul-19 19:56:35] [trace] [ Worker] - Command open executed for 7 milliseconds with result 0
    [2021-Jul-19 19:56:35] [debug] [  nRF52] - enum_emu_snr
    [2021-Jul-19 19:56:35] [debug] [SeggerBackend] - is_connected_to_emu
    [2021-Jul-19 19:56:35] [debug] [SeggerBackend] - enum_emu_snr
    [2021-Jul-19 19:56:35] [debug] [SeggerBackend] - ---just_enum_emu_snr
    [2021-Jul-19 19:56:35] [debug] [SeggerBackend] - ---just_get_num_emus
    [2021-Jul-19 19:56:35] [debug] [SeggerBackend] - is_connected_to_emu
    [2021-Jul-19 19:56:35] [trace] [ Worker] - Command enum_emu_snr executed for 4 milliseconds with result 0
    [2021-Jul-19 19:56:35] [debug] [  nRF52] - connect_to_emu_with_snr
    [2021-Jul-19 19:56:35] [debug] [SeggerBackend] - is_connected_to_emu
    [2021-Jul-19 19:56:35] [debug] [SeggerBackend] - connect_to_emu_with_snr
    [2021-Jul-19 19:56:35] [debug] [SeggerBackend] - is_connected_to_emu
    [2021-Jul-19 19:56:35] [debug] [SeggerBackend] - ---just_enum_emu_snr
    [2021-Jul-19 19:56:35] [debug] [SeggerBackend] - ---just_get_num_emus
    [2021-Jul-19 19:56:35] [debug] [SeggerBackend] - ---just_connect_to_emu_with_snr
    [2021-Jul-19 19:56:35] [debug] [SeggerBackend] - ---just_connect_to_emu_without_snr
    [2021-Jul-19 19:56:35] [debug] [SeggerBackend] - Segger logging enabled.
    [2021-Jul-19 19:56:35] [trace] [  JLink] - Firmware: J-Link V11 compiled Jun 29 2021 16:12:24
    [2021-Jul-19 19:56:35] [trace] [  JLink] - Firmware: J-Link V11 compiled Jun 29 2021 16:12:24
    [2021-Jul-19 19:56:35] [trace] [  JLink] - Decompressing FW timestamp took 165 us
    [2021-Jul-19 19:56:35] [trace] [  JLink] - Hardware: V11.00
    [2021-Jul-19 19:56:35] [trace] [  JLink] - S/N: 261011558
    [2021-Jul-19 19:56:35] [trace] [  JLink] - OEM: SEGGER-EDU
    [2021-Jul-19 19:56:35] [trace] [  JLink] - Feature(s): FlashBP, GDB
    [2021-Jul-19 19:56:35] [trace] [  JLink] - TELNET listener socket opened on port 19021
    [2021-Jul-19 19:56:35] [trace] [  JLink] - WEBSRV Starting webserver
    [2021-Jul-19 19:56:35] [trace] [  JLink] - WEBSRV Webserver running on local port 19080
    [2021-Jul-19 19:56:35] [trace] [  JLink] - - 20.828ms returns "O.K."  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_HasError()  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_Lock()  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_GetHWStatus(...)  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - - 0.335ms returns 0  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_HasError()  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_ExecCommand("SetRestartOnClose = 0", ...).   
    [2021-Jul-19 19:56:35] [trace] [  JLink] - - 0.004ms returns 0x01  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_HasError()  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_ExecCommand("DisableFlashDL", ...).   
    [2021-Jul-19 19:56:35] [trace] [  JLink] - - 0.008ms returns 0x00  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_HasError()  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_ExecCommand("ExcludeFlashCacheRange 0x0-0xFFFFFFFF", ...).   
    [2021-Jul-19 19:56:35] [trace] [  JLink] - - 0.005ms returns 0x00  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_HasError()  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_SetHookUnsecureDialog  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_SetHookUnsecureDialog(...)
    [2021-Jul-19 19:56:35] [trace] [  JLink] - - 0.021ms returns 0  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_HasError()  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_TIF_Select(JLINKARM_TIF_SWD)  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - - 1.329ms returns 0x00  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_HasError()  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_SetSpeed(2000)  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - - 0.325ms  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_HasError()  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_GetSN()  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - - 0.008ms returns 261011558  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_HasError()  
    [2021-Jul-19 19:56:35] [debug] [SeggerBackend] - read_debug_port_idr
    [2021-Jul-19 19:56:35] [debug] [SeggerBackend] - read_debug_port_register
    [2021-Jul-19 19:56:35] [debug] [SeggerBackend] - ---just_read_debug_port_register
    [2021-Jul-19 19:56:35] [debug] [SeggerBackend] - coresight_configure
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_CORESIGHT_Configure()  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - - 100.380ms returns 0  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_HasError()  
    [2021-Jul-19 19:56:35] [debug] [SeggerBackend] - ---just_select_debug_port_register
    [2021-Jul-19 19:56:35] [debug] [SeggerBackend] - Select AP 255, DP Bank 0, AP Bank 255
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - - 0.805ms returns -1  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_HasError()  
    [2021-Jul-19 19:56:35] [error] [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    [2021-Jul-19 19:56:35] [debug] [SeggerBackend] - ---just_abort_debug_action
    [2021-Jul-19 19:56:35] [debug] [SeggerBackend] - Attempting to clear any configuration errors in debug port before closing connection.
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - - 0.816ms returns -1  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_HasError()  
    [2021-Jul-19 19:56:35] [error] [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - - 0.711ms returns -1  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_HasError()  
    [2021-Jul-19 19:56:35] [error] [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - - 0.872ms returns -1  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_HasError()  
    [2021-Jul-19 19:56:35] [error] [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - - 0.679ms returns -1  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_HasError()  
    [2021-Jul-19 19:56:35] [error] [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - - 0.812ms returns -1  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_HasError()  
    [2021-Jul-19 19:56:35] [error] [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - - 0.840ms returns -1  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_HasError()  
    [2021-Jul-19 19:56:35] [error] [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    [2021-Jul-19 19:56:35] [debug] [SeggerBackend] - ---just_abort_debug_action
    [2021-Jul-19 19:56:35] [debug] [SeggerBackend] - Attempting to clear any configuration errors in debug port before closing connection.
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - - 0.808ms returns -1  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_HasError()  
    [2021-Jul-19 19:56:35] [error] [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - - 0.682ms returns -1  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_HasError()  
    [2021-Jul-19 19:56:35] [error] [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - - 0.689ms returns -1  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_HasError()  
    [2021-Jul-19 19:56:35] [error] [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - - 0.681ms returns -1  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_HasError()  
    [2021-Jul-19 19:56:35] [error] [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - - 0.686ms returns -1  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_HasError()  
    [2021-Jul-19 19:56:35] [error] [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - - 0.661ms returns -1  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_HasError()  
    [2021-Jul-19 19:56:35] [error] [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    [2021-Jul-19 19:56:35] [debug] [SeggerBackend] - ---just_abort_debug_action
    [2021-Jul-19 19:56:35] [debug] [SeggerBackend] - Attempting to clear any configuration errors in debug port before closing connection.
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - - 0.675ms returns -1  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_HasError()  
    [2021-Jul-19 19:56:35] [error] [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - - 0.639ms returns -1  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_HasError()  
    [2021-Jul-19 19:56:35] [error] [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [2021-Jul-19 19:56:35] [trace] [ Client] - Command connect_to_emu_with_snr executed for 202 milliseconds with result -102
    [2021-Jul-19 19:56:35] [trace] [  JLink] - - 0.636ms returns -1  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_HasError()  
    [2021-Jul-19 19:56:35] [error] [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - - 0.652ms returns -1  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_HasError()  
    [2021-Jul-19 19:56:35] [error] [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - - 0.635ms returns -1  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_HasError()  
    [2021-Jul-19 19:56:35] [error] [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - - 0.648ms returns -1  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_HasError()  
    [2021-Jul-19 19:56:35] [error] [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    [2021-Jul-19 19:56:35] [debug] [SeggerBackend] - ---just_abort_debug_action
    [2021-Jul-19 19:56:35] [debug] [SeggerBackend] - Attempting to clear any configuration errors in debug port before closing connection.
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - - 0.665ms returns -1  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_HasError()  
    [2021-Jul-19 19:56:35] [error] [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - - 0.730ms returns -1  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_HasError()  
    [2021-Jul-19 19:56:35] [error] [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - - 0.747ms returns -1  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_HasError()  
    [2021-Jul-19 19:56:35] [error] [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - - 0.657ms returns -1  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_HasError()  
    [2021-Jul-19 19:56:35] [error] [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - - 0.650ms returns -1  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_HasError()  
    [2021-Jul-19 19:56:35] [error] [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - - 0.700ms returns -1  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_HasError()  
    [2021-Jul-19 19:56:35] [error] [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    [2021-Jul-19 19:56:35] [debug] [SeggerBackend] - ---just_abort_debug_action
    [2021-Jul-19 19:56:35] [debug] [SeggerBackend] - Attempting to clear any configuration errors in debug port before closing connection.
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - - 0.697ms returns -1  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_HasError()  
    [2021-Jul-19 19:56:35] [error] [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - - 0.681ms returns -1  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_HasError()  
    [2021-Jul-19 19:56:35] [error] [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - - 0.683ms returns -1  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_HasError()  
    [2021-Jul-19 19:56:35] [error] [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - - 0.614ms returns -1  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_HasError()  
    [2021-Jul-19 19:56:35] [error] [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - - 0.694ms returns -1  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_HasError()  
    [2021-Jul-19 19:56:35] [error] [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    [2021-Jul-19 19:56:35] [trace] [  JLink] - - 0.020ms  
    [2021-Jul-19 19:56:35] [trace] [ Worker] - Command connect_to_emu_with_snr executed for 195 milliseconds with result -102
    [2021-Jul-19 19:56:35] [debug] [  nRF52] - close
    [2021-Jul-19 19:56:35] [debug] [SeggerBackend] - is_connected_to_emu
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_IsOpen()  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - - 0.015ms returns 0x01  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_HasError()  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_Lock()  
    [2021-Jul-19 19:56:35] [debug] [SeggerBackend] - close
    [2021-Jul-19 19:56:35] [debug] [SeggerBackend] - disconnect_from_emu
    [2021-Jul-19 19:56:35] [debug] [SeggerBackend] - ---just_disconnect_from_emu
    [2021-Jul-19 19:56:35] [debug] [SeggerBackend] - is_connected_to_device
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_IsConnected()  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - - 0.008ms returns FALSE  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_HasError()  
    [2021-Jul-19 19:56:35] [debug] [SeggerBackend] - ---just_is_debug_region_powered
    [2021-Jul-19 19:56:35] [debug] [SeggerBackend] - ---just_read_debug_port_register
    [2021-Jul-19 19:56:35] [debug] [SeggerBackend] - ---just_select_debug_port_register
    [2021-Jul-19 19:56:35] [debug] [SeggerBackend] - Select AP 255, DP Bank 0, AP Bank 255
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - - 0.683ms returns -1  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_HasError()  
    [2021-Jul-19 19:56:35] [error] [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    [2021-Jul-19 19:56:35] [debug] [SeggerBackend] - ---just_abort_debug_action
    [2021-Jul-19 19:56:35] [debug] [SeggerBackend] - Attempting to clear any configuration errors in debug port before closing connection.
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - - 0.684ms returns -1  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_HasError()  
    [2021-Jul-19 19:56:35] [error] [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - - 0.696ms returns -1  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_HasError()  
    [2021-Jul-19 19:56:35] [error] [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - - 0.734ms returns -1  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_HasError()  
    [2021-Jul-19 19:56:35] [error] [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - - 0.647ms returns -1  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_HasError()  
    [2021-Jul-19 19:56:35] [error] [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - - 0.653ms returns -1  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_HasError()  
    [2021-Jul-19 19:56:35] [error] [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - - 0.734ms returns -1  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_HasError()  
    [2021-Jul-19 19:56:35] [error] [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    [2021-Jul-19 19:56:35] [debug] [SeggerBackend] - ---just_abort_debug_action
    [2021-Jul-19 19:56:35] [debug] [SeggerBackend] - Attempting to clear any configuration errors in debug port before closing connection.
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - - 0.663ms returns -1  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_HasError()  
    [2021-Jul-19 19:56:35] [error] [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - - 0.792ms returns -1  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_HasError()  
    [2021-Jul-19 19:56:35] [error] [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - - 0.658ms returns -1  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_HasError()  
    [2021-Jul-19 19:56:35] [error] [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - - 0.676ms returns -1  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_HasError()  
    [2021-Jul-19 19:56:35] [error] [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - - 0.625ms returns -1  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_HasError()  
    [2021-Jul-19 19:56:35] [error] [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - - 0.621ms returns -1  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_HasError()  
    [2021-Jul-19 19:56:35] [error] [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    [2021-Jul-19 19:56:35] [debug] [SeggerBackend] - ---just_abort_debug_action
    [2021-Jul-19 19:56:35] [debug] [SeggerBackend] - Attempting to clear any configuration errors in debug port before closing connection.
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - - 0.693ms returns -1  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_HasError()  
    [2021-Jul-19 19:56:35] [error] [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - - 0.588ms returns -1  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_HasError()  
    [2021-Jul-19 19:56:35] [error] [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - - 0.742ms returns -1  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_HasError()  
    [2021-Jul-19 19:56:35] [error] [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - - 0.622ms returns -1  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_HasError()  
    [2021-Jul-19 19:56:35] [error] [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - - 0.605ms returns -1  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_HasError()  
    [2021-Jul-19 19:56:35] [error] [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - - 0.603ms returns -1  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_HasError()  
    [2021-Jul-19 19:56:35] [error] [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    [2021-Jul-19 19:56:35] [debug] [SeggerBackend] - ---just_abort_debug_action
    [2021-Jul-19 19:56:35] [debug] [SeggerBackend] - Attempting to clear any configuration errors in debug port before closing connection.
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - - 0.707ms returns -1  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_HasError()  
    [2021-Jul-19 19:56:35] [error] [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - - 0.640ms returns -1  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_HasError()  
    [2021-Jul-19 19:56:35] [error] [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - - 0.600ms returns -1  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_HasError()  
    [2021-Jul-19 19:56:35] [error] [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - - 0.650ms returns -1  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_HasError()  
    [2021-Jul-19 19:56:35] [error] [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - - 0.701ms returns -1  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_HasError()  
    [2021-Jul-19 19:56:35] [error] [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - - 0.660ms returns -1  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_HasError()  
    [2021-Jul-19 19:56:35] [error] [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    [2021-Jul-19 19:56:35] [debug] [SeggerBackend] - ---just_abort_debug_action
    [2021-Jul-19 19:56:35] [debug] [SeggerBackend] - Attempting to clear any configuration errors in debug port before closing connection.
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - - 0.678ms returns -1  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_HasError()  
    [2021-Jul-19 19:56:35] [error] [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - - 0.721ms returns -1  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_HasError()  
    [2021-Jul-19 19:56:35] [error] [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - - 0.642ms returns -1  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_HasError()  
    [2021-Jul-19 19:56:35] [error] [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - - 0.676ms returns -1  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_HasError()  
    [2021-Jul-19 19:56:35] [error] [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - - 0.650ms returns -1  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_HasError()  
    [2021-Jul-19 19:56:35] [error] [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
    [2021-Jul-19 19:56:35] [trace] [  JLink] - - 0.035ms  
    [2021-Jul-19 19:56:35] [trace] [  JLink] - JLINK_Close()  
    [2021-Jul-19 19:56:35] [debug] [SeggerBackend] - Segger Backend closed.
    [2021-Jul-19 19:56:35] [debug] [  nRF52] - nRF family DLL closed
    [2021-Jul-19 19:56:35] [trace] [ Client] - Command close executed for 141 milliseconds with result 0
    [2021-Jul-19 19:56:35] [debug] [ Client] - terminate
    [2021-Jul-19 19:56:35] [trace] [ Client] - Command terminate executed for 0 milliseconds with result 0
    [2021-Jul-19 19:56:35] [trace] [ Worker] - Command close executed for 139 milliseconds with result 0
    [2021-Jul-19 19:56:35] [trace] [ Worker] - Command terminate executed for 0 milliseconds with result 0
    [2021-Jul-19 19:56:35] [trace] [ Worker] - Executed 5 commands for 345 milliseconds
    [2021-Jul-19 19:56:35] [debug] [ Client] - Worker process exited with code: 0
    [2021-Jul-19 19:56:35] [debug] [ Client] - Worker process exited with code: 0
    [2021-Jul-19 19:56:35] [debug] [ Client] - Child process terminated with result 0
    [2021-Jul-19 19:56:35] [trace] [ Client] - Executed 5 commands for 394 milliseconds
    [2021-Jul-19 19:56:35] [debug] [ Client] - terminate

    I am using genuine Segger J-Link Home to connect the SWDIO and SWCLK pins of the nRF52840 Dongle, either user USB power or soldered SB1 ( with SB2 broken ) with 3.3V supply to VDD, J-LINK VREF to 3.3V


    Please advise.

  • your dongle might be protect.  Try unlock it first with nrfjprog.  

  • do you have any reference on how to unlock ?

    I tried below but failed with same error mentioned above.

    nrfjprog.exe -f nrf52 --recover


Reply Children
  • well, either your board is dead or you have a Jlink clone.

  • ah.. may be. any way thank you.

  • hi, I manage to restore the bootloader, I used the J-Link clone instead of J-Link EDU with the help of TC2050-IDC-NL and TC2050-CLIP.

    The nRF52840 Dongle is able to be detected as usual under Windows Device Manager as ""nRF52 SDFU USB (COMxx)" and identified under "nRF Connect" programmer as usual now. Is confirmed that once a "FULL ERASE" both the SWDIO and SWDCLK pins onboard (near USB) won't work with J-Link anymore, you have to use TC2050-IDC-NL and TC2050-CLIP.

    The SWDIO and SWDCLK pins onboard also functioning as normal using J-Link clone but J-Link EDU just won't work, may be its VTref pin 1, targeting voltage from VDD nRF52840 is 1.8V so too low voltage, Segger J-Link EDU won't proceed.

    Below were the log messages after successfully connected via SEGGER J-Flash V7.50a:

    Application log started
     - J-Flash V7.50a (J-Flash compiled Jul  8 2021 18:21:36)
     - JLinkARM.dll V7.50a (DLL compiled Jul  8 2021 18:21:11)
    Reading flash device list [C:\Program Files\SEGGER\JLink\ETC/JFlash/Flash.csv] ...
     - List of flash devices read successfully (451 Devices)
    Reading MCU device list ...
     - List of MCU devices read successfully (8611 Devices)
    Opening project file [F:\DEVELOP\NEXUZ\EE\Nordic\CODE\nRF52840\nRF52840.jflash] ...
     - Project opened successfully
    No data file specified!
    Failed to open data file [F:\DEVELOP\NEXUZ\EE\Nordic\CODE\nRF52840\]...
    Connecting ...
     - Connecting via USB to probe/ programmer device 0
     - Probe/ Programmer firmware: J-Link ARM V8 compiled Nov 28 2014 13:44:46
     - Device "NRF52840_XXAA" selected.
     - Target interface speed: 4000 kHz (Fixed)
     - VTarget = 3.338V
     - InitTarget() start
     - InitTarget() end
     - Found SW-DP with ID 0x2BA01477
     - DPv0 detected
     - Scanning AP map to find all available APs
     - AP[2]: Stopped AP scan as end of AP map has been reached
     - AP[0]: AHB-AP (IDR: 0x24770011)
     - AP[1]: JTAG-AP (IDR: 0x02880000)
     - Iterating through AP map to find AHB-AP to use
     - AP[0]: Core found
     - AP[0]: AHB-AP ROM base: 0xE00FF000
     - CPUID register: 0x410FC241. Implementer code: 0x41 (ARM)
     - Found Cortex-M4 r0p1, Little endian.
     - FPUnit: 6 code (BP) slots and 2 literal slots
     - CoreSight components:
     - ROMTbl[0] @ E00FF000
     - ROMTbl[0][0]: E000E000, CID: B105E00D, PID: 000BB00C SCS-M7
     - ROMTbl[0][1]: E0001000, CID: B105E00D, PID: 003BB002 DWT
     - ROMTbl[0][2]: E0002000, CID: B105E00D, PID: 002BB003 FPB
     - ROMTbl[0][3]: E0000000, CID: B105E00D, PID: 003BB001 ITM
     - ROMTbl[0][4]: E0040000, CID: B105900D, PID: 000BB9A1 TPIU
     - ROMTbl[0][5]: E0041000, CID: B105900D, PID: 000BB925 ETM
     - Executing init sequence ...
      - Initialized successfully
     - Target interface speed: 4000 kHz (Fixed)
     - Found 1 JTAG device. Core ID: 0x3ACR0172 (None)
     - Connected successfully

    After playing around the nRF52840 Dongle for sometime, this little device actually had its software application to upload .HEX via "nRF Connect" programmer.

    The actual description is too long to put it here, no wonder many similar questions in this forum are not answered completely.

    Hopes, this help.

Related