Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs

nRF52833DK make flash error

Hello,

Using an nRF52833dk and following this documentation https://github.com/makerdiary/nrf52840-mdk

I was able to flash the blinky example on my board, but only once. My problem here is that the board seems to be unreliable: around 1 time out of 50 works for the flash (I only switch ON and OFF), and all the other times I get this error:

make flash
DONE nrf52820_xxaa
Flashing: _build/nrf52820_xxaa.hex
nrfjprog -f nrf52 --program _build/nrf52820_xxaa.hex --sectorerase
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.
make: *** [Makefile:141: flash] Error 33

[2021-Dec-01 16:09:04] [ info] --------------------------------------------------------------------------------
[2021-Dec-01 16:09:04] [ info] nrfjprog -f nrf52 --program _build/nrf52820_xxaa.hex --sectorerase --log 
[2021-Dec-01 16:09:04] [ info] nrfjprog version 10.10.0 
[2021-Dec-01 16:09:04] [ info] --------------------------------------------------------------------------------
[2021-Dec-01 16:09:04] [debug] [ nRF0x0] - open_dll
[2021-Dec-01 16:09:04] [debug] [ nRF0x0] - Load library at /opt/nrfjprog/libjlinkarm_nrf52_nrfjprogdll.so.
[2021-Dec-01 16:09:04] [debug] [ nRF0x0] - Library loaded, loading member functions.
[2021-Dec-01 16:09:04] [debug] [ nRF0x0] - Member functions succesfully loaded.
[2021-Dec-01 16:09:04] [debug] [Backend] - Logger callback at 0x56162ca2ae00 registered in Segger backend logger.
[2021-Dec-01 16:09:04] [debug] [  JLink] - [Debug   ] [JLink     ] Logger callback at 0x56162ca2ae00 registered in JLink logger.
[2021-Dec-01 16:09:04] [debug] [nRF520x0] - open
[2021-Dec-01 16:09:04] [debug] [Backend] - open_dll
[2021-Dec-01 16:09:04] [debug] [Backend] - No J-Link DLL path was provided. Attempting to auto detect.
[2021-Dec-01 16:09:04] [debug] [Backend] - Load library at /opt/SEGGER/JLink/libjlinkarm.so.
[2021-Dec-01 16:09:04] [debug] [Backend] - Library loaded, loading member functions.
[2021-Dec-01 16:09:04] [debug] [Backend] - Member functions succesfully loaded.
[2021-Dec-01 16:09:04] [debug] [Backend] - dll_version
[2021-Dec-01 16:09:04] [debug] [Backend] - Segger dll version 7.58.b loaded.
[2021-Dec-01 16:09:04] [debug] [ nRF0x0] - enum_emu_snr
[2021-Dec-01 16:09:04] [debug] [nRF520x0] - enum_emu_snr
[2021-Dec-01 16:09:04] [debug] [Backend] - is_connected_to_emu
[2021-Dec-01 16:09:04] [debug] [Backend] - enum_emu_snr
[2021-Dec-01 16:09:04] [debug] [Backend] - ---just_enum_emu_snr
[2021-Dec-01 16:09:04] [debug] [Backend] - ---just_get_num_emus
[2021-Dec-01 16:09:05] [debug] [Backend] - is_connected_to_emu
[2021-Dec-01 16:09:05] [debug] [ nRF0x0] - connect_to_emu_with_snr
[2021-Dec-01 16:09:05] [debug] [nRF520x0] - connect_to_emu_with_snr
[2021-Dec-01 16:09:05] [debug] [Backend] - is_connected_to_emu
[2021-Dec-01 16:09:05] [debug] [Backend] - connect_to_emu_with_snr
[2021-Dec-01 16:09:05] [debug] [Backend] - is_connected_to_emu
[2021-Dec-01 16:09:05] [debug] [Backend] - ---just_enum_emu_snr
[2021-Dec-01 16:09:05] [debug] [Backend] - ---just_get_num_emus
[2021-Dec-01 16:09:05] [debug] [Backend] - ---just_connect_to_emu_with_snr
[2021-Dec-01 16:09:05] [debug] [Backend] - ---just_connect_to_emu_without_snr
[2021-Dec-01 16:09:05] [debug] [Backend] - Segger logging enabled.
[2021-Dec-01 16:09:05] [debug] [  JLink] - [Debug   ] [JLink     ] Firmware: J-Link OB-SAM3U128-V2-NordicSemi compiled Feb  2 2021 16:47:20
[2021-Dec-01 16:09:05] [debug] [  JLink] - [Debug   ] [JLink     ] Firmware: J-Link OB-SAM3U128-V2-NordicSemi compiled Feb  2 2021 16:47:20
[2021-Dec-01 16:09:05] [debug] [  JLink] - [Debug   ] [JLink     ] Hardware: V1.00
[2021-Dec-01 16:09:05] [debug] [  JLink] - [Debug   ] [JLink     ] S/N: 685722965
[2021-Dec-01 16:09:05] [debug] [  JLink] - [Debug   ] [JLink     ] OEM: SEGGER
[2021-Dec-01 16:09:05] [debug] [  JLink] - [Debug   ] [JLink     ] Feature(s): RDI, FlashBP, FlashDL, JFlash, GDB
[2021-Dec-01 16:09:05] [debug] [  JLink] - [Debug   ] [JLink     ] TELNET listener socket opened on port 19021
[2021-Dec-01 16:09:05] [debug] [  JLink] - [Debug   ] [JLink     ] WEBSRV WEBSRV_Init(): Starting webserver thread(s)
[2021-Dec-01 16:09:05] [debug] [  JLink] - [Debug   ] [JLink     ] WEBSRV Webserver running on local port 19080
[2021-Dec-01 16:09:05] [debug] [  JLink] - [Debug   ] [JLink     ] - 3.717ms returns "O.K."  
[2021-Dec-01 16:09:05] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_HasError()  
[2021-Dec-01 16:09:05] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_Lock()  
[2021-Dec-01 16:09:05] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_GetHWStatus(...)  
[2021-Dec-01 16:09:05] [debug] [  JLink] - [Debug   ] [JLink     ] - 0.086ms returns 0  
[2021-Dec-01 16:09:05] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_HasError()  
[2021-Dec-01 16:09:05] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_ExecCommand("SetRestartOnClose = 0", ...).   
[2021-Dec-01 16:09:05] [debug] [  JLink] - [Debug   ] [JLink     ] - 0.003ms returns 0x01  
[2021-Dec-01 16:09:05] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_HasError()  
[2021-Dec-01 16:09:05] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_ExecCommand("DisableFlashDL", ...).   
[2021-Dec-01 16:09:05] [debug] [  JLink] - [Debug   ] [JLink     ] - 0.010ms returns 0x00  
[2021-Dec-01 16:09:05] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_HasError()  
[2021-Dec-01 16:09:05] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_ExecCommand("ExcludeFlashCacheRange 0x0-0xFFFFFFFF", ...).   
[2021-Dec-01 16:09:05] [debug] [  JLink] - [Debug   ] [JLink     ] - 0.002ms returns 0x00  
[2021-Dec-01 16:09:05] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_HasError()  
[2021-Dec-01 16:09:05] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_SetHookUnsecureDialog  
[2021-Dec-01 16:09:05] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_SetHookUnsecureDialog(...)
[2021-Dec-01 16:09:05] [debug] [  JLink] - [Debug   ] [JLink     ] - 0.011ms returns 0  
[2021-Dec-01 16:09:05] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_HasError()  
[2021-Dec-01 16:09:05] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_TIF_Select(JLINKARM_TIF_SWD)  
[2021-Dec-01 16:09:05] [debug] [  JLink] - [Debug   ] [JLink     ] - 0.296ms returns 0x00  
[2021-Dec-01 16:09:05] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_HasError()  
[2021-Dec-01 16:09:05] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_SetSpeed(2000)  
[2021-Dec-01 16:09:05] [debug] [  JLink] - [Debug   ] [JLink     ] - 0.033ms  
[2021-Dec-01 16:09:05] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_HasError()  
[2021-Dec-01 16:09:05] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_GetSN()  
[2021-Dec-01 16:09:05] [debug] [  JLink] - [Debug   ] [JLink     ] - 0.006ms returns 685722965  
[2021-Dec-01 16:09:05] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_HasError()  
[2021-Dec-01 16:09:05] [debug] [Backend] - ---just_load_core_data
[2021-Dec-01 16:09:05] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_ExecCommand("CORESIGHT_SetIndexAHBAPToUse = 0", ...).   
[2021-Dec-01 16:09:05] [debug] [  JLink] - [Debug   ] [JLink     ] - 0.002ms returns 0x00  
[2021-Dec-01 16:09:05] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_HasError()  
[2021-Dec-01 16:09:05] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_ExecCommand("device = nRF52", ...).   
[2021-Dec-01 16:09:05] [debug] [  JLink] - [Debug   ] [JLink     ] XML file found at: /opt/SEGGER/JLink/JLinkDevices.xml 
[2021-Dec-01 16:09:05] [debug] [  JLink] - [Debug   ] [JLink     ] /opt/SEGGER/JLink/JLinkDevices.xml evaluated successfully. 
[2021-Dec-01 16:09:05] [debug] [  JLink] - [Debug   ] [JLink     ] Device "NRF52" selected.
[2021-Dec-01 16:09:05] [debug] [  JLink] - [Debug   ] [JLink     ] - 16.008ms returns 0x00  
[2021-Dec-01 16:09:05] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_HasError()  
[2021-Dec-01 16:09:05] [debug] [Backend] - read_debug_port_idr
[2021-Dec-01 16:09:05] [debug] [Backend] - read_debug_port_register
[2021-Dec-01 16:09:05] [debug] [Backend] - ---just_read_debug_port_register
[2021-Dec-01 16:09:05] [debug] [Backend] - coresight_configure
[2021-Dec-01 16:09:05] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_CORESIGHT_Configure()  
[2021-Dec-01 16:09:05] [debug] [  JLink] - [Debug   ] [JLink     ] - 101.094ms returns 0  
[2021-Dec-01 16:09:05] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_HasError()  
[2021-Dec-01 16:09:05] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_CORESIGHT_ReadAPDPReg(DP reg 0x00)  
[2021-Dec-01 16:09:05] [debug] [  JLink] - [Debug   ] [JLink     ] failed
[2021-Dec-01 16:09:05] [debug] [  JLink] - [Debug   ] [JLink     ] - 0.951ms returns -1  
[2021-Dec-01 16:09:05] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_HasError()  
[2021-Dec-01 16:09:05] [debug] [Backend] - JLinkARM.dll reported "-1", an unknown error.
[2021-Dec-01 16:09:05] [debug] [Backend] - ---just_abort_debug_action
[2021-Dec-01 16:09:05] [debug] [Backend] - Attempting to clear any configuration errors in debug port before closing connection. 
[2021-Dec-01 16:09:05] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
[2021-Dec-01 16:09:05] [debug] [  JLink] - [Debug   ] [JLink     ] - 0.995ms returns -1  
[2021-Dec-01 16:09:05] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_HasError()  
[2021-Dec-01 16:09:05] [debug] [Backend] - JLinkARM.dll reported "-1", an unknown error.
[2021-Dec-01 16:09:05] [debug] [  JLink] - [Debug   ] [JLink     ] - 0.067ms  
[2021-Dec-01 16:09:05] [debug] [ nRF0x0] - close_dll
[2021-Dec-01 16:09:05] [debug] [nRF520x0] - close
[2021-Dec-01 16:09:05] [debug] [Backend] - is_connected_to_emu
[2021-Dec-01 16:09:05] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_IsOpen()  
[2021-Dec-01 16:09:05] [debug] [  JLink] - [Debug   ] [JLink     ] - 0.019ms returns 0x01  
[2021-Dec-01 16:09:05] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_HasError()  
[2021-Dec-01 16:09:05] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_Lock()  
[2021-Dec-01 16:09:05] [debug] [Backend] - close
[2021-Dec-01 16:09:05] [debug] [Backend] - disconnect_from_emu
[2021-Dec-01 16:09:05] [debug] [Backend] - ---just_disconnect_from_emu
[2021-Dec-01 16:09:05] [debug] [Backend] - is_connected_to_device
[2021-Dec-01 16:09:05] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_IsConnected()  
[2021-Dec-01 16:09:05] [debug] [  JLink] - [Debug   ] [JLink     ] - 0.018ms returns FALSE  
[2021-Dec-01 16:09:05] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_HasError()  
[2021-Dec-01 16:09:05] [debug] [Backend] - ---just_is_debug_region_powered
[2021-Dec-01 16:09:05] [debug] [Backend] - ---just_read_debug_port_register
[2021-Dec-01 16:09:05] [debug] [Backend] - ---just_write_debug_port_register
[2021-Dec-01 16:09:05] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)  
[2021-Dec-01 16:09:05] [debug] [  JLink] - [Debug   ] [JLink     ] - 1.038ms returns -1  
[2021-Dec-01 16:09:05] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_HasError()  
[2021-Dec-01 16:09:05] [debug] [Backend] - JLinkARM.dll reported "-1", an unknown error.
[2021-Dec-01 16:09:05] [debug] [Backend] - ---just_abort_debug_action
[2021-Dec-01 16:09:05] [debug] [Backend] - Attempting to clear any configuration errors in debug port before closing connection. 
[2021-Dec-01 16:09:05] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
[2021-Dec-01 16:09:05] [debug] [  JLink] - [Debug   ] [JLink     ] - 0.962ms returns -1  
[2021-Dec-01 16:09:05] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_HasError()  
[2021-Dec-01 16:09:05] [debug] [Backend] - JLinkARM.dll reported "-1", an unknown error.
[2021-Dec-01 16:09:05] [debug] [  JLink] - [Debug   ] [JLink     ] - 0.064ms  
[2021-Dec-01 16:09:05] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_Close()  
[2021-Dec-01 16:09:05] [debug] [Backend] - Segger Backend closed.
[2021-Dec-01 16:09:05] [debug] [nRF520x0] - nRF family DLL closed
[2021-Dec-01 16:23:48] [ info] --------------------------------------------------------------------------------
[2021-Dec-01 16:23:48] [ info] nrfjprog --recover --log 
[2021-Dec-01 16:23:48] [ info] nrfjprog version 10.10.0 
[2021-Dec-01 16:23:48] [ info] --------------------------------------------------------------------------------
[2021-Dec-01 16:23:48] [debug] [ nRF0x0] - open_dll
[2021-Dec-01 16:23:48] [debug] [ nRF0x0] - Load library at /opt/nrfjprog/libjlinkarm_unknown_nrfjprogdll.so.
[2021-Dec-01 16:23:48] [debug] [ nRF0x0] - Library loaded, loading member functions.
[2021-Dec-01 16:23:48] [debug] [ nRF0x0] - Member functions succesfully loaded.
[2021-Dec-01 16:23:48] [debug] [Backend] - Logger callback at 0x564a2ae2ae00 registered in Segger backend logger.
[2021-Dec-01 16:23:48] [debug] [  JLink] - [Debug   ] [JLink     ] Logger callback at 0x564a2ae2ae00 registered in JLink logger.
[2021-Dec-01 16:23:48] [debug] [nRFUnknown] - Just_open_dll_tagged_callback
[2021-Dec-01 16:23:48] [debug] [Backend] - open_dll
[2021-Dec-01 16:23:48] [debug] [Backend] - No J-Link DLL path was provided. Attempting to auto detect.
[2021-Dec-01 16:23:48] [debug] [Backend] - Load library at /opt/SEGGER/JLink/libjlinkarm.so.
[2021-Dec-01 16:23:48] [debug] [Backend] - Library loaded, loading member functions.
[2021-Dec-01 16:23:48] [debug] [Backend] - Member functions succesfully loaded.
[2021-Dec-01 16:23:48] [debug] [Backend] - dll_version
[2021-Dec-01 16:23:48] [debug] [Backend] - Segger dll version 7.58.b loaded.
[2021-Dec-01 16:23:48] [debug] [Backend] - set_core_data
[2021-Dec-01 16:23:48] [debug] [ nRF0x0] - enum_emu_snr
[2021-Dec-01 16:23:48] [debug] [nRFUnknown] - Just_enum_emu_snr
[2021-Dec-01 16:23:48] [debug] [Backend] - enum_emu_snr
[2021-Dec-01 16:23:48] [debug] [Backend] - ---just_enum_emu_snr
[2021-Dec-01 16:23:48] [debug] [Backend] - ---just_get_num_emus
[2021-Dec-01 16:23:48] [debug] [ nRF0x0] - connect_to_emu_with_snr
[2021-Dec-01 16:23:48] [debug] [nRFUnknown] - Just_connect_to_emu_with_snr
[2021-Dec-01 16:23:48] [debug] [Backend] - connect_to_emu_with_snr
[2021-Dec-01 16:23:48] [debug] [Backend] - is_connected_to_emu
[2021-Dec-01 16:23:48] [debug] [Backend] - ---just_enum_emu_snr
[2021-Dec-01 16:23:48] [debug] [Backend] - ---just_get_num_emus
[2021-Dec-01 16:23:48] [debug] [Backend] - ---just_connect_to_emu_with_snr
[2021-Dec-01 16:23:49] [debug] [Backend] - ---just_connect_to_emu_without_snr
[2021-Dec-01 16:23:49] [debug] [Backend] - Segger logging enabled.
[2021-Dec-01 16:23:49] [debug] [  JLink] - [Debug   ] [JLink     ] Firmware: J-Link OB-SAM3U128-V2-NordicSemi compiled Feb  2 2021 16:47:20
[2021-Dec-01 16:23:49] [debug] [  JLink] - [Debug   ] [JLink     ] Firmware: J-Link OB-SAM3U128-V2-NordicSemi compiled Feb  2 2021 16:47:20
[2021-Dec-01 16:23:49] [debug] [  JLink] - [Debug   ] [JLink     ] Hardware: V1.00
[2021-Dec-01 16:23:49] [debug] [  JLink] - [Debug   ] [JLink     ] S/N: 685722965
[2021-Dec-01 16:23:49] [debug] [  JLink] - [Debug   ] [JLink     ] OEM: SEGGER
[2021-Dec-01 16:23:49] [debug] [  JLink] - [Debug   ] [JLink     ] Feature(s): RDI, FlashBP, FlashDL, JFlash, GDB
[2021-Dec-01 16:23:49] [debug] [  JLink] - [Debug   ] [JLink     ] TELNET listener socket opened on port 19021
[2021-Dec-01 16:23:49] [debug] [  JLink] - [Debug   ] [JLink     ] WEBSRV WEBSRV_Init(): Starting webserver thread(s)
[2021-Dec-01 16:23:49] [debug] [  JLink] - [Debug   ] [JLink     ] WEBSRV Webserver running on local port 19080
[2021-Dec-01 16:23:49] [debug] [  JLink] - [Debug   ] [JLink     ] - 2.570ms returns "O.K."  
[2021-Dec-01 16:23:49] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_HasError()  
[2021-Dec-01 16:23:49] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_GetHWStatus(...)  
[2021-Dec-01 16:23:49] [debug] [  JLink] - [Debug   ] [JLink     ] - 0.097ms returns 0  
[2021-Dec-01 16:23:49] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_HasError()  
[2021-Dec-01 16:23:49] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_ExecCommand("SetRestartOnClose = 0", ...).   
[2021-Dec-01 16:23:49] [debug] [  JLink] - [Debug   ] [JLink     ] - 0.003ms returns 0x01  
[2021-Dec-01 16:23:49] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_HasError()  
[2021-Dec-01 16:23:49] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_ExecCommand("DisableFlashDL", ...).   
[2021-Dec-01 16:23:49] [debug] [  JLink] - [Debug   ] [JLink     ] - 0.010ms returns 0x00  
[2021-Dec-01 16:23:49] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_HasError()  
[2021-Dec-01 16:23:49] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_ExecCommand("ExcludeFlashCacheRange 0x0-0xFFFFFFFF", ...).   
[2021-Dec-01 16:23:49] [debug] [  JLink] - [Debug   ] [JLink     ] - 0.003ms returns 0x00  
[2021-Dec-01 16:23:49] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_HasError()  
[2021-Dec-01 16:23:49] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_SetHookUnsecureDialog  
[2021-Dec-01 16:23:49] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_SetHookUnsecureDialog(...)
[2021-Dec-01 16:23:49] [debug] [  JLink] - [Debug   ] [JLink     ] - 0.010ms returns 0  
[2021-Dec-01 16:23:49] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_HasError()  
[2021-Dec-01 16:23:49] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_TIF_Select(JLINKARM_TIF_SWD)  
[2021-Dec-01 16:23:49] [debug] [  JLink] - [Debug   ] [JLink     ] - 0.298ms returns 0x00  
[2021-Dec-01 16:23:49] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_HasError()  
[2021-Dec-01 16:23:49] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_SetSpeed(2000)  
[2021-Dec-01 16:23:49] [debug] [  JLink] - [Debug   ] [JLink     ] - 0.040ms  
[2021-Dec-01 16:23:49] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_HasError()  
[2021-Dec-01 16:23:49] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_GetSN()  
[2021-Dec-01 16:23:49] [debug] [  JLink] - [Debug   ] [JLink     ] - 0.005ms returns 685722965  
[2021-Dec-01 16:23:49] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_HasError()  
[2021-Dec-01 16:23:49] [debug] [Backend] - ---just_load_core_data
[2021-Dec-01 16:23:49] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_ExecCommand("CORESIGHT_SetIndexAHBAPToUse = 0", ...).   
[2021-Dec-01 16:23:49] [debug] [  JLink] - [Debug   ] [JLink     ] - 0.002ms returns 0x00  
[2021-Dec-01 16:23:49] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_HasError()  
[2021-Dec-01 16:23:49] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_ExecCommand("device = Cortex-M4", ...).   
[2021-Dec-01 16:23:49] [debug] [  JLink] - [Debug   ] [JLink     ] XML file found at: /opt/SEGGER/JLink/JLinkDevices.xml 
[2021-Dec-01 16:23:49] [debug] [  JLink] - [Debug   ] [JLink     ] /opt/SEGGER/JLink/JLinkDevices.xml evaluated successfully. 
[2021-Dec-01 16:23:49] [debug] [  JLink] - [Debug   ] [JLink     ] Device "CORTEX-M4" selected.
[2021-Dec-01 16:23:49] [debug] [  JLink] - [Debug   ] [JLink     ] - 15.756ms returns 0x00  
[2021-Dec-01 16:23:49] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_HasError()  
[2021-Dec-01 16:23:49] [debug] [ nRF0x0] - read_connected_emu_snr
[2021-Dec-01 16:23:49] [debug] [nRFUnknown] - Just_read_connected_emu_snr
[2021-Dec-01 16:23:49] [debug] [Backend] - read_connected_emu_snr
[2021-Dec-01 16:23:49] [debug] [Backend] - is_connected_to_emu
[2021-Dec-01 16:23:49] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_IsOpen()  
[2021-Dec-01 16:23:49] [debug] [  JLink] - [Debug   ] [JLink     ] - 0.005ms returns 0x01  
[2021-Dec-01 16:23:49] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_HasError()  
[2021-Dec-01 16:23:49] [debug] [ nRF0x0] - read_device_family
[2021-Dec-01 16:23:49] [debug] [nRFUnknown] - Just_read_device_family
[2021-Dec-01 16:23:49] [debug] [Backend] - is_connected_to_emu
[2021-Dec-01 16:23:49] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_IsOpen()  
[2021-Dec-01 16:23:49] [debug] [  JLink] - [Debug   ] [JLink     ] - 0.004ms returns 0x01  
[2021-Dec-01 16:23:49] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_HasError()  
[2021-Dec-01 16:23:49] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_Lock()  
[2021-Dec-01 16:23:49] [debug] [Backend] - read_debug_port_idr
[2021-Dec-01 16:23:49] [debug] [Backend] - read_debug_port_register
[2021-Dec-01 16:23:49] [debug] [Backend] - ---just_read_debug_port_register
[2021-Dec-01 16:23:49] [debug] [Backend] - coresight_configure
[2021-Dec-01 16:23:49] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_CORESIGHT_Configure()  
[2021-Dec-01 16:23:49] [debug] [  JLink] - [Debug   ] [JLink     ] - 100.967ms returns 0  
[2021-Dec-01 16:23:49] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_HasError()  
[2021-Dec-01 16:23:49] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_CORESIGHT_ReadAPDPReg(DP reg 0x00)  
[2021-Dec-01 16:23:49] [debug] [  JLink] - [Debug   ] [JLink     ] failed
[2021-Dec-01 16:23:49] [debug] [  JLink] - [Debug   ] [JLink     ] - 1.059ms returns -1  
[2021-Dec-01 16:23:49] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_HasError()  
[2021-Dec-01 16:23:49] [debug] [Backend] - JLinkARM.dll reported "-1", an unknown error.
[2021-Dec-01 16:23:49] [debug] [Backend] - ---just_abort_debug_action
[2021-Dec-01 16:23:49] [debug] [Backend] - Attempting to clear any configuration errors in debug port before closing connection. 
[2021-Dec-01 16:23:49] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
[2021-Dec-01 16:23:49] [debug] [  JLink] - [Debug   ] [JLink     ] - 1.080ms returns -1  
[2021-Dec-01 16:23:49] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_HasError()  
[2021-Dec-01 16:23:49] [debug] [Backend] - JLinkARM.dll reported "-1", an unknown error.
[2021-Dec-01 16:23:49] [debug] [  JLink] - [Debug   ] [JLink     ] - 0.065ms  
[2021-Dec-01 16:23:49] [debug] [ nRF0x0] - close_dll
[2021-Dec-01 16:23:49] [debug] [nRFUnknown] - Just_close_dll
[2021-Dec-01 16:23:49] [debug] [Backend] - close
[2021-Dec-01 16:23:49] [debug] [Backend] - disconnect_from_emu
[2021-Dec-01 16:23:49] [debug] [Backend] - is_connected_to_emu
[2021-Dec-01 16:23:49] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_IsOpen()  
[2021-Dec-01 16:23:49] [debug] [  JLink] - [Debug   ] [JLink     ] - 0.019ms returns 0x01  
[2021-Dec-01 16:23:49] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_HasError()  
[2021-Dec-01 16:23:49] [debug] [Backend] - ---just_disconnect_from_emu
[2021-Dec-01 16:23:49] [debug] [Backend] - is_connected_to_device
[2021-Dec-01 16:23:49] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_IsConnected()  
[2021-Dec-01 16:23:49] [debug] [  JLink] - [Debug   ] [JLink     ] - 0.017ms returns FALSE  
[2021-Dec-01 16:23:49] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_HasError()  
[2021-Dec-01 16:23:49] [debug] [Backend] - ---just_is_debug_region_powered
[2021-Dec-01 16:23:49] [debug] [Backend] - ---just_read_debug_port_register
[2021-Dec-01 16:23:49] [debug] [Backend] - is_connected_to_emu
[2021-Dec-01 16:23:49] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_IsOpen()  
[2021-Dec-01 16:23:49] [debug] [  JLink] - [Debug   ] [JLink     ] - 0.017ms returns 0x01  
[2021-Dec-01 16:23:49] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_HasError()  
[2021-Dec-01 16:23:49] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_Lock()  
[2021-Dec-01 16:23:49] [debug] [Backend] - ---just_write_debug_port_register
[2021-Dec-01 16:23:49] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)  
[2021-Dec-01 16:23:49] [debug] [  JLink] - [Debug   ] [JLink     ] - 0.930ms returns -1  
[2021-Dec-01 16:23:49] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_HasError()  
[2021-Dec-01 16:23:49] [debug] [Backend] - JLinkARM.dll reported "-1", an unknown error.
[2021-Dec-01 16:23:49] [debug] [Backend] - ---just_abort_debug_action
[2021-Dec-01 16:23:49] [debug] [Backend] - Attempting to clear any configuration errors in debug port before closing connection. 
[2021-Dec-01 16:23:49] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
[2021-Dec-01 16:23:49] [debug] [  JLink] - [Debug   ] [JLink     ] - 0.874ms returns -1  
[2021-Dec-01 16:23:49] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_HasError()  
[2021-Dec-01 16:23:49] [debug] [Backend] - JLinkARM.dll reported "-1", an unknown error.
[2021-Dec-01 16:23:49] [debug] [  JLink] - [Debug   ] [JLink     ] - 0.049ms  
[2021-Dec-01 16:23:49] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_Close()  
[2021-Dec-01 16:23:49] [debug] [Backend] - Segger Backend closed.

