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

nRF52382 not connect to j-link(EDU)

I have connecting problem.

My setting...

1. OS : win10 x64

    emulator : J-link(EDU)

2. installed

    1) nRF5x-Command-Line-Tools_9_7_3_Installer.exe

    2) nrfgostudio_win-64_1.21.2_installer.msi

    3) J-Link driver(6.32d) , I already tried 6.22g.

3. Test board : "nRF52832 Bluefruit feather"

    link : https://cdn-learn.adafruit.com/downloads/pdf/bluefruit-nrf52-feather-learning-guide.pdf

4. J-Link command message

====================================================================================================

SEGGER J-Link Commander V6.32d (Compiled May 25 2018 17:03:32)
DLL version V6.32d, compiled May 25 2018 17:03:12

Connecting to J-Link via USB...O.K.
Firmware: J-Link V10 compiled Apr 20 2018 16:47:09
Hardware version: V10.10
S/N: 2--------
License(s): FlashBP, GDB
OEM: SEGGER-EDU
VTref=3.339V


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


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

====================================================================================================

5. .log file of "nrfjprog.exe"

====================================================================================================

--------------------------------------------------------------------------------
nrfjprog -e -f nrf52 --log
nrfjprog version 9.7.3
--------------------------------------------------------------------------------
nRF_open_dll
. nRF52_open_dll
. . nRF52_dll_version
nRF_enum_emu_snr
. nRF52_enum_emu_snr
. . nRF52_enum_emu_snr
nRF_enum_emu_snr
. nRF52_enum_emu_snr
. . nRF52_enum_emu_snr
nRF_connect_to_emu_with_snr
. nRF52_connect_to_emu_with_snr
. . nRF52_is_connected_to_emu
. . nRF52_enum_emu_snr
. . nRF52_connect_to_emu_with_snr
. . . nRF52_connect_to_emu_without_snr
. . . nRF52_connect_to_emu_without_snr: JLink:  Firmware: J-Link V10 compiled Apr 20 2018 16:47:09
. . . nRF52_connect_to_emu_without_snr: JLink:  Hardware: V10.10
. . . nRF52_connect_to_emu_without_snr: JLink:  S/N: 2--------
. . . nRF52_connect_to_emu_without_snr: JLink:  OEM: SEGGER-EDU
. . . nRF52_connect_to_emu_without_snr: JLink:  Feature(s): FlashBP, GDB
. . . nRF52_connect_to_emu_without_snr: JLink:  TELNET listener socket opened on port 19021
. . . nRF52_connect_to_emu_without_snr: JLink: WEBSRV  Starting webserver
. . . nRF52_connect_to_emu_without_snr: JLink:  (0038ms, 0047ms total) 
. . . nRF52_connect_to_emu_without_snr: JLink: WEBSRV Webserver running on local port 19080
. . . nRF52_connect_to_emu_without_snr: JLink:  (0045ms, 0054ms total) 
. . . nRF52_connect_to_emu_without_snr: JLink:   returns O.K.
. . . nRF52_connect_to_emu_without_snr: JLink:  (0053ms, 0062ms total) 
. . . nRF52_connect_to_emu_without_snr: JLink: JLINK_GetHWStatus(...)
. . . nRF52_connect_to_emu_without_snr: JLink:   returns 0x00
. . . nRF52_connect_to_emu_without_snr: JLink:  (0008ms, 0075ms total) 
. . . nRF52_connect_to_emu_without_snr: There is no generic nRF52 device in J-Link, so we select NRF52832_xxAA.

