RAK815 JLink Commander connect issue

Issue: Jlink Edu Mini can’t connect to RAK815 target. I would like to push a DFU bootloader to nrf52. But I can’t connect to it with the Jlink.Any clue ? Thx, Luc

Setup:RAK815 Jlink Mini EDU SWD connection

Server:

Details:
[2020-Dec-20 22:42:46] [ info] [ JLink] - [Info ] [JLink ] Firmware: J-Link EDU Mini V1 compiled Nov 12 2020 13:31:42
[2020-Dec-20 22:42:46] [ info] [ JLink] - [Info ] [JLink ] Decompressing FW timestamp took 114 us
[2020-Dec-20 22:42:46] [ info] [ JLink] - [Info ] [JLink ] Hardware: V1.00
[2020-Dec-20 22:42:46] [ info] [ JLink] - [Info ] [JLink ] S/N: 801027752
[2020-Dec-20 22:42:46] [ info] [ JLink] - [Info ] [JLink ] OEM: SEGGER
[2020-Dec-20 22:42:46] [ info] [ JLink] - [Info ] [JLink ] Feature(s): FlashBP, GDB
[2020-Dec-20 22:42:46] [ info] [ JLink] - [Info ] [JLink ] TELNET listener socket opened on port 19021
[2020-Dec-20 22:42:46] [ info] [ JLink] - [Info ] [JLink ] WEBSRV Starting webserver
[2020-Dec-20 22:42:46] [ info] [ JLink] - [Info ] [JLink ] WEBSRV Webserver running on local port 19080
[2020-Dec-20 22:42:46] [ info] [ JLink] - [Info ] [JLink ] - 24.856ms returns “O.K.”
[2020-Dec-20 22:42:46] [ info] [ JLink] - [Info ] [JLink ] JLINK_HasError()
[2020-Dec-20 22:42:46] [ info] [ JLink] - [Info ] [JLink ] JLINK_Lock()
[2020-Dec-20 22:42:46] [ info] [ JLink] - [Info ] [JLink ] JLINK_GetHWStatus(…)
[2020-Dec-20 22:42:46] [ info] [ JLink] - [Info ] [JLink ] - 0.308ms returns 0
[2020-Dec-20 22:42:46] [ info] [ JLink] - [Info ] [JLink ] JLINK_HasError()
[2020-Dec-20 22:42:46] [ info] [ JLink] - [Info ] [JLink ] JLINK_ExecCommand(“SetRestartOnClose = 0”, …).
[2020-Dec-20 22:42:46] [ info] [ JLink] - [Info ] [JLink ] - 0.003ms returns 0x01
[2020-Dec-20 22:42:46] [ info] [ JLink] - [Info ] [JLink ] JLINK_HasError()
[2020-Dec-20 22:42:46] [ info] [ JLink] - [Info ] [JLink ] JLINK_ExecCommand(“DisableFlashDL”, …).
[2020-Dec-20 22:42:46] [ info] [ JLink] - [Info ] [JLink ] - 0.004ms returns 0x00
[2020-Dec-20 22:42:46] [ info] [ JLink] - [Info ] [JLink ] JLINK_HasError()
[2020-Dec-20 22:42:46] [ info] [ JLink] - [Info ] [JLink ] JLINK_ExecCommand(“ExcludeFlashCacheRange 0x0-0xFFFFFFFF”, …).
[2020-Dec-20 22:42:46] [ info] [ JLink] - [Info ] [JLink ] - 0.005ms returns 0x00
[2020-Dec-20 22:42:46] [ info] [ JLink] - [Info ] [JLink ] JLINK_HasError()
[2020-Dec-20 22:42:46] [ info] [ JLink] - [Info ] [JLink ] JLINK_SetHookUnsecureDialog
[2020-Dec-20 22:42:46] [ info] [ JLink] - [Info ] [JLink ] JLINK_SetHookUnsecureDialog(…)
[2020-Dec-20 22:42:46] [ info] [ JLink] - [Info ] [JLink ] - 0.021ms returns 0
[2020-Dec-20 22:42:46] [ info] [ JLink] - [Info ] [JLink ] JLINK_HasError()
[2020-Dec-20 22:42:46] [ info] [ JLink] - [Info ] [JLink ] JLINK_TIF_Select(JLINKARM_TIF_SWD)
[2020-Dec-20 22:42:46] [ info] [ JLink] - [Info ] [JLink ] - 1.020ms returns 0x00
[2020-Dec-20 22:42:46] [ info] [ JLink] - [Info ] [JLink ] JLINK_HasError()
[2020-Dec-20 22:42:46] [ info] [ JLink] - [Info ] [JLink ] JLINK_HasError()
[2020-Dec-20 22:42:46] [ info] [ JLink] - [Info ] [JLink ] JLINK_SetSpeed(2000)
[2020-Dec-20 22:42:46] [ info] [ JLink] - [Info ] [JLink ] - 0.157ms
[2020-Dec-20 22:42:46] [ info] [ JLink] - [Info ] [JLink ] JLINK_HasError()
[2020-Dec-20 22:42:46] [ info] [ JLink] - [Info ] [JLink ] JLINK_GetSN()
[2020-Dec-20 22:42:46] [ info] [ JLink] - [Info ] [JLink ] - 0.013ms returns 801027752
[2020-Dec-20 22:42:46] [ info] [ JLink] - [Info ] [JLink ] JLINK_HasError()
[2020-Dec-20 22:42:46] [debug] [Backend] - —just_load_core_data
[2020-Dec-20 22:42:46] [ info] [ JLink] - [Info ] [JLink ] JLINK_ExecCommand(“CORESIGHT_SetIndexAHBAPToUse = 0”, …).
[2020-Dec-20 22:42:46] [ info] [ JLink] - [Info ] [JLink ] - 0.004ms returns 0x00
[2020-Dec-20 22:42:46] [ info] [ JLink] - [Info ] [JLink ] JLINK_HasError()
[2020-Dec-20 22:42:46] [ info] [ JLink] - [Info ] [JLink ] JLINK_ExecCommand(“device = nRF52”, …).
[2020-Dec-20 22:42:46] [ info] [ JLink] - [Info ] [JLink ] XML file found at: /opt/SEGGER/JLink/JLinkDevices.xml
[2020-Dec-20 22:42:46] [ info] [ JLink] - [Info ] [JLink ] /opt/SEGGER/JLink/JLinkDevices.xml evaluated successfully.
[2020-Dec-20 22:42:46] [ info] [ JLink] - [Info ] [JLink ] Device “NRF52” selected.
[2020-Dec-20 22:42:46] [ info] [ JLink] - [Info ] [JLink ] Device “NRF52” selected.
[2020-Dec-20 22:42:46] [ info] [ JLink] - [Info ] [JLink ] - 7.951ms returns 0x00
[2020-Dec-20 22:42:46] [ info] [ JLink] - [Info ] [JLink ] JLINK_HasError()
[2020-Dec-20 22:42:46] [debug] [Backend] - read_debug_port_idr
[2020-Dec-20 22:42:46] [debug] [Backend] - read_debug_port_register
[2020-Dec-20 22:42:46] [debug] [Backend] - —just_read_debug_port_register
[2020-Dec-20 22:42:46] [debug] [Backend] - coresight_configure
[2020-Dec-20 22:42:46] [ info] [ JLink] - [Info ] [JLink ] JLINK_CORESIGHT_Configure()
[2020-Dec-20 22:42:46] [ info] [ JLink] - [Info ] [JLink ] - 101.416ms returns 0
[2020-Dec-20 22:42:46] [ info] [ JLink] - [Info ] [JLink ] JLINK_HasError()
[2020-Dec-20 22:42:46] [debug] [Backend] - —just_select_debug_port_register
[2020-Dec-20 22:42:46] [debug] [Backend] - Select AP 255, DP Bank 0, AP Bank 255
[2020-Dec-20 22:42:46] [ info] [ JLink] - [Info ] [JLink ] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)
[2020-Dec-20 22:42:46] [ info] [ JLink] - [Info ] [JLink ] - 1.968ms returns -1
[2020-Dec-20 22:42:46] [ info] [ JLink] - [Info ] [JLink ] JLINK_HasError()
[2020-Dec-20 22:42:46] [ info] [Backend] - JLinkARM.dll reported “-1”, an unknown error.
[2020-Dec-20 22:42:46] [debug] [Backend] - —just_abort_debug_action
[2020-Dec-20 22:42:46] [ info] [Backend] - Attempting to clear any configuration errors in debug port before closing connection.
[2020-Dec-20 22:42:46] [ info] [ JLink] - [Info ] [JLink ] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)
[2020-Dec-20 22:42:46] [ info] [ JLink] - [Info ] [JLink ] - 1.967ms returns -1
[2020-Dec-20 22:42:46] [ info] [ JLink] - [Info ] [JLink ] JLINK_HasError()
[2020-Dec-20 22:42:46] [ info] [Backend] - JLinkARM.dll reported “-1”, an unknown error.
[2020-Dec-20 22:42:46] [ info] [ JLink] - [Info ] [JLink ] - 0.252ms
[2020-Dec-20 22:42:46] [debug] [ nRF0x0] - close_dll
[2020-Dec-20 22:42:46] [debug] [nRF520x0] - close
[2020-Dec-20 22:42:46] [debug] [Backend] - is_connected_to_emu
[2020-Dec-20 22:42:46] [ info] [ JLink] - [Info ] [JLink ] JLINK_IsOpen()
[2020-Dec-20 22:42:46] [ info] [ JLink] - [Info ] [JLink ] - 0.087ms returns 0x01
[2020-Dec-20 22:42:46] [ info] [ JLink] - [Info ] [JLink ] JLINK_HasError()
[2020-Dec-20 22:42:46] [ info] [ JLink] - [Info ] [JLink ] JLINK_Lock()
[2020-Dec-20 22:42:46] [debug] [Backend] - close
[2020-Dec-20 22:42:46] [debug] [Backend] - disconnect_from_emu
[2020-Dec-20 22:42:46] [debug] [Backend] - —just_disconnect_from_emu