The error seems to be from

 86 [2021-Dec-01 17:03:44] [debug] [Backend] - coresight_configure                                                                                                      
 87 [2021-Dec-01 17:03:44] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_CORESIGHT_Configure()                                                                      
 88 [2021-Dec-01 17:03:44] [debug] [  JLink] - [Debug   ] [JLink     ] - 101.259ms returns 0                                                                            
 89 [2021-Dec-01 17:03:44] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_HasError()                                                                                 
 90 [2021-Dec-01 17:03:44] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_CORESIGHT_ReadAPDPReg(DP reg 0x00)                                                         
 91 [2021-Dec-01 17:03:44] [debug] [  JLink] - [Debug   ] [JLink     ] failed                                                                                           
 92 [2021-Dec-01 17:03:44] [debug] [  JLink] - [Debug   ] [JLink     ] - 0.949ms returns -1                                                                             
 93 [2021-Dec-01 17:03:44] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_HasError()                                                                                 
 94 [2021-Dec-01 17:03:44] [debug] [Backend] - JLinkARM.dll reported "-1", an unknown error.

What can I do?

Parents Reply
  • Hi,

    Can you double check the voltage on the RESET pin? The pin is active low, which means that 0V on the RESET pin means that the CPU is kept in reset state which is obviously not good. 

    What example folder of the blinky project are you using?  Could you:

    1. do a full erase with nrfjprog: nrfjprog --erase
    2. Disconnect any external signal that might be connected to the Reset pin. 
    3. Program the PCA10010 folder of the blinky project from the SDK

    regards

    Jared