. . . nRF52_connect_to_emu_without_snr: JLink: JLINK_ExecCommand("Device = NRF52832_xxAA", ...).
. . . nRF52_connect_to_emu_without_snr: JLink: XML file found at: C:\Program Files (x86)\SEGGER\JLink_V632d\JLinkDevices.xml
. . . nRF52_connect_to_emu_without_snr: JLink:  (0103ms, 0193ms total) 
. . . nRF52_connect_to_emu_without_snr: JLink: C:\Program Files (x86)\SEGGER\JLink_V632d\JLinkDevices.xml evaluated successfully.
. . . nRF52_connect_to_emu_without_snr: JLink: Device "NRF52832_XXAA" selected.
. . . nRF52_connect_to_emu_without_snr: JLink: Device "NRF52832_XXAA" selected.
. . . nRF52_connect_to_emu_without_snr: JLink:   returns 0x00
. . . nRF52_connect_to_emu_without_snr: JLink:  (0169ms, 0259ms total) 
. . . nRF52_connect_to_emu_without_snr: JLink: JLINK_ExecCommand("SetRestartOnClose = 0", ...).
. . . nRF52_connect_to_emu_without_snr: JLink:   returns 0x01
. . . nRF52_connect_to_emu_without_snr: JLink:  (0004ms, 0270ms total) 
. . . nRF52_connect_to_emu_without_snr: JLink: JLINK_ExecCommand("DisableFlashDL", ...).
. . . nRF52_connect_to_emu_without_snr: JLink:   returns 0x00
. . . nRF52_connect_to_emu_without_snr: JLink:  (0004ms, 0281ms total) 
. . . nRF52_connect_to_emu_without_snr: JLink: JLINK_ExecCommand("SetDbgPowerDownOnClose = 1", ...).
. . . nRF52_connect_to_emu_without_snr: JLink:   returns 0x01
. . . nRF52_connect_to_emu_without_snr: JLink:  (0003ms, 0290ms total) 
. . . nRF52_connect_to_emu_without_snr: JLink: JLINK_ExecCommand("ExcludeFlashCacheRange 0x0-0xFFFFFFFF", ...).
. . . nRF52_connect_to_emu_without_snr: JLink:   returns 0x00
. . . nRF52_connect_to_emu_without_snr: JLink:  (0003ms, 0299ms total) 
. . . nRF52_connect_to_emu_without_snr: JLink: JLINK_TIF_Select(JLINKARM_TIF_SWD)
. . . nRF52_connect_to_emu_without_snr: JLink:   returns 0x00
. . . nRF52_connect_to_emu_without_snr: JLink:  (0007ms, 0309ms total) 
. . . nRF52_connect_to_emu_without_snr: JLink: JLINK_SetSpeed(2000)
. . . nRF52_connect_to_emu_without_snr: JLink:  (0003ms, 0316ms total) 
nRF_read_device_version
. nRF52_read_device_version
. . nRF52_is_connected_to_emu
. . nRF52_is_connected_to_emu: JLink: JLINK_IsOpen()
. . nRF52_is_connected_to_emu: JLink:   returns 0x01
. . nRF52_is_connected_to_emu: JLink:  (0012ms, 0331ms total) 
. . nRF52_is_connected_to_device
. . nRF52_is_connected_to_device: JLink: JLINK_IsConnected()
. . nRF52_is_connected_to_device: JLink:   returns FALSE
. . nRF52_is_connected_to_device: JLink:  (0007ms, 0341ms total) 
. . nRF52_readback_status
. . . nRF52_is_ctrl_ap_available
. . . . nRF52_read_access_port_register
. . . . . nRF52_coresight_configure
. . . . . nRF52_coresight_configure: JLink: JLINK_CORESIGHT_Configure()
. . . . . nRF52_coresight_configure: JLink:   returns 0
. . . . . nRF52_coresight_configure: JLink:  (0117ms, 0461ms total) 
. . . . . nRF52_power_debug_and_system_regions
. . . . . . nRF52_write_debug_port_register
. . . . . . nRF52_write_debug_port_register: JLink: JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)
. . . . . . nRF52_write_debug_port_register: JLink:   returns -1
. . . . . . nRF52_write_debug_port_register: JLink:  (0007ms, 0479ms total) 
. . . . . . nRF52_write_debug_port_register: JLinkARM.dll CORESIGHT_WriteAPDPReg returned error -1.

. . . . . nRF52_power_debug_and_system_regions: JLinkARM.dll CORESIGHT_WriteAPDPReg returned error -102.

