Cannot flash nRF52811 (sometimes)

Hello,

I have a problem regarding production flashing a nRF52811 device.
We are using a Segger Flasher Compact, but I also tried a Segger J-Link Compact.
To flash we are using a ubuntu PC with nrfjprog with the following version:

nrfjprog version: 10.17.3 external
JLinkARM.dll version: 7.70a

Sometimes, but not always I cannot flash
Using this command:

nrfjprog  --log --family NRF52 --clockspeed 800 --program firmware.hex --chiperase  --verify


The output is:

[error]: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".

Sometimes I then can recover from this state if I erase the chip:

nrfjprog -f nrf52 -e --clockspeed 100

But this does not always work.
It seemed like the --clockspeed would make a difference, sometimes it did not work if I erased the chip with --clockspeed 8000, somttimes it worked if I then tried it with 800kHz, or 100kHz

I attached the nrfjprog.log

It's getting interesting at line 173:
After the command

JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)

the JLink reports an error.

What could this be?

[ info] --------------------------------------------------------------------------------
[ info] nrfjprog --log --snr 1015000641 --family NRF52 --clockspeed 800 --program firmware.hex --chiperase --verify 
[ info] nrfjprog version 10.17.3 external
[ info] --------------------------------------------------------------------------------
[ info] Load library at optnrf-command-line-toolsliblibnrfjprogdll.so.
[ info] Library loaded, loading member functions.
[ info] Member functions succesfully loaded.
[debug] [ Client] - open
[debug] [ Client] - start
[ info] [ Client] - stdout Jlinkarm nRF Worker ready. Handling sequence 8241bc77-b6ac-4310-8866-f378db4177bc.
[debug] [SeggerBackend] - Logger sink registered in Segger backend logger
[debug] [  JLink] - Logger sink registered in JLink logger
[debug] [  nRF52] - open
[debug] [  nRF52] - just_check_family
[debug] [SeggerBackend] - open_dll
[debug] [SeggerBackend] - No J-Link DLL path was provided. Attempting to auto detect.
[trace] [ Client] - Command open executed for 3 milliseconds with result 0
[debug] [ Client] - config
[trace] [ Client] - Command config executed for 1 milliseconds with result 0
[debug] [ Client] - enum_emu_snr
[ info] [SeggerBackend] - Load library at optSEGGERJLinklibjlinkarm.so.
[ info] [SeggerBackend] - Library loaded, loading member functions.
[ info] [SeggerBackend] - Member functions succesfully loaded.
[debug] [SeggerBackend] - Set batch mode
[debug] [SeggerBackend] - dll_version
[ info] [SeggerBackend] - Segger dll version 7.70.a loaded.
[trace] [ Worker] - Command open executed for 2 milliseconds with result 0
[debug] [  nRF52] - config
[trace] [ Worker] - Command config executed for 1 milliseconds with result 0

[debug] [  nRF52] - enum_emu_con_info

[debug] [SeggerBackend] - is_connected_to_emu

[debug] [SeggerBackend] - enum_emu_con_info

[trace] [ Client] - Command enum_emu_con_info executed for 155 milliseconds with result 0
[debug] [ Client] - connect_to_emu_with_snr
[debug] [SeggerBackend] - is_connected_to_emu

[trace] [ Worker] - Command enum_emu_con_info executed for 155 milliseconds with result 0

[debug] [  nRF52] - connect_to_emu_with_snr

[debug] [SeggerBackend] - is_connected_to_emu

[debug] [SeggerBackend] - connect_to_emu_with_snr

[debug] [SeggerBackend] - is_connected_to_emu

[debug] [SeggerBackend] - ---just_enum_emu_snr

[debug] [SeggerBackend] - ---just_get_num_emus

[debug] [SeggerBackend] - ---just_connect_to_emu_with_snr

[debug] [SeggerBackend] - ---just_connect_to_emu_without_snr

[debug] [SeggerBackend] - Segger logging enabled.

[trace] [  JLink] - Firmware J-Link  Flasher Compact V5 compiled Aug  9 2022 132032

[trace] [  JLink] - Firmware J-Link  Flasher Compact V5 compiled Aug  9 2022 132032

[trace] [  JLink] - Hardware V5.00

