This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Issues programming nRF5340 on a Custom Board

Hi,

I am having issues programming my custom nRF5340 board and was hoping to get some advice on the issue.

When programming using nRF Connect for Desktop (Windows 10, nRF Connect v3.6.1, Programmer v1.4.8) I get the error message:

Could not fetch memory size of target devkit: Error: Error occured when get library info. Errorcode: CouldNotOpenDevice (0x4) Lowlevel error: JLINKARM_DLL_ERROR (ffffff9a)

When using the following nrfjprog (v10.12.1) commands nrfjprog -e --log or nrfjprog --recover --log I get the attached logs.

When using J-Link Commander V6.98C I get the following Output:

SEGGER J-Link Commander V6.98c (Compiled Mar 16 2021 12:20:44)
DLL version V6.98c, compiled Mar 16 2021 12:19:26

Connecting to J-Link via USB...O.K.
Firmware: J-Link V11 compiled Feb  4 2021 12:59:17
Hardware version: V11.00
S/N: 51007811
License(s): GDB
VTref=2.994V


Type "connect" to establish a target connection, '?' for help
J-Link>connect
Please specify device / core. <Default>: CORTEX-M4
Type '?' for selection dialog
Device>
Please specify target interface:
  J) JTAG (Default)
  S) SWD
  T) cJTAG
TIF>s
Specify target interface speed [kHz]. <Default>: 4000 kHz
Speed>
Device "CORTEX-M4" selected.


Connecting to target via SWD
Cannot connect to target.
J-Link>

I have checked the capacitors around the chip are showing +3V and the J-Link commander trace also shows a +3V reference.

Any help would be much appreciated.

Thanks,

Ben

EDIT: Added files I forgot to attach!

