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

Unable to debug external module

I'm having trouble debuging an external module with the j-link included in the nRF52840 DK.
I'm using the debug output provided in the P19 connector.

The connections are:

P19 Connector External module
Pin 1 EXT_VTG VDD
Pin 3 GND GND
Pin 5 GND GND
Pin 7 NC NC
Pin 9 EXT_GND_DETECT GND
Pin 2 EXT_SWDIO SWDIO
Pin 4 EXT_SWDCLK SWCLK
Pin 6 EXT_SWO NC
Pin 8 NC NC
Pin 10 EXT_RESET

RESET

The external module is powered from the nRF52840 DK. So I shorted the pads on SB47.

When I try to "Connect J-Link" in SES it pops an Error saying: Failed to connect to target. No idcode detected. Please check connection and Target Interface Type.

Following some other question in the devzone I've tried to recover the module using nrfjprog.
I get the next error:

$ nrfjprog.exe -f nrf52 --recover --log
Recovering device. This operation might take 30s.
ERROR: Recover failed. Please make sure that the correct device family is given
ERROR: and try again.

Log says:

2019-Jan-14 16:44:11  --------------------------------------------------------------------------------
2019-Jan-14 16:44:11  C:\Program Files\Nordic Semiconductor\nrf5x\bin\nrfjprog.exe -f nrf52 --recover --log
2019-Jan-14 16:44:11  nrfjprog version 9.8.1
2019-Jan-14 16:44:11  --------------------------------------------------------------------------------
2019-Jan-14 16:44:11  nRF_open_dll
2019-Jan-14 16:44:11  . nRF52_open_dll
2019-Jan-14 16:44:11  . . nRF52_dll_version
2019-Jan-14 16:44:11  nRF_enum_emu_snr
2019-Jan-14 16:44:11  . nRF52_enum_emu_snr
2019-Jan-14 16:44:11  . . nRF52_enum_emu_snr
2019-Jan-14 16:44:11  nRF_enum_emu_snr
2019-Jan-14 16:44:11  . nRF52_enum_emu_snr
2019-Jan-14 16:44:11  . . nRF52_enum_emu_snr
2019-Jan-14 16:44:11  nRF_connect_to_emu_with_snr
2019-Jan-14 16:44:11  . nRF52_connect_to_emu_with_snr
2019-Jan-14 16:44:11  . . nRF52_is_connected_to_emu
2019-Jan-14 16:44:11  . . nRF52_enum_emu_snr
2019-Jan-14 16:44:11  . . nRF52_connect_to_emu_with_snr
2019-Jan-14 16:44:11  . . . nRF52_connect_to_emu_without_snr
2019-Jan-14 16:44:11  . . . nRF52_connect_to_emu_without_snr:    JLink:     Firmware: J-Link OB-SAM3U128-V2-NordicSemi compiled Jul 12 2018 11:44:41
2019-Jan-14 16:44:11  . . . nRF52_connect_to_emu_without_snr:    JLink:     Hardware: V1.00
2019-Jan-14 16:44:11  . . . nRF52_connect_to_emu_without_snr:    JLink:     S/N: 683697139
2019-Jan-14 16:44:11  . . . nRF52_connect_to_emu_without_snr:    JLink:     TELNET listener socket opened on port 19021
2019-Jan-14 16:44:11  . . . nRF52_connect_to_emu_without_snr:    JLink:    WEBSRV  Starting webserver
2019-Jan-14 16:44:11  . . . nRF52_connect_to_emu_without_snr:    JLink:     (0021ms, 0025ms total)  
2019-Jan-14 16:44:11  . . . nRF52_connect_to_emu_without_snr:    JLink:    WEBSRV Webserver running on local port 19080
2019-Jan-14 16:44:11  . . . nRF52_connect_to_emu_without_snr:    JLink:     (0022ms, 0026ms total)  
2019-Jan-14 16:44:11  . . . nRF52_connect_to_emu_without_snr:    JLink:      returns O.K.
2019-Jan-14 16:44:11  . . . nRF52_connect_to_emu_without_snr:    JLink:     (0023ms, 0027ms total)  
2019-Jan-14 16:44:11  . . . nRF52_connect_to_emu_without_snr:    JLink:    JLINK_GetHWStatus(...)
2019-Jan-14 16:44:11  . . . nRF52_connect_to_emu_without_snr:    JLink:      returns 0x00
2019-Jan-14 16:44:11  . . . nRF52_connect_to_emu_without_snr:    JLink:     (0001ms, 0028ms total)  
2019-Jan-14 16:44:11  . . . nRF52_connect_to_emu_without_snr:    There is no generic nRF52 device in J-Link, so we select NRF52832_xxAA.

