[SOLVED] J-Link Base not recognizing target board via SWD

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [SOLVED] J-Link Base not recognizing target board via SWD

    Hello:
    I have a problem with a recently purchased J-Link Base Classic.

    - I have a target board based on nRF52840.
    - I am developing with Visual Studio Code.

    CONNECTING MY TARGET BOARD TO A nRF52840-DK:
    - I connect it with 4 wires: VTG (power 3.3V from the DK), GND, SWDIO and SWDCLK.
    - Visual Studio Code finds the DK and the target board (see DK.jpg)
    - I can flash and debug my target board. THIS WAY I KNOW THE SWD INTERFACE IN MY TARGET BOARD IS OK.

    CONNECTING MY TARGET BOARD TO THE J-Link:
    - If I connect only VREF and GND from the Target connector to my target board, the board is powered and it starts working. I had seen somewhere that VREF didn't power the target board, but it's powering because the board is working fine.
    - If then I connect SWDIO and SWDCLK, Visual Studio Code detects the J-Link but not the target board (see VSCJlink.jpg). Notice the message "Cannot read properties of undefined (reading "find").
    - If I try to connect to the target board from J-Link Commander, see JLC.jpg

    I would appreciate any help, cause right now I just can't assure the JLink debugger is not failing.

    Regards,
    David Pérez.
    Images
    • JLC.JPG

      103.14 kB, 887×856, viewed 375 times
    • VSCJLink.JPG

      51.3 kB, 1,809×177, viewed 202 times
    • DK.JPG

      19.81 kB, 467×208, viewed 284 times
  • Is your nRF chip running at 3.3V?
    I am wondering that you connect VTref from the target to J-Link, while at the same time having J-Link configured for fixed VTref 3.3V.
    The only purpose for the „fixed VTref“ setting is to omit the VTref pin…

    Cannot really comment on the VSCode error,
    as this comes from either VSCode or rhe debug plugin, which are both not maintained by SEGGER.

    Considering that things work if you use a DK from Nordic in „debug out“ mode, I suspect a wiring issue when trying with the stand-alone J-Link V12, as even the very low-level SWD communication in J-Link Commander fails…
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • Hi Alex:
    As you said, I had a problem with wiring (I misunderstood the Target connector pinout). Now everything is working fine and I can debug from VSC. Additionally, I have had to power my custom board with an external power supply (I thought the JLink could power the terget board).

    Thank you for your help,
    David.
  • Hi David,

    OK, good to hear that. :)
    Btw, the BASE/PLUS can indeed supply 5V to the target via pin 19 of the J-Link connector:
    wiki.segger.com/J-Link_Commander#Power
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.