nRF54L DK can't program external MCU via SWD – J-Link error (Unknown Error in DLL)

Hello Nordic Team,

I’m trying to use the nRF54L DK to program an external MCU via SWD, but I’m encountering an error during connection. I’ve already followed this guide:

https://docs.nordicsemi.com/bundle/ug_nrf54l15_dk/page/UG/nRF54L15_DK/program_debug/program_ext_board.html

However, I’m still unable to connect to the external target via nRF Connect for Desktop – Programmer.

Here is the error log I get:

18:14:44.589	Error: Failed with exit code 1. Failed to device info one or more devices:
  * 1057763412: [Probe] Device error: Failed to write DebugPort register 2: Unknown Error in J-Link DLL (error code = -1)
  Message: Operation device-info failed
18:14:44.590	Using nrfutil device to communicate with target via JLink
18:14:45.728	Reading readback protection status for Application core
18:14:45.729	Failed "reading readback protection status for application core". 
  Error: code: 1, description: Generic, message: Batch task protection-get failed
18:14:45.892	Error: Failed with exit code 1. One or more batch tasks failed
  - [Probe] Device error: Failed to write DebugPort register 2: Unknown Error in J-Link DLL (error code = -1)

Interestingly, with the same external target, I’m able to successfully program it using an nRF54L PDK (another board), so I don’t think the issue is with the target itself.

  1. Are there any extra jumpers, settings required on the nRF54L DK to enable external MCU programming?

  2. Is there a known limitation when using nRF Connect Programmer with the nRF54L DK’s onboard debugger?

  3. Do I need to use nrfjprog or nrfutil manually instead of the GUI?

Any help or suggestions would be appreciated.

Thank you very much!

Best regards,
Doris

Parents
  • Hi

    1. There should not be needed anything different

    2. Not that i'm aware

    3. You need to use nrfutil, nrfjprog is deprecated ref Important: The nRF Command Line Tools have been archived and replaced by nRF Util. No further updates will be made to the nRF Command Line Tools. Last supported operating systems are Windows 10, Linux Ubuntu 22.04, and macOS 13. The nRF Command Line Tools will remain available for download, but do not install the SEGGER J-Link version they provide if you have a newer version installed.

    I suspect in your case the voltage on the target device and the DK is to big for the DK to program the device. I would recommend either using the 10 pin flat cable or using board configuration in nRF Connect for desktop and adjust the voltage closer to that of the current voltage. 

    Regards

    Runar

  • Hi Runar,

    Thank you for your reply!

    Regarding this part of your message:


    "I suspect in your case the voltage on the target device and the DK is too big for the DK to program the device."


    I'm not quite sure I fully understand what you meant. Could you please clarify what “too big” refers to?

    Are you referring to a voltage mismatch between the target device's supply voltage and the VTG on the nRF54L DK, which defines the I/O levels for the SWD interface?

    To clarify, here is my current setup:

    1. The target device is powered by an external 3.3 V power supply.

    2. I have configured the nRF54L DK's VDD (nPM VOUT1) to output 3.3 V using the Board Configurator tool in nRF Connect for Desktop.

    3. I am connecting to the external target via the 10-pin SWD header on the DK, with SWDIO, SWDCLK, GND, and VTG all properly connected.

    4. With this setup, the nRF54L DK is not able to detect the target at all (an error is shown in Programmer).
      Interestingly, when I use an nRF52 DK with the same external 3.3 V target setup, the target can be detected successfully, although flashing is not possible — which is expected.

    Could you provide more technical details on what kind of voltage mismatch might prevent the nRF54L DK from connecting to the target?

    Thanks again for your support.

    Best regards,
    Doris

  • I am facing the same problem. I can confirm that it works with a 52DK while it doesn't work with the 54DK. I created a separate ticket. 

  • Hi Runar,

    Apologies for the previous message in Chinese — that was my mistake. I've now rephrased everything in English for clarity (please see my previous message). I'd really appreciate it if you could take a look and let me know if the voltage setup looks correct to you.

    Also, your guess was spot on:
    With the nRF52 DK, the external target can be detected, although flashing is not possible — which is expected due to compatibility limitations.

    However, with the nRF54L DK, it always reports that multiple devices are detected, and fails to correctly identify the external target. I'm still unsure why that happens given the same setup works with the 52 DK.

    Thanks again for your time and help!

    Best regards,
    Doris

  • Hi   - I am able to program my external target via the nRF52840 DK. I built a merged hex file and flashed it. I also upgraded the JLink firmware on the board using the Jlink tools. It is not optimal but it gets the work done. 

  • Doris.chen said:
    I'm not quite sure I fully understand what you meant. Could you please clarify what “too big” refers to?

    My understanding is that there is something with the levelshifters on the 54series that will lead to a updated user manual where we specify a maximun length of the programming cable. How long is your cable? 

    Regards

    Runar

  • Hi Runar,

    I've done further testing on this issue and would like to share my findings.

    As previously mentioned, when trying to program an external MCU via SWD using the nRF54L DK, it seems that there may be a level shifting or signal integrity issue.

    I probed the SWD lines with an oscilloscope and observed the following:

    • SWDIO shows a clean square wave with a logic level around 3V.
    • However, SWDCLK is degraded and appears as a triangular waveform, with a voltage level of only around 2V.

    With this setup, using a short cable (~15 cm) allows the DK to detect the external target successfully. However, when I increase the cable length to 28 cm, the DK fails to detect the target altogether.

    This behavior only happens on the nRF54L DK. When using either the nRF52 DK or the nRF54L PDK, both SWDIO and SWDCLK have matching, clean logic levels—even with longer cables.

    This suggests that the signal degradation on the 54L DK is likely the reason for the unreliable connection.

    In our use case, we plan to use a production fixture for flashing, and a 15 cm cable length would be too limiting.

    I would like to ask:

    • Is there any way to improve SWD drive strength or signal integrity on the nRF54L DK?
    • Is this a known limitation of the 54LDK?
    • Does this suggest that SWDCLK drive strength is weaker on the nRF54L DK?
    • Is it possible to configure the I/O drive strength or otherwise improve the signal quality?
    • Would adding external pull-ups or a buffer help stabilize the SWDCLK signal?

    If needed, I’m happy to upload oscilloscope screenshots to help illustrate the issue.

    Thanks again for your support!

    Best Regards,

    Doris