2019-Jan-14 16:44:11  . . . nRF52_connect_to_emu_without_snr:    JLink:    JLINK_ExecCommand("Device = NRF52832_xxAA", ...).
2019-Jan-14 16:44:11  . . . nRF52_connect_to_emu_without_snr:    JLink:    XML file found at: C:\Program Files (x86)\SEGGER\JLink_V640\JLinkDevices.xml
2019-Jan-14 16:44:11  . . . nRF52_connect_to_emu_without_snr:    JLink:     (0002ms, 0031ms total)  
2019-Jan-14 16:44:11  . . . nRF52_connect_to_emu_without_snr:    JLink:    C:\Program Files (x86)\SEGGER\JLink_V640\JLinkDevices.xml evaluated successfully.
2019-Jan-14 16:44:11  . . . nRF52_connect_to_emu_without_snr:    JLink:    Device "NRF52832_XXAA" selected.
2019-Jan-14 16:44:11  . . . nRF52_connect_to_emu_without_snr:    JLink:    Device "NRF52832_XXAA" selected.
2019-Jan-14 16:44:11  . . . nRF52_connect_to_emu_without_snr:    JLink:      returns 0x00
2019-Jan-14 16:44:11  . . . nRF52_connect_to_emu_without_snr:    JLink:     (0105ms, 0134ms total)  
2019-Jan-14 16:44:11  . . . nRF52_connect_to_emu_without_snr:    JLink:    JLINK_ExecCommand("SetRestartOnClose = 0", ...).
2019-Jan-14 16:44:11  . . . nRF52_connect_to_emu_without_snr:    JLink:      returns 0x01
2019-Jan-14 16:44:11  . . . nRF52_connect_to_emu_without_snr:    JLink:     (0000ms, 0135ms total)  
2019-Jan-14 16:44:11  . . . nRF52_connect_to_emu_without_snr:    JLink:    JLINK_ExecCommand("DisableFlashDL", ...).
2019-Jan-14 16:44:11  . . . nRF52_connect_to_emu_without_snr:    JLink:      returns 0x00
2019-Jan-14 16:44:11  . . . nRF52_connect_to_emu_without_snr:    JLink:     (0000ms, 0136ms total)  
2019-Jan-14 16:44:11  . . . nRF52_connect_to_emu_without_snr:    JLink:    JLINK_ExecCommand("SetDbgPowerDownOnClose = 1", ...).
2019-Jan-14 16:44:11  . . . nRF52_connect_to_emu_without_snr:    JLink:      returns 0x01
2019-Jan-14 16:44:11  . . . nRF52_connect_to_emu_without_snr:    JLink:     (0000ms, 0137ms total)  
2019-Jan-14 16:44:11  . . . nRF52_connect_to_emu_without_snr:    JLink:    JLINK_ExecCommand("ExcludeFlashCacheRange 0x0-0xFFFFFFFF", ...).
2019-Jan-14 16:44:11  . . . nRF52_connect_to_emu_without_snr:    JLink:      returns 0x00
2019-Jan-14 16:44:11  . . . nRF52_connect_to_emu_without_snr:    JLink:     (0000ms, 0138ms total)  
2019-Jan-14 16:44:11  . . . nRF52_connect_to_emu_without_snr:    JLink:    JLINK_TIF_Select(JLINKARM_TIF_SWD)
2019-Jan-14 16:44:11  . . . nRF52_connect_to_emu_without_snr:    JLink:      returns 0x00
2019-Jan-14 16:44:11  . . . nRF52_connect_to_emu_without_snr:    JLink:     (0003ms, 0142ms total)  
2019-Jan-14 16:44:11  . . . nRF52_connect_to_emu_without_snr:    JLink:    JLINK_SetSpeed(2000)
2019-Jan-14 16:44:11  . . . nRF52_connect_to_emu_without_snr:    JLink:     (0001ms, 0143ms total)  
2019-Jan-14 16:44:11  nRF_recover
2019-Jan-14 16:44:11  . nRF52_recover
2019-Jan-14 16:44:11  . . nRF52_is_connected_to_emu
2019-Jan-14 16:44:11  . . nRF52_is_connected_to_emu:    JLink:    JLINK_IsOpen()
2019-Jan-14 16:44:11  . . nRF52_is_connected_to_emu:    JLink:      returns 0x01
2019-Jan-14 16:44:11  . . nRF52_is_connected_to_emu:    JLink:     (0001ms, 0144ms total)  
2019-Jan-14 16:44:11  . . nRF52_is_connected_to_device
2019-Jan-14 16:44:11  . . nRF52_is_connected_to_device:    JLink:    JLINK_IsConnected()
2019-Jan-14 16:44:11  . . nRF52_is_connected_to_device:    JLink:      returns FALSE
2019-Jan-14 16:44:11  . . nRF52_is_connected_to_device:    JLink:     (0001ms, 0145ms total)  
2019-Jan-14 16:44:11  . . nRF52_readback_status
2019-Jan-14 16:44:11  . . . nRF52_is_ctrl_ap_available
2019-Jan-14 16:44:11  . . . . nRF52_read_access_port_register
2019-Jan-14 16:44:11  . . . . . nRF52_coresight_configure
2019-Jan-14 16:44:11  . . . . . nRF52_coresight_configure:    JLink:    JLINK_CORESIGHT_Configure()
2019-Jan-14 16:44:11  . . . . . nRF52_coresight_configure:    JLink:      returns 0
2019-Jan-14 16:44:11  . . . . . nRF52_coresight_configure:    JLink:     (0103ms, 0249ms total)  
2019-Jan-14 16:44:11  . . . . . nRF52_power_debug_and_system_regions
2019-Jan-14 16:44:11  . . . . . . nRF52_write_debug_port_register
2019-Jan-14 16:44:11  . . . . . . nRF52_write_debug_port_register:    JLink:    JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)
2019-Jan-14 16:44:11  . . . . . . nRF52_write_debug_port_register:    JLink:      returns -1
2019-Jan-14 16:44:11  . . . . . . nRF52_write_debug_port_register:    JLink:     (0002ms, 0251ms total)  
2019-Jan-14 16:44:11  . . . . . . nRF52_write_debug_port_register:    JLinkARM.dll CORESIGHT_WriteAPDPReg returned error -1.