J-Link>st
VTref=3.299V
TCK=0 TDI=0 TDO=0 TMS=0 TRES=1 TRST=?
Supported target interface speeds:

  • 96 MHz/n, (n>=24). => 4000kHz, 3840kHz, 3692kHz, …
    J-Link>

J-Link>selemu
J-Link[0]: Connection: USB, Serial number: 801027752, ProductName: J-Link EDU Mini
Select emulator index: 0
Disconnecting from J-Link…O.K.
Connecting to J-Link via USB…O.K.
Firmware: J-Link EDU Mini V1 compiled Nov 12 2020 13:31:42
Hardware version: V1.00
S/N: 801027752
License(s): FlashBP, GDB
VTref=3.299V
J-Link>

J-Link>connect
Device “NRF52832_XXAA” selected.

Connecting to target via SWD
InitTarget() start
InitTarget() end
InitTarget() start
InitTarget() end
InitTarget() start
InitTarget() end
InitTarget() start
InitTarget() end
Cannot connect to target.

Hi @LucRoadrunner,
Have you powered RAK815 from the USB while connecting with the JLink?

Yes, I did. The VCRef and Gnd pins show 3.299 V.
And the RAK815 as the Jlink Edu Mini is powered via a USB Hub self powered.

Google Photos
Google Photos

Based on the images that you uploaded I think that the wiring may be wrong, but I can’t see clearly on these images, so please check this again. Also, can you check the JLink on another device, to see if it works fine?

Thank You Nikola,
You gave me a good idea by checking JLink connectivity => the small flat cable was not plugged properly in the Jlink. Wrong direction…
Just missing a guide as on the SWD adapter on the JLink to avoid this kind of silly issue.
Things are much better now. simply great.
Kind regards,
Luc

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.