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

Problem connecting to nRF52

I am having trouble connecting to an nRF52810 in a uBlox BMD-330 Eval Kit.

It has previously been successfully flashed with custom firmware but, now, when I try to connect with J-Link Commander (V6.88c), using the J-Link integral to the Eval Kit board, I get an error "Could not find core in Coresight setup".

I found a board post suggesting that if the firmware on the device has put it into a sleep mode, then this could be the cause of the failure to connect, and that the solution would be to erase the flash memory on the device.

When I attempt this with "$nrfjprog -f NRF52 --chiperase --log", I get an error: "ERROR: JLinkARM DLL reported an error. ...", and the following log.log is produced:

[2020-Dec-10 15:04:06] [ info] --------------------------------------------------------------------------------
[2020-Dec-10 15:04:06] [ info] nrfjprog -f NRF52 --chiperase --log 
[2020-Dec-10 15:04:06] [ info] nrfjprog version 10.12.1 
[2020-Dec-10 15:04:06] [ info] --------------------------------------------------------------------------------
[2020-Dec-10 15:04:06] [debug] [ nRF0x0] - open_dll
[2020-Dec-10 15:04:06] [ info] [ nRF0x0] - Load library at C:\Program Files (x86)\Nordic Semiconductor\nrf-command-line-tools\bin\JLINKARM_NRF52_NRFJPROG.dll.
[2020-Dec-10 15:04:06] [ info] [ nRF0x0] - Library loaded, loading member functions.
[2020-Dec-10 15:04:06] [ info] [ nRF0x0] - Member functions succesfully loaded.
[2020-Dec-10 15:04:06] [ info] [Backend] - Logger callback at 0xcf2020 registered in Segger backend logger.
[2020-Dec-10 15:04:06] [ info] [  JLink] - [Info    ] [JLink     ] Logger callback at 0xcf2020 registered in JLink logger.
[2020-Dec-10 15:04:06] [debug] [nRF520x0] - open
[2020-Dec-10 15:04:06] [debug] [Backend] - open_dll
[2020-Dec-10 15:04:06] [ info] [Backend] - No J-Link DLL path was provided. Attempting to auto detect.
[2020-Dec-10 15:04:06] [ info] [Backend] - Load library at C:\Program Files (x86)\SEGGER\JLink\JLinkARM.dll.
[2020-Dec-10 15:04:06] [ info] [Backend] - Library loaded, loading member functions.
[2020-Dec-10 15:04:06] [ info] [Backend] - Member functions succesfully loaded.
[2020-Dec-10 15:04:06] [debug] [Backend] - dll_version
[2020-Dec-10 15:04:06] [ info] [Backend] - Segger dll version 6.88.c loaded.
[2020-Dec-10 15:04:06] [debug] [ nRF0x0] - enum_emu_snr
[2020-Dec-10 15:04:06] [debug] [nRF520x0] - enum_emu_snr
[2020-Dec-10 15:04:06] [debug] [Backend] - is_connected_to_emu
[2020-Dec-10 15:04:06] [debug] [Backend] - enum_emu_snr
[2020-Dec-10 15:04:06] [debug] [Backend] - ---just_enum_emu_snr
[2020-Dec-10 15:04:06] [debug] [Backend] - ---just_get_num_emus
[2020-Dec-10 15:04:06] [debug] [Backend] - is_connected_to_emu
[2020-Dec-10 15:04:06] [debug] [ nRF0x0] - connect_to_emu_with_snr
[2020-Dec-10 15:04:06] [debug] [nRF520x0] - connect_to_emu_with_snr
[2020-Dec-10 15:04:06] [debug] [Backend] - is_connected_to_emu
[2020-Dec-10 15:04:06] [debug] [Backend] - connect_to_emu_with_snr
[2020-Dec-10 15:04:06] [debug] [Backend] - is_connected_to_emu
[2020-Dec-10 15:04:06] [debug] [Backend] - ---just_enum_emu_snr
[2020-Dec-10 15:04:06] [debug] [Backend] - ---just_get_num_emus
[2020-Dec-10 15:04:06] [debug] [Backend] - ---just_connect_to_emu_with_snr
[2020-Dec-10 15:04:06] [debug] [Backend] - ---just_connect_to_emu_without_snr
[2020-Dec-10 15:04:06] [ info] [Backend] - Segger logging enabled.
[2020-Dec-10 15:04:06] [ info] [  JLink] - [Info    ] [JLink     ] Firmware: J-Link OB-SAM3U128-V2-NordicSemi compiled Mar 17 2020 14:43:00
[2020-Dec-10 15:04:06] [ info] [  JLink] - [Info    ] [JLink     ] Hardware: V1.00
[2020-Dec-10 15:04:06] [ info] [  JLink] - [Info    ] [JLink     ] S/N: 682519921
[2020-Dec-10 15:04:06] [ info] [  JLink] - [Info    ] [JLink     ] OEM: SEGGER
[2020-Dec-10 15:04:06] [ info] [  JLink] - [Info    ] [JLink     ] Feature(s): RDI, FlashBP, FlashDL, JFlash, GDB
[2020-Dec-10 15:04:06] [ info] [  JLink] - [Info    ] [JLink     ] TELNET listener socket opened on port 19021
[2020-Dec-10 15:04:06] [ info] [  JLink] - [Info    ] [JLink     ] WEBSRV Starting webserver
[2020-Dec-10 15:04:06] [ info] [  JLink] - [Info    ] [JLink     ] WEBSRV Failed to put socket into listener state (port 19080)
[2020-Dec-10 15:04:06] [ info] [  JLink] - [Info    ] [JLink     ] WEBSRV Webserver running on local port 19081
[2020-Dec-10 15:04:06] [ info] [  JLink] - [Info    ] [JLink     ] - 8.012ms returns "O.K."  
[2020-Dec-10 15:04:06] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2020-Dec-10 15:04:06] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_Lock()  
[2020-Dec-10 15:04:06] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_GetHWStatus(...)  
[2020-Dec-10 15:04:06] [ info] [  JLink] - [Info    ] [JLink     ] - 0.216ms returns 0  
[2020-Dec-10 15:04:06] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2020-Dec-10 15:04:06] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_ExecCommand("SetRestartOnClose = 0", ...).   
[2020-Dec-10 15:04:06] [ info] [  JLink] - [Info    ] [JLink     ] - 0.005ms returns 0x01  
[2020-Dec-10 15:04:06] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2020-Dec-10 15:04:06] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_ExecCommand("DisableFlashDL", ...).   
[2020-Dec-10 15:04:06] [ info] [  JLink] - [Info    ] [JLink     ] - 0.004ms returns 0x00  
[2020-Dec-10 15:04:06] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2020-Dec-10 15:04:06] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_ExecCommand("ExcludeFlashCacheRange 0x0-0xFFFFFFFF", ...).   
[2020-Dec-10 15:04:06] [ info] [  JLink] - [Info    ] [JLink     ] - 0.004ms returns 0x00  
[2020-Dec-10 15:04:06] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2020-Dec-10 15:04:06] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_SetHookUnsecureDialog  
[2020-Dec-10 15:04:06] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_SetHookUnsecureDialog(...)
[2020-Dec-10 15:04:06] [ info] [  JLink] - [Info    ] [JLink     ] - 0.020ms returns 0  
[2020-Dec-10 15:04:06] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2020-Dec-10 15:04:06] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_TIF_Select(JLINKARM_TIF_SWD)  
[2020-Dec-10 15:04:06] [ info] [  JLink] - [Info    ] [JLink     ] - 0.727ms returns 0x00  
[2020-Dec-10 15:04:06] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2020-Dec-10 15:04:06] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_SetSpeed(2000)  
[2020-Dec-10 15:04:06] [ info] [  JLink] - [Info    ] [JLink     ] - 0.053ms  
[2020-Dec-10 15:04:06] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2020-Dec-10 15:04:06] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_GetSN()  
[2020-Dec-10 15:04:06] [ info] [  JLink] - [Info    ] [JLink     ] - 0.013ms returns 682519921  
[2020-Dec-10 15:04:06] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2020-Dec-10 15:04:06] [debug] [Backend] - ---just_load_core_data
[2020-Dec-10 15:04:06] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_ExecCommand("CORESIGHT_SetIndexAHBAPToUse = 0", ...).   
[2020-Dec-10 15:04:06] [ info] [  JLink] - [Info    ] [JLink     ] - 0.004ms returns 0x00  
[2020-Dec-10 15:04:06] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2020-Dec-10 15:04:06] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_ExecCommand("device = nRF52", ...).   
[2020-Dec-10 15:04:06] [ info] [  JLink] - [Info    ] [JLink     ] XML file found at: C:\Program Files (x86)\SEGGER\JLink\JLinkDevices.xml 
[2020-Dec-10 15:04:06] [ info] [  JLink] - [Info    ] [JLink     ] C:\Program Files (x86)\SEGGER\JLink\JLinkDevices.xml evaluated successfully. 
[2020-Dec-10 15:04:06] [ info] [  JLink] - [Info    ] [JLink     ] Device "NRF52" selected.
[2020-Dec-10 15:04:06] [ info] [  JLink] - [Info    ] [JLink     ] Device "NRF52" selected.
[2020-Dec-10 15:04:06] [ info] [  JLink] - [Info    ] [JLink     ] - 29.154ms returns 0x00  
[2020-Dec-10 15:04:06] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2020-Dec-10 15:04:06] [debug] [Backend] - read_debug_port_idr
[2020-Dec-10 15:04:06] [debug] [Backend] - read_debug_port_register
[2020-Dec-10 15:04:06] [debug] [Backend] - ---just_read_debug_port_register
[2020-Dec-10 15:04:06] [debug] [Backend] - coresight_configure
[2020-Dec-10 15:04:06] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_CORESIGHT_Configure()  
[2020-Dec-10 15:04:06] [ info] [  JLink] - [Info    ] [JLink     ] - 101.703ms returns 0  
[2020-Dec-10 15:04:06] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2020-Dec-10 15:04:06] [debug] [Backend] - ---just_select_debug_port_register
[2020-Dec-10 15:04:06] [debug] [Backend] - Select AP 255, DP Bank 0, AP Bank 255
[2020-Dec-10 15:04:06] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)  
[2020-Dec-10 15:04:06] [ info] [  JLink] - [Info    ] [JLink     ] - 1.405ms returns -1  
[2020-Dec-10 15:04:06] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2020-Dec-10 15:04:06] [ info] [Backend] - JLinkARM.dll reported "-1", an unknown error.
[2020-Dec-10 15:04:06] [debug] [Backend] - ---just_abort_debug_action
[2020-Dec-10 15:04:06] [ info] [Backend] - Attempting to clear any configuration errors in debug port before closing connection. 
[2020-Dec-10 15:04:06] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
[2020-Dec-10 15:04:06] [ info] [  JLink] - [Info    ] [JLink     ] - 1.262ms returns -1  
[2020-Dec-10 15:04:06] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2020-Dec-10 15:04:06] [ info] [Backend] - JLinkARM.dll reported "-1", an unknown error.
[2020-Dec-10 15:04:06] [ info] [  JLink] - [Info    ] [JLink     ] - 0.103ms  
[2020-Dec-10 15:04:06] [debug] [ nRF0x0] - close_dll
[2020-Dec-10 15:04:06] [debug] [nRF520x0] - close
[2020-Dec-10 15:04:06] [debug] [Backend] - is_connected_to_emu
[2020-Dec-10 15:04:06] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_IsOpen()  
[2020-Dec-10 15:04:06] [ info] [  JLink] - [Info    ] [JLink     ] - 0.049ms returns 0x01  
[2020-Dec-10 15:04:06] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2020-Dec-10 15:04:06] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_Lock()  
[2020-Dec-10 15:04:06] [debug] [Backend] - close
[2020-Dec-10 15:04:06] [debug] [Backend] - disconnect_from_emu
[2020-Dec-10 15:04:06] [debug] [Backend] - ---just_disconnect_from_emu
[2020-Dec-10 15:04:06] [debug] [Backend] - is_connected_to_device
[2020-Dec-10 15:04:06] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_IsConnected()  
[2020-Dec-10 15:04:06] [ info] [  JLink] - [Info    ] [JLink     ] - 0.039ms returns FALSE  
[2020-Dec-10 15:04:06] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2020-Dec-10 15:04:06] [debug] [Backend] - ---just_is_debug_region_powered
[2020-Dec-10 15:04:06] [debug] [Backend] - ---just_read_debug_port_register
[2020-Dec-10 15:04:06] [debug] [Backend] - ---just_select_debug_port_register
[2020-Dec-10 15:04:06] [debug] [Backend] - Select AP 255, DP Bank 0, AP Bank 255
[2020-Dec-10 15:04:06] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)  
[2020-Dec-10 15:04:06] [ info] [  JLink] - [Info    ] [JLink     ] - 1.098ms returns -1  
[2020-Dec-10 15:04:06] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2020-Dec-10 15:04:06] [ info] [Backend] - JLinkARM.dll reported "-1", an unknown error.
[2020-Dec-10 15:04:06] [debug] [Backend] - ---just_abort_debug_action
[2020-Dec-10 15:04:06] [ info] [Backend] - Attempting to clear any configuration errors in debug port before closing connection. 
[2020-Dec-10 15:04:06] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
[2020-Dec-10 15:04:06] [ info] [  JLink] - [Info    ] [JLink     ] - 1.207ms returns -1  
[2020-Dec-10 15:04:06] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2020-Dec-10 15:04:06] [ info] [Backend] - JLinkARM.dll reported "-1", an unknown error.
[2020-Dec-10 15:04:06] [ info] [  JLink] - [Info    ] [JLink     ] - 0.102ms  
[2020-Dec-10 15:04:06] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_Close()  
[2020-Dec-10 15:04:06] [debug] [Backend] - Segger Backend closed.
[2020-Dec-10 15:04:06] [debug] [nRF520x0] - nRF family DLL closed

The eval board is connected to my Windows PC via USB and appears in Windows Explorer as an external drive.

Any help would be appreciated

Parents Reply Children
No Data
Related