Children
  • Hi,

    Thanks for your time,

    I double checked the RESET pin with another voltmeter: 0.02V with VDD on SW9.

    I am using nRF5_SDK_17.1.0_ddde560/examples/peripheral/blinky/pca10100e/blank/armgcc

    1. Unfortunately, I get this error: ERROR: JLinkARM DLL reported an error. Try again.
    2. OK
    3. That is what I tested and I was able to flash 3 times but 150 tries

    Regards

  • Hi,

    I see. I took another look at your log and see that there is a TELNET session. Are you doing this remotely? If so, could you try re-doing it by connecting the DK directly to the USB port in your computer? Do not use any USB hubs either. The issue could be related to the Segger drivers.

    Also, I see that you flash the nRF52820 hex instead of the nRF52833 hex? 

    regards

    Jared 

  • Hello,

    After hours of debugging and headaches, I managed to find the flaw.

    The most complicated task was to find the correct documentation for the dev kit, especially the wiring of the board (will add the link here for other customers nRF52833 Development Kit - Hardware files 1_0_0/PCA10100-nRF52833 Development Board 1_0_0/Schematic_Layout pdf files/PCA10100_Schematic_And_PCB.pdf).

    By chance, I found that P25 (DEBUG IN) is a bridge for U1, using a multi-meter to check the continuity of the circuit (I doubted everything at this point), I soldered wires to P25, using an external Jlink on this instead of the USB and used pyocd instead of the Makefile with nrfjprog, I managed to erase and flash a new firmware on it, without any problem.

    To sum up: I soldered wires directly on the nearest pins to the nRF chip, and used a Jlink to flash the firmware using pyocd.

    Note: I don't have the link of the archive for the PDF, I only have the file itself which I can't upload here.

    For P20, P25 and U1 ref: https://infocenter.nordicsemi.com/topic/ug_nrf52840_dk/UG/dk/images/nRF52840/pca10056_vext_nrf_switch.svg

    I don't know why you mentioned telnet though?

Related