2019-Jan-14 16:44:11  . . . . . nRF52_power_debug_and_system_regions:    JLinkARM.dll CORESIGHT_WriteAPDPReg returned error -102.

2019-Jan-14 16:44:11  nRF_close_dll
2019-Jan-14 16:44:11  . nRF52_close_dll
2019-Jan-14 16:44:11  . . nRF52_is_connected_to_emu
2019-Jan-14 16:44:11  . . nRF52_is_connected_to_emu:    JLink:    JLINK_IsOpen()
2019-Jan-14 16:44:11  . . nRF52_is_connected_to_emu:    JLink:      returns 0x01
2019-Jan-14 16:44:11  . . nRF52_is_connected_to_emu:    JLink:     (0001ms, 0252ms total)  
2019-Jan-14 16:44:11  . . nRF52_disconnect_from_emu
2019-Jan-14 16:44:11  . . . nRF52_is_connected_to_device
2019-Jan-14 16:44:11  . . . nRF52_is_connected_to_device:    JLink:    JLINK_IsConnected()
2019-Jan-14 16:44:11  . . . nRF52_is_connected_to_device:    JLink:      returns FALSE
2019-Jan-14 16:44:11  . . . nRF52_is_connected_to_device:    JLink:     (0001ms, 0253ms total)  
2019-Jan-14 16:44:11  . . . nRF52_unpower_debug_and_system_regions
2019-Jan-14 16:44:11  . . nRF52_disconnect_from_emu:    JLink:    JLINK_Close()

The module I'm using is the SKB501 from Skylab, which uses the nRF52840 chipset. Do I have to set the SoC reference in the nrfjprog parameters? As the log says " There is no generic nRF52 device in J-Link, so we select NRF52832_xxAA"

I've checked the Reset and SWD signals in the oscilloscope scope. The reset signal sets on 0v just for 50ms when I execute the nrfjprog command. It goes back to 3v3 while the SWDCLK and SWDIO signals are still showing some pulses.

I'd be really grateful if you just can check if those connections are OK or if you can give any other suggestion.
Best regards,

Parents Reply Children
Related