nRF_close_dll
. nRF52_close_dll
. . nRF52_is_connected_to_emu
. . nRF52_is_connected_to_emu: JLink: JLINK_IsOpen()
. . nRF52_is_connected_to_emu: JLink:   returns 0x01
. . nRF52_is_connected_to_emu: JLink:  (0007ms, 0490ms total) 
. . nRF52_disconnect_from_emu
. . . nRF52_is_connected_to_device
. . . nRF52_is_connected_to_device: JLink: JLINK_IsConnected()
. . . nRF52_is_connected_to_device: JLink:   returns FALSE
. . . nRF52_is_connected_to_device: JLink:  (0006ms, 0499ms total) 
. . . nRF52_unpower_debug_and_system_regions
. . nRF52_disconnect_from_emu: JLink: JLINK_Close()
--------------------------------------------------------------------------------
nrfjprog --recover --log
nrfjprog version 9.7.3
--------------------------------------------------------------------------------
nRF_open_dll
. nRFXX_open_dll
. . nRFXX_dll_version
nRF_enum_emu_snr
. nRFXX_enum_emu_snr
nRF_enum_emu_snr
. nRFXX_enum_emu_snr
nRF_connect_to_emu_with_snr
. nRFXX_connect_to_emu_with_snr
. . nRFXX_is_connected_to_emu
. . nRFXX_connect_to_emu_without_snr
. . . nRFXX_is_connected_to_emu
. . . nRFXX_enum_emu_snr
. . nRFXX_connect_to_emu_without_snr: JLink:  Firmware: J-Link V10 compiled Apr 20 2018 16:47:09
. . nRFXX_connect_to_emu_without_snr: JLink:  Hardware: V10.10
. . nRFXX_connect_to_emu_without_snr: JLink:  S/N: 2--------
. . nRFXX_connect_to_emu_without_snr: JLink:  OEM: SEGGER-EDU
. . nRFXX_connect_to_emu_without_snr: JLink:  Feature(s): FlashBP, GDB
. . nRFXX_connect_to_emu_without_snr: JLink:  TELNET listener socket opened on port 19021
. . nRFXX_connect_to_emu_without_snr: JLink: WEBSRV  Starting webserver
. . nRFXX_connect_to_emu_without_snr: JLink:  (0040ms, 0047ms total) 
. . nRFXX_connect_to_emu_without_snr: JLink: WEBSRV Webserver running on local port 19080
. . nRFXX_connect_to_emu_without_snr: JLink:  (0050ms, 0057ms total) 
. . nRFXX_connect_to_emu_without_snr: JLink:   returns O.K.
. . nRFXX_connect_to_emu_without_snr: JLink:  (0058ms, 0065ms total) 
. . nRFXX_connect_to_emu_without_snr: JLink: JLINK_GetHWStatus(...)
. . nRFXX_connect_to_emu_without_snr: JLink:   returns 0x00
. . nRFXX_connect_to_emu_without_snr: JLink:  (0007ms, 0076ms total) 
. . nRFXX_connect_to_emu_without_snr: JLink: JLINK_ExecCommand("Device = NRF52832_xxAA", ...).
. . nRFXX_connect_to_emu_without_snr: JLink: XML file found at: C:\Program Files (x86)\SEGGER\JLink_V632d\JLinkDevices.xml
. . nRFXX_connect_to_emu_without_snr: JLink:  (0105ms, 0188ms total) 
. . nRFXX_connect_to_emu_without_snr: JLink: C:\Program Files (x86)\SEGGER\JLink_V632d\JLinkDevices.xml evaluated successfully.
. . nRFXX_connect_to_emu_without_snr: JLink: Device "NRF52832_XXAA" selected.
. . nRFXX_connect_to_emu_without_snr: JLink: Device "NRF52832_XXAA" selected.
. . nRFXX_connect_to_emu_without_snr: JLink:   returns 0x00
. . nRFXX_connect_to_emu_without_snr: JLink:  (0171ms, 0254ms total) 
. . nRFXX_connect_to_emu_without_snr: JLink: JLINK_ExecCommand("SetRestartOnClose = 0", ...).
. . nRFXX_connect_to_emu_without_snr: JLink:   returns 0x01
. . nRFXX_connect_to_emu_without_snr: JLink:  (0004ms, 0266ms total) 
. . nRFXX_connect_to_emu_without_snr: JLink: JLINK_ExecCommand("DisableFlashDL", ...).
. . nRFXX_connect_to_emu_without_snr: JLink:   returns 0x00
. . nRFXX_connect_to_emu_without_snr: JLink:  (0004ms, 0278ms total) 
. . nRFXX_connect_to_emu_without_snr: JLink: JLINK_ExecCommand("SetDbgPowerDownOnClose = 1", ...).
. . nRFXX_connect_to_emu_without_snr: JLink:   returns 0x01
. . nRFXX_connect_to_emu_without_snr: JLink:  (0003ms, 0287ms total) 
. . nRFXX_connect_to_emu_without_snr: JLink: JLINK_ExecCommand("ExcludeFlashCacheRange 0x0-0xFFFFFFFF", ...).
. . nRFXX_connect_to_emu_without_snr: JLink:   returns 0x00
. . nRFXX_connect_to_emu_without_snr: JLink:  (0003ms, 0296ms total) 
. . nRFXX_connect_to_emu_without_snr: JLink: JLINK_TIF_Select(JLINKARM_TIF_SWD)
. . nRFXX_connect_to_emu_without_snr: JLink:   returns 0x00
. . nRFXX_connect_to_emu_without_snr: JLink:  (0007ms, 0307ms total) 
. . nRFXX_connect_to_emu_without_snr: JLink: JLINK_SetSpeed(2000)
. . nRFXX_connect_to_emu_without_snr: JLink:  (0003ms, 0314ms total) 
nRF_read_connected_emu_snr
. nRFXX_read_connected_emu_snr
. . nRFXX_is_connected_to_emu
. . nRFXX_is_connected_to_emu: JLink: JLINK_IsOpen()
. . nRFXX_is_connected_to_emu: JLink:   returns 0x01
. . nRFXX_is_connected_to_emu: JLink:  (0007ms, 0325ms total) 
nRF_read_device_family
. nRFXX_read_device_family
. . nRFXX_is_connected_to_emu
. . nRFXX_is_connected_to_emu: JLink: JLINK_IsOpen()
. . nRFXX_is_connected_to_emu: JLink:   returns 0x01
. . nRFXX_is_connected_to_emu: JLink:  (0006ms, 0335ms total) 
. . nRFXX_read_access_port_register
. . . nRFXX_coresight_configure
. . . nRFXX_coresight_configure: JLink: JLINK_CORESIGHT_Configure()
. . . nRFXX_coresight_configure: JLink:   returns 0
. . . nRFXX_coresight_configure: JLink:  (0116ms, 0454ms total) 
. . . nRFXX_power_debug_and_system_regions
. . . . nRFXX_write_debug_port_register
. . . . nRFXX_write_debug_port_register: JLink: JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)
. . . . nRFXX_write_debug_port_register: JLink:   returns -1
. . . . nRFXX_write_debug_port_register: JLink:  (0016ms, 0481ms total) 
. . . . nRFXX_write_debug_port_register: JLinkARM.dll CORESIGHT_WriteAPDPReg returned error -1.