[2021-Mar-24 13:40:56] [ info] --------------------------------------------------------------------------------
[2021-Mar-24 13:40:56] [ info] nrfjprog --recover --log 
[2021-Mar-24 13:40:56] [ info] nrfjprog version 10.12.1 
[2021-Mar-24 13:40:56] [ info] --------------------------------------------------------------------------------
[2021-Mar-24 13:40:56] [debug] [ nRF0x0] - open_dll
[2021-Mar-24 13:40:56] [ info] [ nRF0x0] - Load library at C:\Program Files (x86)\Nordic Semiconductor\nrf-command-line-tools\bin\JLINKARM_UNKNOWN_NRFJPROG.dll.
[2021-Mar-24 13:40:56] [ info] [ nRF0x0] - Library loaded, loading member functions.
[2021-Mar-24 13:40:56] [ info] [ nRF0x0] - Member functions succesfully loaded.
[2021-Mar-24 13:40:56] [ info] [Backend] - Logger callback at 0xf02020 registered in Segger backend logger.
[2021-Mar-24 13:40:56] [ info] [  JLink] - [Info    ] [JLink     ] Logger callback at 0xf02020 registered in JLink logger.
[2021-Mar-24 13:40:56] [debug] [nRFUnknown] - Just_open_dll_tagged_callback
[2021-Mar-24 13:40:56] [debug] [Backend] - open_dll
[2021-Mar-24 13:40:56] [ info] [Backend] - No J-Link DLL path was provided. Attempting to auto detect.
[2021-Mar-24 13:40:56] [ info] [Backend] - Load library at C:\Program Files (x86)\SEGGER\JLink\JLinkARM.dll.
[2021-Mar-24 13:40:56] [ info] [Backend] - Library loaded, loading member functions.
[2021-Mar-24 13:40:56] [ info] [Backend] - Member functions succesfully loaded.
[2021-Mar-24 13:40:56] [debug] [Backend] - dll_version
[2021-Mar-24 13:40:56] [ info] [Backend] - Segger dll version 6.98.c loaded.
[2021-Mar-24 13:40:56] [debug] [Backend] - set_core_data
[2021-Mar-24 13:40:56] [debug] [ nRF0x0] - enum_emu_snr
[2021-Mar-24 13:40:56] [debug] [nRFUnknown] - Just_enum_emu_snr
[2021-Mar-24 13:40:56] [debug] [Backend] - enum_emu_snr
[2021-Mar-24 13:40:56] [debug] [Backend] - ---just_enum_emu_snr
[2021-Mar-24 13:40:56] [debug] [Backend] - ---just_get_num_emus
[2021-Mar-24 13:40:56] [debug] [ nRF0x0] - connect_to_emu_with_snr
[2021-Mar-24 13:40:56] [debug] [nRFUnknown] - Just_connect_to_emu_with_snr
[2021-Mar-24 13:40:56] [debug] [Backend] - connect_to_emu_with_snr
[2021-Mar-24 13:40:56] [debug] [Backend] - is_connected_to_emu
[2021-Mar-24 13:40:56] [debug] [Backend] - ---just_enum_emu_snr
[2021-Mar-24 13:40:56] [debug] [Backend] - ---just_get_num_emus
[2021-Mar-24 13:40:56] [debug] [Backend] - ---just_connect_to_emu_with_snr
[2021-Mar-24 13:40:56] [debug] [Backend] - ---just_connect_to_emu_without_snr
[2021-Mar-24 13:40:56] [ info] [Backend] - Segger logging enabled.
[2021-Mar-24 13:40:56] [ info] [  JLink] - [Info    ] [JLink     ] Firmware: J-Link V11 compiled Feb  4 2021 12:59:17
[2021-Mar-24 13:40:56] [ info] [  JLink] - [Info    ] [JLink     ] Firmware: J-Link V11 compiled Feb  4 2021 12:59:17
[2021-Mar-24 13:40:56] [ info] [  JLink] - [Info    ] [JLink     ] Decompressing FW timestamp took 154 us
[2021-Mar-24 13:40:56] [ info] [  JLink] - [Info    ] [JLink     ] Hardware: V11.00
[2021-Mar-24 13:40:56] [ info] [  JLink] - [Info    ] [JLink     ] S/N: 51007811
[2021-Mar-24 13:40:56] [ info] [  JLink] - [Info    ] [JLink     ] OEM: SEGGER
[2021-Mar-24 13:40:56] [ info] [  JLink] - [Info    ] [JLink     ] Feature(s): GDB
[2021-Mar-24 13:40:56] [ info] [  JLink] - [Info    ] [JLink     ] TELNET listener socket opened on port 19021
[2021-Mar-24 13:40:56] [ info] [  JLink] - [Info    ] [JLink     ] WEBSRV Starting webserver
[2021-Mar-24 13:40:56] [ info] [  JLink] - [Info    ] [JLink     ] WEBSRV Webserver running on local port 19080
[2021-Mar-24 13:40:56] [ info] [  JLink] - [Info    ] [JLink     ] - 18.000ms returns "O.K."  
[2021-Mar-24 13:40:56] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2021-Mar-24 13:40:56] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_GetHWStatus(...)  
[2021-Mar-24 13:40:56] [ info] [  JLink] - [Info    ] [JLink     ] - 0.453ms returns 0  
[2021-Mar-24 13:40:56] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2021-Mar-24 13:40:56] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_ExecCommand("SetRestartOnClose = 0", ...).   
[2021-Mar-24 13:40:56] [ info] [  JLink] - [Info    ] [JLink     ] - 0.013ms returns 0x01  
[2021-Mar-24 13:40:56] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2021-Mar-24 13:40:56] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_ExecCommand("DisableFlashDL", ...).   
[2021-Mar-24 13:40:56] [ info] [  JLink] - [Info    ] [JLink     ] - 0.007ms returns 0x00  
[2021-Mar-24 13:40:56] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2021-Mar-24 13:40:56] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_ExecCommand("ExcludeFlashCacheRange 0x0-0xFFFFFFFF", ...).   
[2021-Mar-24 13:40:56] [ info] [  JLink] - [Info    ] [JLink     ] - 0.006ms returns 0x00  
[2021-Mar-24 13:40:56] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2021-Mar-24 13:40:56] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_SetHookUnsecureDialog  
[2021-Mar-24 13:40:56] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_SetHookUnsecureDialog(...)
[2021-Mar-24 13:40:56] [ info] [  JLink] - [Info    ] [JLink     ] - 0.037ms returns 0  
[2021-Mar-24 13:40:56] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2021-Mar-24 13:40:56] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_TIF_Select(JLINKARM_TIF_SWD)  
[2021-Mar-24 13:40:56] [ info] [  JLink] - [Info    ] [JLink     ] - 3.146ms returns 0x00  
[2021-Mar-24 13:40:56] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2021-Mar-24 13:40:56] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_SetSpeed(2000)  
[2021-Mar-24 13:40:56] [ info] [  JLink] - [Info    ] [JLink     ] - 0.895ms  
[2021-Mar-24 13:40:56] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2021-Mar-24 13:40:56] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_GetSN()  
[2021-Mar-24 13:40:56] [ info] [  JLink] - [Info    ] [JLink     ] - 0.022ms returns 51007811  
[2021-Mar-24 13:40:56] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2021-Mar-24 13:40:56] [debug] [Backend] - ---just_load_core_data
[2021-Mar-24 13:40:56] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_ExecCommand("CORESIGHT_SetIndexAHBAPToUse = 0", ...).   
[2021-Mar-24 13:40:56] [ info] [  JLink] - [Info    ] [JLink     ] - 0.003ms returns 0x00  
[2021-Mar-24 13:40:56] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2021-Mar-24 13:40:56] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_ExecCommand("device = Cortex-M4", ...).   
[2021-Mar-24 13:40:56] [ info] [  JLink] - [Info    ] [JLink     ] XML file found at: C:\Program Files (x86)\SEGGER\JLink\JLinkDevices.xml 
[2021-Mar-24 13:40:56] [ info] [  JLink] - [Info    ] [JLink     ] C:\Program Files (x86)\SEGGER\JLink\JLinkDevices.xml evaluated successfully. 
[2021-Mar-24 13:40:56] [ info] [  JLink] - [Info    ] [JLink     ] Device "CORTEX-M4" selected.
[2021-Mar-24 13:40:56] [ info] [  JLink] - [Info    ] [JLink     ] Device "CORTEX-M4" selected.
[2021-Mar-24 13:40:56] [ info] [  JLink] - [Info    ] [JLink     ] - 41.839ms returns 0x00  
[2021-Mar-24 13:40:56] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2021-Mar-24 13:40:56] [debug] [ nRF0x0] - read_connected_emu_snr
[2021-Mar-24 13:40:56] [debug] [nRFUnknown] - Just_read_connected_emu_snr
[2021-Mar-24 13:40:56] [debug] [Backend] - read_connected_emu_snr
[2021-Mar-24 13:40:56] [debug] [Backend] - is_connected_to_emu
[2021-Mar-24 13:40:56] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_IsOpen()  
[2021-Mar-24 13:40:56] [ info] [  JLink] - [Info    ] [JLink     ] - 0.012ms returns 0x01  
[2021-Mar-24 13:40:56] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2021-Mar-24 13:40:56] [debug] [ nRF0x0] - read_device_family
[2021-Mar-24 13:40:56] [debug] [nRFUnknown] - Just_read_device_family
[2021-Mar-24 13:40:56] [debug] [Backend] - is_connected_to_emu
[2021-Mar-24 13:40:56] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_IsOpen()  
[2021-Mar-24 13:40:56] [ info] [  JLink] - [Info    ] [JLink     ] - 0.020ms returns 0x01  
[2021-Mar-24 13:40:56] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2021-Mar-24 13:40:56] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_Lock()  
[2021-Mar-24 13:40:56] [debug] [Backend] - read_debug_port_idr
[2021-Mar-24 13:40:56] [debug] [Backend] - read_debug_port_register
[2021-Mar-24 13:40:56] [debug] [Backend] - ---just_read_debug_port_register
[2021-Mar-24 13:40:56] [debug] [Backend] - coresight_configure
[2021-Mar-24 13:40:56] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_CORESIGHT_Configure()  
[2021-Mar-24 13:40:56] [ info] [  JLink] - [Info    ] [JLink     ] - 100.757ms returns 0  
[2021-Mar-24 13:40:56] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2021-Mar-24 13:40:56] [debug] [Backend] - ---just_select_debug_port_register
[2021-Mar-24 13:40:56] [debug] [Backend] - Select AP 255, DP Bank 0, AP Bank 255
[2021-Mar-24 13:40:56] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)  
[2021-Mar-24 13:40:56] [ info] [  JLink] - [Info    ] [JLink     ] - 0.871ms returns -1  
[2021-Mar-24 13:40:56] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2021-Mar-24 13:40:56] [ info] [Backend] - JLinkARM.dll reported "-1", an unknown error.
[2021-Mar-24 13:40:56] [debug] [Backend] - ---just_abort_debug_action
[2021-Mar-24 13:40:56] [ info] [Backend] - Attempting to clear any configuration errors in debug port before closing connection. 
[2021-Mar-24 13:40:56] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
[2021-Mar-24 13:40:56] [ info] [  JLink] - [Info    ] [JLink     ] - 0.889ms returns -1  
[2021-Mar-24 13:40:56] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2021-Mar-24 13:40:56] [ info] [Backend] - JLinkARM.dll reported "-1", an unknown error.
[2021-Mar-24 13:40:56] [ info] [  JLink] - [Info    ] [JLink     ] - 0.023ms  
[2021-Mar-24 13:40:56] [debug] [ nRF0x0] - close_dll
[2021-Mar-24 13:40:56] [debug] [nRFUnknown] - Just_close_dll
[2021-Mar-24 13:40:56] [debug] [Backend] - close
[2021-Mar-24 13:40:56] [debug] [Backend] - disconnect_from_emu
[2021-Mar-24 13:40:56] [debug] [Backend] - is_connected_to_emu
[2021-Mar-24 13:40:56] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_IsOpen()  
[2021-Mar-24 13:40:56] [ info] [  JLink] - [Info    ] [JLink     ] - 0.011ms returns 0x01  
[2021-Mar-24 13:40:56] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2021-Mar-24 13:40:56] [debug] [Backend] - ---just_disconnect_from_emu
[2021-Mar-24 13:40:56] [debug] [Backend] - is_connected_to_device
[2021-Mar-24 13:40:56] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_IsConnected()  
[2021-Mar-24 13:40:56] [ info] [  JLink] - [Info    ] [JLink     ] - 0.011ms returns FALSE  
[2021-Mar-24 13:40:56] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2021-Mar-24 13:40:56] [debug] [Backend] - ---just_is_debug_region_powered
[2021-Mar-24 13:40:56] [debug] [Backend] - ---just_read_debug_port_register
[2021-Mar-24 13:40:56] [debug] [Backend] - is_connected_to_emu
[2021-Mar-24 13:40:56] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_IsOpen()  
[2021-Mar-24 13:40:56] [ info] [  JLink] - [Info    ] [JLink     ] - 0.010ms returns 0x01  
[2021-Mar-24 13:40:56] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2021-Mar-24 13:40:56] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_Lock()  
[2021-Mar-24 13:40:56] [debug] [Backend] - ---just_select_debug_port_register
[2021-Mar-24 13:40:56] [debug] [Backend] - Select AP 255, DP Bank 0, AP Bank 255
[2021-Mar-24 13:40:56] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)  
[2021-Mar-24 13:40:56] [ info] [  JLink] - [Info    ] [JLink     ] - 0.781ms returns -1  
[2021-Mar-24 13:40:56] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2021-Mar-24 13:40:56] [ info] [Backend] - JLinkARM.dll reported "-1", an unknown error.
[2021-Mar-24 13:40:56] [debug] [Backend] - ---just_abort_debug_action
[2021-Mar-24 13:40:56] [ info] [Backend] - Attempting to clear any configuration errors in debug port before closing connection. 
[2021-Mar-24 13:40:56] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
[2021-Mar-24 13:40:56] [ info] [  JLink] - [Info    ] [JLink     ] - 0.836ms returns -1  
[2021-Mar-24 13:40:56] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2021-Mar-24 13:40:56] [ info] [Backend] - JLinkARM.dll reported "-1", an unknown error.
[2021-Mar-24 13:40:56] [ info] [  JLink] - [Info    ] [JLink     ] - 0.028ms  
[2021-Mar-24 13:40:56] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_Close()  
[2021-Mar-24 13:40:56] [debug] [Backend] - Segger Backend closed.
[2021-Mar-24 13:27:03] [ info] --------------------------------------------------------------------------------
[2021-Mar-24 13:27:03] [ info] nrfjprog -e --log 
[2021-Mar-24 13:27:03] [ info] nrfjprog version 10.12.1 
[2021-Mar-24 13:27:03] [ info] --------------------------------------------------------------------------------
[2021-Mar-24 13:27:03] [debug] [ nRF0x0] - open_dll
[2021-Mar-24 13:27:03] [ info] [ nRF0x0] - Load library at C:\Program Files (x86)\Nordic Semiconductor\nrf-command-line-tools\bin\JLINKARM_UNKNOWN_NRFJPROG.dll.
[2021-Mar-24 13:27:03] [ info] [ nRF0x0] - Library loaded, loading member functions.
[2021-Mar-24 13:27:03] [ info] [ nRF0x0] - Member functions succesfully loaded.
[2021-Mar-24 13:27:03] [ info] [Backend] - Logger callback at 0xf02020 registered in Segger backend logger.
[2021-Mar-24 13:27:03] [ info] [  JLink] - [Info    ] [JLink     ] Logger callback at 0xf02020 registered in JLink logger.
[2021-Mar-24 13:27:03] [debug] [nRFUnknown] - Just_open_dll_tagged_callback
[2021-Mar-24 13:27:03] [debug] [Backend] - open_dll
[2021-Mar-24 13:27:03] [ info] [Backend] - No J-Link DLL path was provided. Attempting to auto detect.
[2021-Mar-24 13:27:03] [ info] [Backend] - Load library at C:\Program Files (x86)\SEGGER\JLink\JLinkARM.dll.
[2021-Mar-24 13:27:03] [ info] [Backend] - Library loaded, loading member functions.
[2021-Mar-24 13:27:03] [ info] [Backend] - Member functions succesfully loaded.
[2021-Mar-24 13:27:03] [debug] [Backend] - dll_version
[2021-Mar-24 13:27:03] [ info] [Backend] - Segger dll version 6.98.c loaded.
[2021-Mar-24 13:27:03] [debug] [Backend] - set_core_data
[2021-Mar-24 13:27:03] [debug] [ nRF0x0] - enum_emu_snr
[2021-Mar-24 13:27:03] [debug] [nRFUnknown] - Just_enum_emu_snr
[2021-Mar-24 13:27:03] [debug] [Backend] - enum_emu_snr
[2021-Mar-24 13:27:03] [debug] [Backend] - ---just_enum_emu_snr
[2021-Mar-24 13:27:03] [debug] [Backend] - ---just_get_num_emus
[2021-Mar-24 13:27:03] [debug] [ nRF0x0] - connect_to_emu_with_snr
[2021-Mar-24 13:27:03] [debug] [nRFUnknown] - Just_connect_to_emu_with_snr
[2021-Mar-24 13:27:03] [debug] [Backend] - connect_to_emu_with_snr
[2021-Mar-24 13:27:03] [debug] [Backend] - is_connected_to_emu
[2021-Mar-24 13:27:03] [debug] [Backend] - ---just_enum_emu_snr
[2021-Mar-24 13:27:03] [debug] [Backend] - ---just_get_num_emus
[2021-Mar-24 13:27:03] [debug] [Backend] - ---just_connect_to_emu_with_snr
[2021-Mar-24 13:27:03] [debug] [Backend] - ---just_connect_to_emu_without_snr
[2021-Mar-24 13:27:03] [ info] [Backend] - Segger logging enabled.
[2021-Mar-24 13:27:03] [ info] [  JLink] - [Info    ] [JLink     ] Firmware: J-Link V11 compiled Feb  4 2021 12:59:17
[2021-Mar-24 13:27:03] [ info] [  JLink] - [Info    ] [JLink     ] Firmware: J-Link V11 compiled Feb  4 2021 12:59:17
[2021-Mar-24 13:27:03] [ info] [  JLink] - [Info    ] [JLink     ] Decompressing FW timestamp took 135 us
[2021-Mar-24 13:27:03] [ info] [  JLink] - [Info    ] [JLink     ] Hardware: V11.00
[2021-Mar-24 13:27:03] [ info] [  JLink] - [Info    ] [JLink     ] S/N: 51007811
[2021-Mar-24 13:27:03] [ info] [  JLink] - [Info    ] [JLink     ] OEM: SEGGER
[2021-Mar-24 13:27:03] [ info] [  JLink] - [Info    ] [JLink     ] Feature(s): GDB
[2021-Mar-24 13:27:03] [ info] [  JLink] - [Info    ] [JLink     ] TELNET listener socket opened on port 19021
[2021-Mar-24 13:27:03] [ info] [  JLink] - [Info    ] [JLink     ] WEBSRV Starting webserver
[2021-Mar-24 13:27:03] [ info] [  JLink] - [Info    ] [JLink     ] WEBSRV Webserver running on local port 19080
[2021-Mar-24 13:27:03] [ info] [  JLink] - [Info    ] [JLink     ] - 17.546ms returns "O.K."  
[2021-Mar-24 13:27:03] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2021-Mar-24 13:27:03] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_GetHWStatus(...)  
[2021-Mar-24 13:27:03] [ info] [  JLink] - [Info    ] [JLink     ] - 0.434ms returns 0  
[2021-Mar-24 13:27:03] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2021-Mar-24 13:27:03] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_ExecCommand("SetRestartOnClose = 0", ...).   
[2021-Mar-24 13:27:03] [ info] [  JLink] - [Info    ] [JLink     ] - 0.009ms returns 0x01  
[2021-Mar-24 13:27:03] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2021-Mar-24 13:27:03] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_ExecCommand("DisableFlashDL", ...).   
[2021-Mar-24 13:27:03] [ info] [  JLink] - [Info    ] [JLink     ] - 0.006ms returns 0x00  
[2021-Mar-24 13:27:03] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2021-Mar-24 13:27:03] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_ExecCommand("ExcludeFlashCacheRange 0x0-0xFFFFFFFF", ...).   
[2021-Mar-24 13:27:03] [ info] [  JLink] - [Info    ] [JLink     ] - 0.004ms returns 0x00  
[2021-Mar-24 13:27:03] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2021-Mar-24 13:27:03] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_SetHookUnsecureDialog  
[2021-Mar-24 13:27:03] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_SetHookUnsecureDialog(...)
[2021-Mar-24 13:27:03] [ info] [  JLink] - [Info    ] [JLink     ] - 0.026ms returns 0  
[2021-Mar-24 13:27:03] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2021-Mar-24 13:27:03] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_TIF_Select(JLINKARM_TIF_SWD)  
[2021-Mar-24 13:27:03] [ info] [  JLink] - [Info    ] [JLink     ] - 3.250ms returns 0x00  
[2021-Mar-24 13:27:03] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2021-Mar-24 13:27:03] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_SetSpeed(2000)  
[2021-Mar-24 13:27:03] [ info] [  JLink] - [Info    ] [JLink     ] - 0.865ms  
[2021-Mar-24 13:27:03] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2021-Mar-24 13:27:03] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_GetSN()  
[2021-Mar-24 13:27:03] [ info] [  JLink] - [Info    ] [JLink     ] - 0.009ms returns 51007811  
[2021-Mar-24 13:27:03] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2021-Mar-24 13:27:03] [debug] [Backend] - ---just_load_core_data
[2021-Mar-24 13:27:03] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_ExecCommand("CORESIGHT_SetIndexAHBAPToUse = 0", ...).   
[2021-Mar-24 13:27:03] [ info] [  JLink] - [Info    ] [JLink     ] - 0.003ms returns 0x00  
[2021-Mar-24 13:27:03] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2021-Mar-24 13:27:03] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_ExecCommand("device = Cortex-M4", ...).   
[2021-Mar-24 13:27:03] [ info] [  JLink] - [Info    ] [JLink     ] XML file found at: C:\Program Files (x86)\SEGGER\JLink\JLinkDevices.xml 
[2021-Mar-24 13:27:03] [ info] [  JLink] - [Info    ] [JLink     ] C:\Program Files (x86)\SEGGER\JLink\JLinkDevices.xml evaluated successfully. 
[2021-Mar-24 13:27:03] [ info] [  JLink] - [Info    ] [JLink     ] Device "CORTEX-M4" selected.
[2021-Mar-24 13:27:03] [ info] [  JLink] - [Info    ] [JLink     ] Device "CORTEX-M4" selected.
[2021-Mar-24 13:27:03] [ info] [  JLink] - [Info    ] [JLink     ] - 38.418ms returns 0x00  
[2021-Mar-24 13:27:03] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2021-Mar-24 13:27:03] [debug] [ nRF0x0] - read_connected_emu_snr
[2021-Mar-24 13:27:03] [debug] [nRFUnknown] - Just_read_connected_emu_snr
[2021-Mar-24 13:27:03] [debug] [Backend] - read_connected_emu_snr
[2021-Mar-24 13:27:03] [debug] [Backend] - is_connected_to_emu
[2021-Mar-24 13:27:03] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_IsOpen()  
[2021-Mar-24 13:27:03] [ info] [  JLink] - [Info    ] [JLink     ] - 0.011ms returns 0x01  
[2021-Mar-24 13:27:03] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2021-Mar-24 13:27:03] [debug] [ nRF0x0] - read_device_family
[2021-Mar-24 13:27:03] [debug] [nRFUnknown] - Just_read_device_family
[2021-Mar-24 13:27:03] [debug] [Backend] - is_connected_to_emu
[2021-Mar-24 13:27:03] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_IsOpen()  
[2021-Mar-24 13:27:03] [ info] [  JLink] - [Info    ] [JLink     ] - 0.009ms returns 0x01  
[2021-Mar-24 13:27:03] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2021-Mar-24 13:27:03] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_Lock()  
[2021-Mar-24 13:27:03] [debug] [Backend] - read_debug_port_idr
[2021-Mar-24 13:27:03] [debug] [Backend] - read_debug_port_register
[2021-Mar-24 13:27:03] [debug] [Backend] - ---just_read_debug_port_register
[2021-Mar-24 13:27:03] [debug] [Backend] - coresight_configure
[2021-Mar-24 13:27:03] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_CORESIGHT_Configure()  
[2021-Mar-24 13:27:03] [ info] [  JLink] - [Info    ] [JLink     ] - 100.201ms returns 0  
[2021-Mar-24 13:27:03] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2021-Mar-24 13:27:03] [debug] [Backend] - ---just_select_debug_port_register
[2021-Mar-24 13:27:03] [debug] [Backend] - Select AP 255, DP Bank 0, AP Bank 255
[2021-Mar-24 13:27:03] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)  
[2021-Mar-24 13:27:03] [ info] [  JLink] - [Info    ] [JLink     ] - 0.921ms returns -1  
[2021-Mar-24 13:27:03] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2021-Mar-24 13:27:03] [ info] [Backend] - JLinkARM.dll reported "-1", an unknown error.
[2021-Mar-24 13:27:03] [debug] [Backend] - ---just_abort_debug_action
[2021-Mar-24 13:27:03] [ info] [Backend] - Attempting to clear any configuration errors in debug port before closing connection. 
[2021-Mar-24 13:27:03] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
[2021-Mar-24 13:27:03] [ info] [  JLink] - [Info    ] [JLink     ] - 0.895ms returns -1  
[2021-Mar-24 13:27:03] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2021-Mar-24 13:27:03] [ info] [Backend] - JLinkARM.dll reported "-1", an unknown error.
[2021-Mar-24 13:27:03] [ info] [  JLink] - [Info    ] [JLink     ] - 0.026ms  
[2021-Mar-24 13:27:03] [debug] [ nRF0x0] - close_dll
[2021-Mar-24 13:27:03] [debug] [nRFUnknown] - Just_close_dll
[2021-Mar-24 13:27:03] [debug] [Backend] - close
[2021-Mar-24 13:27:03] [debug] [Backend] - disconnect_from_emu
[2021-Mar-24 13:27:03] [debug] [Backend] - is_connected_to_emu
[2021-Mar-24 13:27:03] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_IsOpen()  
[2021-Mar-24 13:27:03] [ info] [  JLink] - [Info    ] [JLink     ] - 0.009ms returns 0x01  
[2021-Mar-24 13:27:03] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2021-Mar-24 13:27:03] [debug] [Backend] - ---just_disconnect_from_emu
[2021-Mar-24 13:27:03] [debug] [Backend] - is_connected_to_device
[2021-Mar-24 13:27:03] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_IsConnected()  
[2021-Mar-24 13:27:03] [ info] [  JLink] - [Info    ] [JLink     ] - 0.010ms returns FALSE  
[2021-Mar-24 13:27:03] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2021-Mar-24 13:27:03] [debug] [Backend] - ---just_is_debug_region_powered
[2021-Mar-24 13:27:03] [debug] [Backend] - ---just_read_debug_port_register
[2021-Mar-24 13:27:03] [debug] [Backend] - is_connected_to_emu
[2021-Mar-24 13:27:03] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_IsOpen()  
[2021-Mar-24 13:27:03] [ info] [  JLink] - [Info    ] [JLink     ] - 0.008ms returns 0x01  
[2021-Mar-24 13:27:03] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2021-Mar-24 13:27:03] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_Lock()  
[2021-Mar-24 13:27:03] [debug] [Backend] - ---just_select_debug_port_register
[2021-Mar-24 13:27:03] [debug] [Backend] - Select AP 255, DP Bank 0, AP Bank 255
[2021-Mar-24 13:27:03] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)  
[2021-Mar-24 13:27:03] [ info] [  JLink] - [Info    ] [JLink     ] - 0.765ms returns -1  
[2021-Mar-24 13:27:03] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2021-Mar-24 13:27:03] [ info] [Backend] - JLinkARM.dll reported "-1", an unknown error.
[2021-Mar-24 13:27:03] [debug] [Backend] - ---just_abort_debug_action
[2021-Mar-24 13:27:03] [ info] [Backend] - Attempting to clear any configuration errors in debug port before closing connection. 
[2021-Mar-24 13:27:03] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
[2021-Mar-24 13:27:03] [ info] [  JLink] - [Info    ] [JLink     ] - 0.860ms returns -1  
[2021-Mar-24 13:27:03] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2021-Mar-24 13:27:03] [ info] [Backend] - JLinkARM.dll reported "-1", an unknown error.
[2021-Mar-24 13:27:03] [ info] [  JLink] - [Info    ] [JLink     ] - 0.032ms  
[2021-Mar-24 13:27:03] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_Close()  
[2021-Mar-24 13:27:03] [debug] [Backend] - Segger Backend closed.

  • Hi Ben, 


    What are you using to program the custom board? How are you connecting the custom board to the programmer?

    Kind regards,
    Øyvind

  • Hi Øyvind,

    I am using a Segger J-Link v11.0, this is connected to the board via a TAG-Connect cable wired to SWD.

    Thanks,

    Ben

  • Have you been able to program the board before? What voltage are you running, and have you verified that the board is powered? Have you had any review of the board layout?
    -Øyvind

  • No, I only received the board today. I am running at +3V and have verified the board is powered (caps around the nRF53 are at +3V) and also that the VTref on J-Link Commander is reading +3V.

    The schematic and board layout have been reviewed by a Nordic engineer.

    Thanks!

  • Then my next question is why you are connecting to the device using Cortex-M4, the nRF53 is a Cortex-M33. Please change the device to corresponding device:

    Here is my output from J-Link Commander, connected to Debug-In on the nRF5340 DK:

    SEGGER J-Link Commander V6.96 (Compiled Feb 19 2021 09:57:05)
    DLL version V6.96, compiled Feb 19 2021 09:55:51
    
    Connecting to J-Link via USB...O.K.
    Firmware: J-Link V11 compiled Feb  4 2021 12:59:17
    Hardware version: V11.00
    S/N: 821002299
    License(s): GDB
    VTref=3.038V
    
    
    Type "connect" to establish a target connection, '?' for help
    J-Link>connect
    Please specify device / core. <Default>: NRF5340_XXAA_APP
    Type '?' for selection dialog
    Device>
    Please specify target interface:
      J) JTAG (Default)
      S) SWD
      T) cJTAG
    TIF>s
    Specify target interface speed [kHz]. <Default>: 4000 kHz
    Speed>
    Device "NRF5340_XXAA_APP" selected.
    
    
    Connecting to target via SWD
    ConfigTargetSettings() start
    ConfigTargetSettings() end
    InitTarget() start
    InitTarget() end
    Found SW-DP with ID 0x6BA02477
    DPIDR: 0x6BA02477
    AP map detection skipped. Manually configured AP map found.
    AP[0]: AHB-AP (IDR: Not set)
    AP[1]: AHB-AP (IDR: Not set)
    AP[2]: MEM-AP (IDR: Not set)
    AP[3]: MEM-AP (IDR: Not set)
    AP[0]: Core found
    AP[0]: AHB-AP ROM base: 0xE00FF000
    CPUID register: 0x410FD214. Implementer code: 0x41 (ARM)
    Found Cortex-M33 r0p4, Little endian.
    FPUnit: 8 code (BP) slots and 0 literal slots
    Security extension: implemented
    Secure debug: enabled
    CoreSight components:
    ROMTbl[0] @ E00FF000
    ROMTbl[0][0]: E000E000, CID: B105900D, PID: 000BBD21 Cortex-M33
    ROMTbl[0][1]: E0001000, CID: B105900D, PID: 000BBD21 DWT
    ROMTbl[0][2]: E0002000, CID: B105900D, PID: 000BBD21 FPB
    ROMTbl[0][3]: E0000000, CID: B105900D, PID: 000BBD21 ITM
    ROMTbl[0][5]: E0041000, CID: B105900D, PID: 002BBD21 ETM
    ROMTbl[0][6]: E0042000, CID: B105900D, PID: 000BBD21 CSS600-CTI
    Cortex-M33 identified.

Related