[SOLVED] How to recover nRF9160?

I am working on a custom board with multiple nRF chips, one of which is a nRF9160.  While developing the BSP for the 9160, I accidentally swapped the MOSI MISO pins on a SPI interface and ran some test code.  Now the chip is unresponsive.  I have tried recovering the chip with `nrfjprog --family NRF91 --recover --log`, but I get the following error.  

Recovering device. This operation might take 30s.
[error] [ Client] - Encountered error -21: Command recover executed for 120 milliseconds with result -21
[error] [ Worker] - Encountered unexpected debug port ID 0, expected 6
ERROR: Recover failed. Please make sure that the correct device family is given
ERROR: and try again.
[error] [ Client] - Encountered error -5: Command read_device_info executed for 114 milliseconds with result -5
[error] [ Worker] - Encountered unexpected debug port ID 0, expected 6
[error] [ Client] - Encountered error -102: Command read_memory_descriptors executed for 18 milliseconds with result -102
Failed to read device memories.
[error] [ Worker] - 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.
NOTE: For additional output, try running again with logging enabled (--log).
NOTE: Any generated log error messages will be displayed.

The log from above is the following

[2023-Jun-12 09:07:04] [debug] --------------------------------------------------------------------------------
[2023-Jun-12 09:07:04] [debug] nrfjprog --family NRF91 --recover --log 
[2023-Jun-12 09:07:04] [debug] nrfjprog version 10.21.0 external
[2023-Jun-12 09:07:04] [debug] --------------------------------------------------------------------------------
[2023-Jun-12 09:07:04] [ info] Load library at /opt/nrf5x-command-line-tools/lib/libnrfjprogdll.so.
[2023-Jun-12 09:07:04] [ info] Library loaded, loading member functions.
[2023-Jun-12 09:07:04] [ info] Member functions succesfully loaded.
[2023-Jun-12 09:07:04] [debug] [ Client] - open
[2023-Jun-12 09:07:04] [debug] [ Client] - start
[2023-Jun-12 09:07:04] [ info] [ Client] - stdout: Jlinkarm nRF Worker ready. Handling sequence d89f11a0-230b-4780-957f-f4c6773614dd.
[2023-Jun-12 09:07:04] [debug] [SeggerBackend] - Logger sink registered in Segger backend logger
[2023-Jun-12 09:07:04] [debug] [  JLink] - Logger sink registered in JLink logger
[2023-Jun-12 09:07:04] [debug] [  nRF91] - open
[2023-Jun-12 09:07:04] [debug] [  nRF91] - just_check_family
[2023-Jun-12 09:07:04] [debug] [SeggerBackend] - open_dll
[2023-Jun-12 09:07:04] [debug] [SeggerBackend] - No J-Link DLL path was provided. Attempting to auto detect.
[2023-Jun-12 09:07:04] [trace] [ Client] - Command open executed for 7 milliseconds with result 0
[2023-Jun-12 09:07:04] [debug] [ Client] - config
[2023-Jun-12 09:07:04] [ info] [SeggerBackend] - Load library at /opt/SEGGER/JLink/libjlinkarm.so.7.
[2023-Jun-12 09:07:04] [ info] [SeggerBackend] - Library loaded, loading member functions.
[2023-Jun-12 09:07:04] [ info] [SeggerBackend] - Member functions succesfully loaded.
[2023-Jun-12 09:07:04] [debug] [SeggerBackend] - Set batch mode
[2023-Jun-12 09:07:04] [debug] [SeggerBackend] - dll_version
[2023-Jun-12 09:07:04] [ info] [SeggerBackend] - Segger dll version 7.88.e loaded.
[2023-Jun-12 09:07:04] [trace] [ Worker] - Command open executed for 5 milliseconds with result 0
[2023-Jun-12 09:07:04] [debug] [  nRF91] - config
[2023-Jun-12 09:07:04] [trace] [ Client] - Command config executed for 5 milliseconds with result 0
[2023-Jun-12 09:07:04] [debug] [ Client] - enum_emu_snr
[2023-Jun-12 09:07:04] [debug] [SeggerBackend] - enum_emu_snr
[2023-Jun-12 09:07:04] [trace] [ Worker] - Command config executed for 5 milliseconds with result 0
[2023-Jun-12 09:07:04] [debug] [  nRF91] - enum_emu_con_info
[2023-Jun-12 09:07:04] [debug] [SeggerBackend] - is_connected_to_emu
[2023-Jun-12 09:07:04] [debug] [SeggerBackend] - enum_emu_con_info
[2023-Jun-12 09:07:04] [trace] [ Client] - Command enum_emu_con_info executed for 168 milliseconds with result 0
[2023-Jun-12 09:07:04] [debug] [ Client] - connect_to_emu_with_snr
[2023-Jun-12 09:07:04] [debug] [SeggerBackend] - is_connected_to_emu
[2023-Jun-12 09:07:04] [trace] [ Worker] - Command enum_emu_con_info executed for 168 milliseconds with result 0
[2023-Jun-12 09:07:04] [debug] [  nRF91] - connect_to_emu_with_snr
[2023-Jun-12 09:07:04] [debug] [SeggerBackend] - is_connected_to_emu
[2023-Jun-12 09:07:04] [debug] [SeggerBackend] - connect_to_emu_with_snr
[2023-Jun-12 09:07:04] [debug] [SeggerBackend] - is_connected_to_emu
[2023-Jun-12 09:07:04] [debug] [SeggerBackend] - ---just_enum_emu_snr
[2023-Jun-12 09:07:04] [debug] [SeggerBackend] - ---just_get_num_emus
[2023-Jun-12 09:07:04] [debug] [SeggerBackend] - ---just_connect_to_emu_with_snr
[2023-Jun-12 09:07:04] [debug] [SeggerBackend] - ---just_connect_to_emu_without_snr
[2023-Jun-12 09:07:04] [debug] [SeggerBackend] - Segger logging enabled.
[2023-Jun-12 09:07:04] [trace] [  JLink] - Firmware: J-Link OB-nRF5340-NordicSemi compiled Nov  7 2022 16:22:01
[2023-Jun-12 09:07:04] [trace] [  JLink] - Firmware: J-Link OB-nRF5340-NordicSemi compiled Nov  7 2022 16:22:01
[2023-Jun-12 09:07:04] [trace] [  JLink] - Hardware: V1.00
[2023-Jun-12 09:07:04] [trace] [  JLink] - S/N: 1050354844
[2023-Jun-12 09:07:04] [trace] [  JLink] - OEM: SEGGER
[2023-Jun-12 09:07:04] [trace] [  JLink] - Feature(s): RDI, FlashBP, FlashDL, JFlash, GDB
[2023-Jun-12 09:07:04] [trace] [  JLink] - USB speed mode: Full speed (12 MBit/s)
[2023-Jun-12 09:07:04] [trace] [  JLink] - TELNET listener socket opened on port 19021
[2023-Jun-12 09:07:04] [trace] [  JLink] - WEBSRV WEBSRV_Init(): Starting webserver thread(s)
[2023-Jun-12 09:07:04] [trace] [  JLink] - WEBSRV Webserver running on local port 19080
[2023-Jun-12 09:07:04] [trace] [  JLink] - Looking for J-Link GUI Server exe at: /opt/SEGGER/JLink/JLinkGUIServerExe 
[2023-Jun-12 09:07:04] [trace] [  JLink] - Forking J-Link GUI Server: /opt/SEGGER/JLink/JLinkGUIServerExe 
[2023-Jun-12 09:07:04] [trace] [ Client] - Command connect_to_emu_with_snr executed for 476 milliseconds with result 0
[2023-Jun-12 09:07:04] [debug] [ Client] - read_connected_emu_snr
[2023-Jun-12 09:07:04] [trace] [ Client] - Command read_connected_emu_snr executed for 0 milliseconds with result 0
[2023-Jun-12 09:07:04] [debug] [ Client] - recover
[2023-Jun-12 09:07:04] [trace] [  JLink] - J-Link GUI Server info: "J-Link GUI server V7.88e " 
[2023-Jun-12 09:07:04] [trace] [  JLink] - - 39.147ms returns "O.K."  
[2023-Jun-12 09:07:04] [trace] [  JLink] - JLINK_HasError()  
[2023-Jun-12 09:07:04] [trace] [  JLink] - JLINK_Lock()  
[2023-Jun-12 09:07:04] [trace] [  JLink] - JLINK_ExecCommand("SetRestartOnClose = 0", ...).   
[2023-Jun-12 09:07:04] [trace] [  JLink] - - 0.002ms returns 0x01  
[2023-Jun-12 09:07:04] [trace] [  JLink] - JLINK_HasError()  
[2023-Jun-12 09:07:04] [trace] [  JLink] - JLINK_ExecCommand("DisableFlashDL", ...).   
[2023-Jun-12 09:07:04] [trace] [  JLink] - - 0.001ms returns 0x00  
[2023-Jun-12 09:07:04] [trace] [  JLink] - JLINK_HasError()  
[2023-Jun-12 09:07:04] [trace] [  JLink] - JLINK_ExecCommand("ExcludeFlashCacheRange 0x0-0xFFFFFFFF", ...).   
[2023-Jun-12 09:07:04] [trace] [  JLink] - - 0.002ms returns 0x00  
[2023-Jun-12 09:07:04] [trace] [  JLink] - JLINK_HasError()  
[2023-Jun-12 09:07:04] [trace] [  JLink] - JLINK_SetHookUnsecureDialog  
[2023-Jun-12 09:07:04] [trace] [  JLink] - JLINK_SetHookUnsecureDialog(...)
[2023-Jun-12 09:07:04] [trace] [  JLink] - - 0.005ms returns 0  
[2023-Jun-12 09:07:04] [trace] [  JLink] - JLINK_HasError()  
[2023-Jun-12 09:07:04] [trace] [  JLink] - JLINK_TIF_Select(JLINKARM_TIF_SWD)  
[2023-Jun-12 09:07:04] [trace] [  JLink] - - 0.540ms returns 0x00  
[2023-Jun-12 09:07:04] [trace] [  JLink] - JLINK_HasError()  
[2023-Jun-12 09:07:04] [trace] [  JLink] - JLINK_GetSpeedInfo()  
[2023-Jun-12 09:07:04] [trace] [  JLink] - 128000000 Hz / n, n >= 64
[2023-Jun-12 09:07:04] [trace] [  JLink] - - 0.006ms  
[2023-Jun-12 09:07:04] [trace] [  JLink] - JLINK_HasError()  
[2023-Jun-12 09:07:04] [debug] [SeggerBackend] - Connected emulator supports SWD speeds up to 2000kHz
[2023-Jun-12 09:07:04] [trace] [  JLink] - JLINK_SetSpeed(2000)  
[2023-Jun-12 09:07:04] [trace] [  JLink] - - 0.052ms  
[2023-Jun-12 09:07:04] [trace] [  JLink] - JLINK_HasError()  
[2023-Jun-12 09:07:04] [trace] [  JLink] - JLINK_GetSpeed()  
[2023-Jun-12 09:07:04] [trace] [  JLink] - - 0.003ms returns 2000  
[2023-Jun-12 09:07:04] [trace] [  JLink] - JLINK_HasError()  
[2023-Jun-12 09:07:04] [debug] [SeggerBackend] - SWD clock set to 2000kHz
[2023-Jun-12 09:07:04] [trace] [  JLink] - JLINK_GetSN()  
[2023-Jun-12 09:07:04] [trace] [  JLink] - - 0.003ms returns 1050354844  
[2023-Jun-12 09:07:04] [trace] [  JLink] - JLINK_HasError()  
[2023-Jun-12 09:07:04] [trace] [  JLink] - - 0.004ms  
[2023-Jun-12 09:07:04] [debug] [  nRF91] - read_device_family
[2023-Jun-12 09:07:04] [trace] [ Worker] - Command connect_to_emu_with_snr executed for 476 milliseconds with result 0
[2023-Jun-12 09:07:04] [debug] [  nRF91] - read_connected_emu_snr
[2023-Jun-12 09:07:04] [debug] [SeggerBackend] - is_connected_to_emu
[2023-Jun-12 09:07:04] [trace] [  JLink] - JLINK_IsOpen()  
[2023-Jun-12 09:07:04] [trace] [  JLink] - - 0.004ms returns 0x01  
[2023-Jun-12 09:07:04] [trace] [  JLink] - JLINK_HasError()  
[2023-Jun-12 09:07:04] [trace] [  JLink] - JLINK_Lock()  
[2023-Jun-12 09:07:04] [debug] [SeggerBackend] - read_connected_emu_snr
[2023-Jun-12 09:07:04] [trace] [  JLink] - - 0.002ms  
[2023-Jun-12 09:07:04] [trace] [ Worker] - Command read_connected_emu_snr executed for 0 milliseconds with result 0
[2023-Jun-12 09:07:04] [debug] [  nRF91] - recover
[2023-Jun-12 09:07:04] [debug] [SeggerBackend] - is_connected_to_emu
[2023-Jun-12 09:07:04] [trace] [  JLink] - JLINK_IsOpen()  
[2023-Jun-12 09:07:04] [trace] [  JLink] - - 0.003ms returns 0x01  
[2023-Jun-12 09:07:04] [trace] [  JLink] - JLINK_HasError()  
[2023-Jun-12 09:07:04] [trace] [  JLink] - JLINK_Lock()  
[2023-Jun-12 09:07:04] [debug] [SeggerBackend] - is_connected_to_emu
[2023-Jun-12 09:07:04] [debug] [  nRF91] - just_recover
[2023-Jun-12 09:07:04] [debug] [  nRF91] - Just_enable_coprocessor
[2023-Jun-12 09:07:04] [debug] [  nRF91] - Just_is_eraseprotect_enabled
[2023-Jun-12 09:07:04] [debug] [SeggerBackend] - read_access_port_register
[2023-Jun-12 09:07:04] [debug] [SeggerBackend] - ---just_read_access_port_register
[2023-Jun-12 09:07:04] [debug] [SeggerBackend] - coresight_configure
[2023-Jun-12 09:07:04] [trace] [  JLink] - JLINK_GetHWStatus(...)  
[2023-Jun-12 09:07:04] [trace] [  JLink] - - 0.089ms returns 0  
[2023-Jun-12 09:07:04] [trace] [  JLink] - JLINK_HasError()  
[2023-Jun-12 09:07:04] [trace] [  JLink] - JLINK_CORESIGHT_Configure()  
[2023-Jun-12 09:07:05] [trace] [  JLink] - - 100.287ms returns 0  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_HasError()  
[2023-Jun-12 09:07:05] [debug] [SeggerBackend] - read_debug_port_idr
[2023-Jun-12 09:07:05] [debug] [SeggerBackend] - read_debug_port_register
[2023-Jun-12 09:07:05] [debug] [SeggerBackend] - ---just_read_debug_port_register
[2023-Jun-12 09:07:05] [debug] [SeggerBackend] - ---just_select_debug_port_register
[2023-Jun-12 09:07:05] [debug] [SeggerBackend] - Select AP 255, DP Bank 0, AP Bank 255
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)  
[2023-Jun-12 09:07:05] [trace] [  JLink] - - 0.829ms returns -1  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_HasError()  
[2023-Jun-12 09:07:05] [debug] [SeggerBackend] - ---just_abort_debug_action
[2023-Jun-12 09:07:05] [debug] [SeggerBackend] - Attempting to clear any configuration errors in debug port before closing connection. 
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
[2023-Jun-12 09:07:05] [trace] [  JLink] - - 0.807ms returns -1  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_HasError()  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
[2023-Jun-12 09:07:05] [trace] [  JLink] - - 0.744ms returns -1  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_HasError()  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
[2023-Jun-12 09:07:05] [trace] [  JLink] - - 0.631ms returns -1  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_HasError()  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
[2023-Jun-12 09:07:05] [trace] [  JLink] - - 0.661ms returns -1  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_HasError()  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
[2023-Jun-12 09:07:05] [trace] [  JLink] - - 0.834ms returns -1  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_HasError()  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
[2023-Jun-12 09:07:05] [trace] [  JLink] - - 0.879ms returns -1  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_HasError()  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)  
[2023-Jun-12 09:07:05] [trace] [  JLink] - - 0.888ms returns -1  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_HasError()  
[2023-Jun-12 09:07:05] [debug] [SeggerBackend] - ---just_abort_debug_action
[2023-Jun-12 09:07:05] [debug] [SeggerBackend] - Attempting to clear any configuration errors in debug port before closing connection. 
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
[2023-Jun-12 09:07:05] [trace] [  JLink] - - 0.782ms returns -1  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_HasError()  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
[2023-Jun-12 09:07:05] [trace] [  JLink] - - 0.924ms returns -1  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_HasError()  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
[2023-Jun-12 09:07:05] [trace] [  JLink] - - 0.927ms returns -1  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_HasError()  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
[2023-Jun-12 09:07:05] [trace] [  JLink] - - 0.961ms returns -1  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_HasError()  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
[2023-Jun-12 09:07:05] [trace] [  JLink] - - 0.929ms returns -1  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_HasError()  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
[2023-Jun-12 09:07:05] [trace] [  JLink] - - 0.691ms returns -1  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_HasError()  
[2023-Jun-12 09:07:05] [error] [ Client] - Encountered error -21: Command recover executed for 120 milliseconds with result -21
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)  
[2023-Jun-12 09:07:05] [trace] [  JLink] - - 0.654ms returns -1  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_HasError()  
[2023-Jun-12 09:07:05] [debug] [SeggerBackend] - ---just_abort_debug_action
[2023-Jun-12 09:07:05] [debug] [SeggerBackend] - Attempting to clear any configuration errors in debug port before closing connection. 
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
[2023-Jun-12 09:07:05] [trace] [  JLink] - - 0.401ms returns 0  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_HasError()  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)  
[2023-Jun-12 09:07:05] [trace] [  JLink] - - 1.044ms returns 0  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_HasError()  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_CORESIGHT_ReadAPDPReg(DP reg 0x00)  
[2023-Jun-12 09:07:05] [trace] [  JLink] - failed
[2023-Jun-12 09:07:05] [trace] [  JLink] - - 0.648ms returns -1  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_HasError()  
[2023-Jun-12 09:07:05] [debug] [SeggerBackend] - ---just_abort_debug_action
[2023-Jun-12 09:07:05] [debug] [SeggerBackend] - Attempting to clear any configuration errors in debug port before closing connection. 
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
[2023-Jun-12 09:07:05] [trace] [  JLink] - - 0.865ms returns -1  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_HasError()  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
[2023-Jun-12 09:07:05] [trace] [  JLink] - - 0.793ms returns -1  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_HasError()  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
[2023-Jun-12 09:07:05] [trace] [  JLink] - - 0.676ms returns 0  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_HasError()  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_CORESIGHT_ReadAPDPReg(DP reg 0x00)  
[2023-Jun-12 09:07:05] [trace] [  JLink] - failed
[2023-Jun-12 09:07:05] [trace] [  JLink] - - 0.673ms returns -1  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_HasError()  
[2023-Jun-12 09:07:05] [debug] [SeggerBackend] - ---just_abort_debug_action
[2023-Jun-12 09:07:05] [debug] [SeggerBackend] - Attempting to clear any configuration errors in debug port before closing connection. 
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
[2023-Jun-12 09:07:05] [trace] [  JLink] - - 0.566ms returns 0  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_HasError()  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_CORESIGHT_ReadAPDPReg(DP reg 0x00)  
[2023-Jun-12 09:07:05] [trace] [  JLink] - Value=0x00000000
[2023-Jun-12 09:07:05] [trace] [  JLink] - - 0.368ms returns 0  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_HasError()  
[2023-Jun-12 09:07:05] [trace] [  JLink] - - 0.127ms  
[2023-Jun-12 09:07:05] [error] [ Worker] - Encountered unexpected debug port ID 0, expected 6
[2023-Jun-12 09:07:05] [trace] [ Worker] - Command recover executed for 120 milliseconds with result -21
[2023-Jun-12 09:07:05] [debug] [  nRF91] - close
[2023-Jun-12 09:07:05] [debug] [SeggerBackend] - is_connected_to_device
[2023-Jun-12 09:07:05] [debug] [SeggerBackend] - is_connected_to_emu
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_IsOpen()  
[2023-Jun-12 09:07:05] [trace] [  JLink] - - 0.025ms returns 0x01  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_HasError()  
[2023-Jun-12 09:07:05] [debug] [SeggerBackend] - is_connected_to_device
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_IsConnected()  
[2023-Jun-12 09:07:05] [trace] [  JLink] - - 0.010ms returns FALSE  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_HasError()  
[2023-Jun-12 09:07:05] [debug] [  nRF91] - close
[2023-Jun-12 09:07:05] [debug] [SeggerBackend] - is_connected_to_emu
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_IsOpen()  
[2023-Jun-12 09:07:05] [trace] [  JLink] - - 0.009ms returns 0x01  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_HasError()  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_Lock()  
[2023-Jun-12 09:07:05] [debug] [SeggerBackend] - close
[2023-Jun-12 09:07:05] [debug] [SeggerBackend] - disconnect_from_emu
[2023-Jun-12 09:07:05] [debug] [SeggerBackend] - ---just_disconnect_from_emu
[2023-Jun-12 09:07:05] [debug] [SeggerBackend] - is_connected_to_device
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_IsConnected()  
[2023-Jun-12 09:07:05] [trace] [  JLink] - - 0.011ms returns FALSE  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_HasError()  
[2023-Jun-12 09:07:05] [debug] [SeggerBackend] - ---just_is_debug_region_powered
[2023-Jun-12 09:07:05] [debug] [SeggerBackend] - ---just_read_debug_port_register
[2023-Jun-12 09:07:05] [debug] [SeggerBackend] - ---just_select_debug_port_register
[2023-Jun-12 09:07:05] [debug] [SeggerBackend] - Select AP 255, DP Bank 0, AP Bank 255
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)  
[2023-Jun-12 09:07:05] [trace] [  JLink] - - 0.644ms returns -1  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_HasError()  
[2023-Jun-12 09:07:05] [debug] [SeggerBackend] - ---just_abort_debug_action
[2023-Jun-12 09:07:05] [debug] [SeggerBackend] - Attempting to clear any configuration errors in debug port before closing connection. 
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
[2023-Jun-12 09:07:05] [trace] [  JLink] - - 0.755ms returns -1  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_HasError()  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
[2023-Jun-12 09:07:05] [trace] [  JLink] - - 0.713ms returns -1  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_HasError()  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
[2023-Jun-12 09:07:05] [trace] [  JLink] - - 0.583ms returns -1  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_HasError()  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
[2023-Jun-12 09:07:05] [trace] [  JLink] - - 0.676ms returns -1  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_HasError()  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
[2023-Jun-12 09:07:05] [trace] [  JLink] - - 0.507ms returns 0  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_HasError()  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)  
[2023-Jun-12 09:07:05] [trace] [  JLink] - - 0.358ms returns 0  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_HasError()  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_CORESIGHT_ReadAPDPReg(DP reg 0x01)  
[2023-Jun-12 09:07:05] [trace] [  JLink] - failed
[2023-Jun-12 09:07:05] [trace] [  JLink] - - 0.764ms returns -1  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_HasError()  
[2023-Jun-12 09:07:05] [debug] [SeggerBackend] - ---just_abort_debug_action
[2023-Jun-12 09:07:05] [debug] [SeggerBackend] - Attempting to clear any configuration errors in debug port before closing connection. 
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
[2023-Jun-12 09:07:05] [trace] [  JLink] - - 0.705ms returns -1  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_HasError()  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
[2023-Jun-12 09:07:05] [trace] [  JLink] - - 0.897ms returns -1  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_HasError()  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
[2023-Jun-12 09:07:05] [trace] [  JLink] - - 0.625ms returns -1  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_HasError()  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
[2023-Jun-12 09:07:05] [trace] [  JLink] - - 0.593ms returns -1  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_HasError()  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
[2023-Jun-12 09:07:05] [trace] [  JLink] - - 0.621ms returns -1  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_HasError()  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
[2023-Jun-12 09:07:05] [trace] [  JLink] - - 0.567ms returns -1  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_HasError()  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_CORESIGHT_ReadAPDPReg(DP reg 0x01)  
[2023-Jun-12 09:07:05] [trace] [  JLink] - failed
[2023-Jun-12 09:07:05] [trace] [  JLink] - - 0.562ms returns -1  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_HasError()  
[2023-Jun-12 09:07:05] [debug] [SeggerBackend] - ---just_abort_debug_action
[2023-Jun-12 09:07:05] [debug] [SeggerBackend] - Attempting to clear any configuration errors in debug port before closing connection. 
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
[2023-Jun-12 09:07:05] [trace] [  JLink] - - 0.753ms returns -1  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_HasError()  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
[2023-Jun-12 09:07:05] [trace] [  JLink] - - 0.629ms returns -1  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_HasError()  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
[2023-Jun-12 09:07:05] [trace] [  JLink] - - 0.658ms returns -1  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_HasError()  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
[2023-Jun-12 09:07:05] [trace] [  JLink] - - 0.680ms returns -1  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_HasError()  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
[2023-Jun-12 09:07:05] [trace] [  JLink] - - 0.693ms returns -1  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_HasError()  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
[2023-Jun-12 09:07:05] [trace] [  JLink] - - 0.709ms returns -1  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_HasError()  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_CORESIGHT_ReadAPDPReg(DP reg 0x01)  
[2023-Jun-12 09:07:05] [trace] [  JLink] - failed
[2023-Jun-12 09:07:05] [trace] [  JLink] - - 0.606ms returns -1  
[2023-Jun-12 09:07:05] [trace] [  JLink] - JLINK_HasError()  
[2023-Jun-12 09:07:05] [debug] [SeggerBackend] - ---just_abort_debug_action
[2023-Jun-12 09:07:05] [debug] [SeggerBackend] - Attempting to clear any configuration errors in debug port before closing connection. 

Is there anything else I can try to recover the chip?  Or, could I have killed it, and if so, how can  I confirm?   

SOLUTION:  None.  The issue turned out to be a low battery pack.  It first presented itself after running some test code, which is why I thought I had damaged the chip.  The battery was strong enough to power the nrf52840 chip on the board but not the nrf9160.  

Related