Reply
  • Hi Runar,

    I've done further testing on this issue and would like to share my findings.

    As previously mentioned, when trying to program an external MCU via SWD using the nRF54L DK, it seems that there may be a level shifting or signal integrity issue.

    I probed the SWD lines with an oscilloscope and observed the following:

    • SWDIO shows a clean square wave with a logic level around 3V.
    • However, SWDCLK is degraded and appears as a triangular waveform, with a voltage level of only around 2V.

    With this setup, using a short cable (~15 cm) allows the DK to detect the external target successfully. However, when I increase the cable length to 28 cm, the DK fails to detect the target altogether.

    This behavior only happens on the nRF54L DK. When using either the nRF52 DK or the nRF54L PDK, both SWDIO and SWDCLK have matching, clean logic levels—even with longer cables.

    This suggests that the signal degradation on the 54L DK is likely the reason for the unreliable connection.

    In our use case, we plan to use a production fixture for flashing, and a 15 cm cable length would be too limiting.

    I would like to ask:

    • Is there any way to improve SWD drive strength or signal integrity on the nRF54L DK?
    • Is this a known limitation of the 54LDK?
    • Does this suggest that SWDCLK drive strength is weaker on the nRF54L DK?
    • Is it possible to configure the I/O drive strength or otherwise improve the signal quality?
    • Would adding external pull-ups or a buffer help stabilize the SWDCLK signal?

    If needed, I’m happy to upload oscilloscope screenshots to help illustrate the issue.

    Thanks again for your support!

    Best Regards,

    Doris

Children
  • Doris.chen said:
    • Is this a known limitation of the 54LDK?

    I had a chat with the HW folks. There is a issue in the current DK with the level shifters so we don't recommend cables longer then 8cm. This will vary a bit from DK revision to revision and will be fixed in the next version of the DK. 

    Doris.chen said:
    In our use case, we plan to use a production fixture for flashing, and a 15 cm cable length would be too limiting.

    Just to check here, are you planing to use the DK for production programmering? If so beware the statement
    While Nordic Development Kits (DKs) can be used for programming during development, they are not recommended for production programming. 
    "The DKs are manufactured to a quality which is sufficient for development but it is not meant for heavy duty usage as a production tool. It is recommended that PCBs which are manufactured to a high quality standard be fitted into the production screening stations."

    Regards

    Runar

Related