. . . nRFXX_power_debug_and_system_regions: JLinkARM.dll CORESIGHT_WriteAPDPReg returned error -102.

nRF_close_dll
. nRFXX_close_dll
. . nRFXX_is_connected_to_emu
. . nRFXX_is_connected_to_emu: JLink: JLINK_IsOpen()
. . nRFXX_is_connected_to_emu: JLink:   returns 0x01
. . nRFXX_is_connected_to_emu: JLink:  (0007ms, 0492ms total) 
. . nRFXX_disconnect_from_emu
. . nRFXX_disconnect_from_emu: JLink: JLINK_Close()

===================================================================================================

5. My cortex-M3 board connected to same J-link(SWD), but nrf52382 not connect.

6. Also, my other laptop same.

Please advise. Thanks!

  • Hi, Håkon

    I find  cause of my problem.

    (A yellow signal is "SWDIO" and blue signal is "SWCLK")

    A red rectangle in this pictre is ACK signal ( nRF52 -> J-link).

    The voltage level of this ACK signal  is 3.3V ~2.5V.

    Thus, this signal is all "High vlotage".

    I am checking and thinking to solve this problem.

    Now I focus on "Pull-up registance".

    (I am aware that nrf 52 has internal pull-up registance.)

    Thanks!!

    kic84

  • Hi,

     

    Sorry for the late reply. I checked internally, and this is not something that we have seen before.

    The SWDIO pin is bidirectional, meaning it can be both input and output seen from both the debugger and the nRF.

    It looks like the the debugger overrides the output from the nRF, thus you only get a small "ripple" with the response from the nRF. Does this happen often in the trace? Normally, the segger connect procedure does several re-tries if it fails to connect.

     

    Best regards,

    Håkon

     

Related