[trace] [  JLink] - SN 1015000641

[trace] [  JLink] - OEM SEGGER

[trace] [  JLink] - Feature(s) JFlash, GDB

[trace] [  JLink] - USB speed mode High speed (480 MBits)

[trace] [  JLink] - TELNET listener socket opened on port 19021

[trace] [  JLink] - WEBSRV WEBSRV_Init() Starting webserver thread(s)

[trace] [  JLink] - WEBSRV Webserver running on local port 19080

[trace] [  JLink] - - 8.176ms returns O.K.  

[trace] [  JLink] - JLINK_HasError()  

[trace] [  JLink] - JLINK_Lock()  

[trace] [  JLink] - JLINK_ExecCommand(SetRestartOnClose = 0, ...).   

[trace] [  JLink] - - 0.006ms returns 0x01  

[trace] [  JLink] - JLINK_HasError()  

[trace] [  JLink] - JLINK_ExecCommand(DisableFlashDL, ...).   

[trace] [  JLink] - - 0.004ms returns 0x00  

[trace] [  JLink] - JLINK_HasError()  

[trace] [  JLink] - JLINK_ExecCommand(ExcludeFlashCacheRange 0x0-0xFFFFFFFF, ...).   

[trace] [  JLink] - - 0.004ms returns 0x00  

[trace] [  JLink] - JLINK_HasError()  

[trace] [  JLink] - JLINK_SetHookUnsecureDialog  

[trace] [  JLink] - JLINK_SetHookUnsecureDialog(...)

[trace] [  JLink] - - 0.018ms returns 0  

[trace] [  JLink] - JLINK_HasError()  

[trace] [  JLink] - JLINK_TIF_Select(JLINKARM_TIF_SWD)  

[trace] [  JLink] - - 0.320ms returns 0x00  

[trace] [  JLink] - JLINK_HasError()  

[trace] [  JLink] - JLINK_GetSpeedInfo()  

[trace] [  JLink] - 1600000000 Hz  n, n = 32

[trace] [  JLink] - - 0.016ms  

[trace] [  JLink] - JLINK_HasError()  

[debug] [SeggerBackend] - Connected emulator supports SWD speeds up to 50000kHz

[trace] [  JLink] - JLINK_SetSpeed(800)  

[trace] [  JLink] - - 0.050ms  

[trace] [  JLink] - JLINK_HasError()  

[trace] [  JLink] - JLINK_GetSpeed()  

[trace] [  JLink] - - 0.008ms returns 800  

[trace] [  JLink] - JLINK_HasError()  

[debug] [SeggerBackend] - SWD clock set to 800kHz

[trace] [  JLink] - JLINK_GetSN()  

[trace] [  JLink] - - 0.008ms returns 1015000641  

[trace] [  JLink] - JLINK_HasError()  

[debug] [SeggerBackend] - read_debug_port_idr

[debug] [SeggerBackend] - read_debug_port_register

[debug] [SeggerBackend] - ---just_read_debug_port_register

[debug] [SeggerBackend] - coresight_configure

[trace] [  JLink] - JLINK_GetHWStatus(...)  

[trace] [  JLink] - - 0.105ms returns 0  

[trace] [  JLink] - JLINK_HasError()  

[trace] [  JLink] - JLINK_CORESIGHT_Configure()  

[trace] [  JLink] - - 102.357ms returns 0  

[trace] [  JLink] - JLINK_HasError()  

[debug] [SeggerBackend] - ---just_select_debug_port_register

[debug] [SeggerBackend] - Select AP 255, DP Bank 0, AP Bank 255

[trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)  

[trace] [  JLink] - - 1.005ms returns -1  

[trace] [  JLink] - JLINK_HasError()  

[error] [SeggerBackend] - JLinkARM.dll reported -1, An unknown error..

[debug] [SeggerBackend] - ---just_abort_debug_action

[debug] [SeggerBackend] - Attempting to clear any configuration errors in debug port before closing connection. 

[trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  

[trace] [  JLink] - - 1.029ms returns -1  

[trace] [  JLink] - JLINK_HasError()  

[error] [SeggerBackend] - JLinkARM.dll reported -1, An unknown error..

[trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  

[trace] [  JLink] - - 0.947ms returns -1  

[trace] [  JLink] - JLINK_HasError()  

[error] [SeggerBackend] - JLinkARM.dll reported -1, An unknown error..

[trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  

[trace] [  JLink] - - 0.961ms returns -1  

[trace] [  JLink] - JLINK_HasError()  

[error] [SeggerBackend] - JLinkARM.dll reported -1, An unknown error..

[trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  

[trace] [  JLink] - - 0.983ms returns -1  

[trace] [  JLink] - JLINK_HasError()  

[error] [SeggerBackend] - JLinkARM.dll reported -1, An unknown error..

[trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  

[trace] [  JLink] - - 0.987ms returns -1  

[trace] [  JLink] - JLINK_HasError()  

[error] [SeggerBackend] - JLinkARM.dll reported -1, An unknown error..

[trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)  

[trace] [  JLink] - - 0.902ms returns -1  

[trace] [  JLink] - JLINK_HasError()  

[error] [SeggerBackend] - JLinkARM.dll reported -1, An unknown error..

[debug] [SeggerBackend] - ---just_abort_debug_action

[debug] [SeggerBackend] - Attempting to clear any configuration errors in debug port before closing connection. 

[trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  

[trace] [  JLink] - - 0.883ms returns -1  

[trace] [  JLink] - JLINK_HasError()  

[error] [SeggerBackend] - JLinkARM.dll reported -1, An unknown error..

[trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  

[trace] [  JLink] - - 0.924ms returns -1  

[trace] [  JLink] - JLINK_HasError()  

[error] [SeggerBackend] - JLinkARM.dll reported -1, An unknown error..

[trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  

[trace] [  JLink] - - 0.931ms returns -1  

[trace] [  JLink] - JLINK_HasError()  

[error] [SeggerBackend] - JLinkARM.dll reported -1, An unknown error..

[trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  

[trace] [  JLink] - - 0.912ms returns -1  

[trace] [  JLink] - JLINK_HasError()  

[error] [SeggerBackend] - JLinkARM.dll reported -1, An unknown error..

[trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  

[trace] [  JLink] - - 1.028ms returns -1  

[trace] [  JLink] - JLINK_HasError()  

[error] [SeggerBackend] - JLinkARM.dll reported -1, An unknown error..

[trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)  

[trace] [  JLink] - - 1.024ms returns -1  

[trace] [  JLink] - JLINK_HasError()  

[error] [SeggerBackend] - JLinkARM.dll reported -1, An unknown error..

[debug] [SeggerBackend] - ---just_abort_debug_action

[debug] [SeggerBackend] - Attempting to clear any configuration errors in debug port before closing connection. 

[trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  

[trace] [  JLink] - - 1.028ms returns -1  

[trace] [  JLink] - JLINK_HasError()  

[error] [SeggerBackend] - JLinkARM.dll reported -1, An unknown error..

[trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  

[trace] [  JLink] - - 0.955ms returns -1  

[trace] [  JLink] - JLINK_HasError()  

[error] [SeggerBackend] - JLinkARM.dll reported -1, An unknown error..

[trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  

[trace] [  JLink] - - 0.912ms returns -1  

[trace] [  JLink] - JLINK_HasError()  

[error] [SeggerBackend] - JLinkARM.dll reported -1, An unknown error..

[trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  

[trace] [  JLink] - - 0.868ms returns -1  

[trace] [  JLink] - JLINK_HasError()  

[error] [SeggerBackend] - JLinkARM.dll reported -1, An unknown error..

[trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  

[trace] [  JLink] - - 0.871ms returns -1  

[trace] [  JLink] - JLINK_HasError()  

[error] [SeggerBackend] - JLinkARM.dll reported -1, An unknown error..

[trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)  

[trace] [  JLink] - - 0.945ms returns -1  

[trace] [  JLink] - JLINK_HasError()  

[error] [SeggerBackend] - JLinkARM.dll reported -1, An unknown error..

[debug] [SeggerBackend] - ---just_abort_debug_action

[debug] [SeggerBackend] - Attempting to clear any configuration errors in debug port before closing connection. 

[trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  

[trace] [  JLink] - - 0.882ms returns -1  

[trace] [  JLink] - JLINK_HasError()  

[error] [SeggerBackend] - JLinkARM.dll reported -1, An unknown error..

[trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  

[trace] [  JLink] - - 0.918ms returns -1  

[trace] [  JLink] - JLINK_HasError()  

[error] [SeggerBackend] - JLinkARM.dll reported -1, An unknown error..

[trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  

[trace] [  JLink] - - 0.928ms returns -1  

[trace] [  JLink] - JLINK_HasError()  

[error] [SeggerBackend] - JLinkARM.dll reported -1, An unknown error..

[trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  

[trace] [  JLink] - - 0.896ms returns -1  

[trace] [  JLink] - JLINK_HasError()  

[error] [SeggerBackend] - JLinkARM.dll reported -1, An unknown error..

[trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  

[trace] [  JLink] - - 0.952ms returns -1  

[trace] [  JLink] - JLINK_HasError()  

[error] [SeggerBackend] - JLinkARM.dll reported -1, An unknown error..

[trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)  

[trace] [  JLink] - - 0.917ms returns -1  

[trace] [  JLink] - JLINK_HasError()  

[error] [SeggerBackend] - JLinkARM.dll reported -1, An unknown error..

[debug] [SeggerBackend] - ---just_abort_debug_action

[debug] [SeggerBackend] - Attempting to clear any configuration errors in debug port before closing connection. 

[trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  

[trace] [ Client] - Command connect_to_emu_with_snr executed for 601 milliseconds with result -102
[trace] [  JLink] - - 0.862ms returns -1  

[trace] [  JLink] - JLINK_HasError()  

[error] [SeggerBackend] - JLinkARM.dll reported -1, An unknown error..

[trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  

[trace] [  JLink] - - 0.834ms returns -1  

[trace] [  JLink] - JLINK_HasError()  

[error] [SeggerBackend] - JLinkARM.dll reported -1, An unknown error..

[trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  

[trace] [  JLink] - - 0.821ms returns -1  

[trace] [  JLink] - JLINK_HasError()  

[error] [SeggerBackend] - JLinkARM.dll reported -1, An unknown error..

[trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  

[trace] [  JLink] - - 0.865ms returns -1  

[trace] [  JLink] - JLINK_HasError()  

[error] [SeggerBackend] - JLinkARM.dll reported -1, An unknown error..

[trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  

[trace] [  JLink] - - 0.869ms returns -1  

[trace] [  JLink] - JLINK_HasError()  

[error] [SeggerBackend] - JLinkARM.dll reported -1, An unknown error..

[trace] [  JLink] - - 0.025ms  

[trace] [ Worker] - Command connect_to_emu_with_snr executed for 601 milliseconds with result -102

[debug] [  nRF52] - close

[debug] [SeggerBackend] - is_connected_to_emu

[trace] [  JLink] - JLINK_IsOpen()  

[trace] [  JLink] - - 0.015ms returns 0x01  

[trace] [  JLink] - JLINK_HasError()  

[trace] [  JLink] - JLINK_Lock()  

[debug] [SeggerBackend] - close

[debug] [SeggerBackend] - disconnect_from_emu

[debug] [SeggerBackend] - ---just_disconnect_from_emu

[debug] [SeggerBackend] - is_connected_to_device

[trace] [  JLink] - JLINK_IsConnected()  

[trace] [  JLink] - - 0.012ms returns FALSE  

[trace] [  JLink] - JLINK_HasError()  

[debug] [SeggerBackend] - ---just_is_debug_region_powered

[debug] [SeggerBackend] - ---just_read_debug_port_register

[debug] [SeggerBackend] - ---just_select_debug_port_register

[debug] [SeggerBackend] - Select AP 255, DP Bank 0, AP Bank 255

[trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)  

[trace] [  JLink] - - 0.835ms returns -1  

[trace] [  JLink] - JLINK_HasError()  

[error] [SeggerBackend] - JLinkARM.dll reported -1, An unknown error..

[debug] [SeggerBackend] - ---just_abort_debug_action

[debug] [SeggerBackend] - Attempting to clear any configuration errors in debug port before closing connection. 

[trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  

[trace] [  JLink] - - 0.851ms returns -1  

[trace] [  JLink] - JLINK_HasError()  

[error] [SeggerBackend] - JLinkARM.dll reported -1, An unknown error..

[trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  

[trace] [  JLink] - - 0.888ms returns -1  

[trace] [  JLink] - JLINK_HasError()  

[error] [SeggerBackend] - JLinkARM.dll reported -1, An unknown error..

[trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  

[trace] [  JLink] - - 0.929ms returns -1  

[trace] [  JLink] - JLINK_HasError()  

[error] [SeggerBackend] - JLinkARM.dll reported -1, An unknown error..

[trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  

[trace] [  JLink] - - 0.957ms returns -1  

[trace] [  JLink] - JLINK_HasError()  

[error] [SeggerBackend] - JLinkARM.dll reported -1, An unknown error..

[trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  

[trace] [  JLink] - - 0.860ms returns -1  

[trace] [  JLink] - JLINK_HasError()  

[error] [SeggerBackend] - JLinkARM.dll reported -1, An unknown error..

[trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)  

[trace] [  JLink] - - 0.872ms returns -1  

[trace] [  JLink] - JLINK_HasError()  

[error] [SeggerBackend] - JLinkARM.dll reported -1, An unknown error..

[debug] [SeggerBackend] - ---just_abort_debug_action

[debug] [SeggerBackend] - Attempting to clear any configuration errors in debug port before closing connection. 

[trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  

[trace] [  JLink] - - 0.839ms returns -1  

[trace] [  JLink] - JLINK_HasError()  

[error] [SeggerBackend] - JLinkARM.dll reported -1, An unknown error..

[trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  

[trace] [  JLink] - - 0.841ms returns -1  

[trace] [  JLink] - JLINK_HasError()  

[error] [SeggerBackend] - JLinkARM.dll reported -1, An unknown error..

[trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  

[trace] [  JLink] - - 0.853ms returns -1  

[trace] [  JLink] - JLINK_HasError()  

[error] [SeggerBackend] - JLinkARM.dll reported -1, An unknown error..

[trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  

[trace] [  JLink] - - 0.887ms returns -1  

[trace] [  JLink] - JLINK_HasError()  

[error] [SeggerBackend] - JLinkARM.dll reported -1, An unknown error..

[trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  

[trace] [  JLink] - - 0.928ms returns -1  

[trace] [  JLink] - JLINK_HasError()  

[error] [SeggerBackend] - JLinkARM.dll reported -1, An unknown error..

[trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)  

[trace] [  JLink] - - 0.912ms returns -1  

[trace] [  JLink] - JLINK_HasError()  

[error] [SeggerBackend] - JLinkARM.dll reported -1, An unknown error..

[debug] [SeggerBackend] - ---just_abort_debug_action

[debug] [SeggerBackend] - Attempting to clear any configuration errors in debug port before closing connection. 

[trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  

[trace] [  JLink] - - 0.897ms returns -1  

[trace] [  JLink] - JLINK_HasError()  

[error] [SeggerBackend] - JLinkARM.dll reported -1, An unknown error..

[trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  

[trace] [  JLink] - - 0.939ms returns -1  

[trace] [  JLink] - JLINK_HasError()  

[error] [SeggerBackend] - JLinkARM.dll reported -1, An unknown error..

[trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  

[trace] [  JLink] - - 0.944ms returns -1  

[trace] [  JLink] - JLINK_HasError()  

[error] [SeggerBackend] - JLinkARM.dll reported -1, An unknown error..

[trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  

[trace] [  JLink] - - 0.920ms returns -1  

[trace] [  JLink] - JLINK_HasError()  

[error] [SeggerBackend] - JLinkARM.dll reported -1, An unknown error..

[trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  

[trace] [  JLink] - - 0.893ms returns -1  

[trace] [  JLink] - JLINK_HasError()  

[error] [SeggerBackend] - JLinkARM.dll reported -1, An unknown error..

[trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)  

[trace] [  JLink] - - 0.840ms returns -1  

[trace] [  JLink] - JLINK_HasError()  

[error] [SeggerBackend] - JLinkARM.dll reported -1, An unknown error..

[debug] [SeggerBackend] - ---just_abort_debug_action

[debug] [SeggerBackend] - Attempting to clear any configuration errors in debug port before closing connection. 

[trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  

[trace] [  JLink] - - 0.875ms returns -1  

[trace] [  JLink] - JLINK_HasError()  

[error] [SeggerBackend] - JLinkARM.dll reported -1, An unknown error..

[trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  

[trace] [  JLink] - - 0.971ms returns -1  

[trace] [  JLink] - JLINK_HasError()  

[error] [SeggerBackend] - JLinkARM.dll reported -1, An unknown error..

[trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  

[trace] [  JLink] - - 0.880ms returns -1  

[trace] [  JLink] - JLINK_HasError()  

[error] [SeggerBackend] - JLinkARM.dll reported -1, An unknown error..

[trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  

[trace] [  JLink] - - 0.858ms returns -1  

[trace] [  JLink] - JLINK_HasError()  

[error] [SeggerBackend] - JLinkARM.dll reported -1, An unknown error..

[trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  

[trace] [  JLink] - - 0.840ms returns -1  

[trace] [  JLink] - JLINK_HasError()  

[error] [SeggerBackend] - JLinkARM.dll reported -1, An unknown error..

[trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)  

[trace] [  JLink] - - 0.915ms returns -1  

[trace] [  JLink] - JLINK_HasError()  

[error] [SeggerBackend] - JLinkARM.dll reported -1, An unknown error..

[debug] [SeggerBackend] - ---just_abort_debug_action

[debug] [SeggerBackend] - Attempting to clear any configuration errors in debug port before closing connection. 

[trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  

[trace] [  JLink] - - 0.872ms returns -1  

[trace] [  JLink] - JLINK_HasError()  

[error] [SeggerBackend] - JLinkARM.dll reported -1, An unknown error..

[trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  

[trace] [  JLink] - - 0.879ms returns -1  

[trace] [  JLink] - JLINK_HasError()  

[error] [SeggerBackend] - JLinkARM.dll reported -1, An unknown error..

[trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  

[trace] [  JLink] - - 0.917ms returns -1  

[trace] [  JLink] - JLINK_HasError()  

[error] [SeggerBackend] - JLinkARM.dll reported -1, An unknown error..

[trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  

[trace] [  JLink] - - 0.883ms returns -1  

[trace] [  JLink] - JLINK_HasError()  

[error] [SeggerBackend] - JLinkARM.dll reported -1, An unknown error..

[trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  

[trace] [  JLink] - - 0.929ms returns -1  

[trace] [  JLink] - JLINK_HasError()  

[error] [SeggerBackend] - JLinkARM.dll reported -1, An unknown error..

[trace] [  JLink] - - 0.043ms  

[trace] [  JLink] - JLINK_Close()  

[debug] [SeggerBackend] - Segger Backend closed.

[debug] [  nRF52] - nRF family DLL closed

[trace] [ Client] - Command close executed for 54 milliseconds with result 0
[debug] [ Client] - terminate
[trace] [ Client] - Command terminate executed for 0 milliseconds with result 0
[trace] [ Worker] - Command close executed for 54 milliseconds with result 0

[trace] [ Worker] - Command terminate executed for 0 milliseconds with result 0

[trace] [ Worker] - Executed 6 commands for 813 milliseconds

[debug] [ Client] - Child process terminated with result 0
[debug] [ Client] - Worker process exited with code 0
[debug] [ Client] - Worker process exited with code 0
[trace] [ Client] - Executed 6 commands for 814 milliseconds
[debug] [ Client] - terminate

Parents
  • Hi,

     

    Q1: Does this issue occur on one device, or with all devices?

    Q2: If it works when using a slower clock speed, it can indicate that there's an issue electrically (long wires, high capacitance on the lines, or similar). In your design, is the SWD pins directly routed to the programming header? Ie. is there any capacitors or resistors on these lines?

     

    Kind regards,

    Håkon

Reply
  • Hi,

     

    Q1: Does this issue occur on one device, or with all devices?

    Q2: If it works when using a slower clock speed, it can indicate that there's an issue electrically (long wires, high capacitance on the lines, or similar). In your design, is the SWD pins directly routed to the programming header? Ie. is there any capacitors or resistors on these lines?

     

    Kind regards,

    Håkon

Children
No Data
Related