Not able to access debug port via jlink

nrfjprog -c 125 --recover --log
[error] [ Client] - Encountered error -102: Command connect_to_emu_with_snr executed for 406 milliseconds with result -102
ERROR: Unable to connect to a debugger.
[error] [ Worker] - An unknown error.
ERROR: JLinkARM DLL reported an error. Try again. If error condition
ERROR: persists, run the same command again with argument --log, contact Nordic
ERROR: Semiconductor and provide the generated log.log file to them.

0333.log.log

  • Hii, using custom board of nrf53 series. Programming debug is showing, but not able to access or write the firmware.

    If i try using the nrf connect programmer, its showing like this

    2025-12-09T14:03:46.872Z INFO Selected device with the serial number 000601001636
    2025-12-09T14:03:46.872Z INFO Using nrfutil device to communicate with target via JLink
    2025-12-09T14:03:46.896Z DEBUG Sending event "programmer: device selected"
    2025-12-09T14:03:46.896Z DEBUG Sending event "programmer: running nrfutil device"
    2025-12-09T14:03:47.051Z DEBUG Sending event "programmer: running nrfutil device"
    2025-12-09T14:03:47.175Z INFO Reading readback protection status for Application core
    2025-12-09T14:03:47.176Z INFO Reading readback protection status for Application core 0%
    2025-12-09T14:03:47.345Z INFO Reading readback protection status for Application core 50%
    2025-12-09T14:03:47.345Z INFO Reading readback protection status for Application core 50%
    2025-12-09T14:03:47.458Z ERROR Failed "reading readback protection status for application core". Error: code: 1, description: Generic, message: Batch task protection-get failed, Device error: Setting the debug port SELECT register failed while powering up sys and debug regions (Unknown Error in J-Link DLL (error code =-1)).

    This might indicate that the debug port is unavailable. Please double-check device power supply and SWD lines, and that SWD isn't disabled
    2025-12-09T14:03:47.487Z ERROR Error: Failed with exit code 1.
    One or more batch tasks failed:
    * 601001636: Device error: Setting the debug port SELECT register failed while powering up sys and debug regions (Unknown Error in J-Link DLL (error code =-1)).

    This might indicate that the debug port is unavailable. Please double-check device power supply and SWD lines, and that SWD isn't disabled (Generic)


    Message: Batch task protection-get failed, Device error: Setting the debug port SELECT register failed while powering up sys and debug regions (Unknown Error in J-Link DLL (error code =-1)).

    This might indicate that the debug port is unavailable. Please double-check device power supply and SWD lines, and that SWD isn't disabled.
    2025-12-09T14:03:47.487Z ERROR Error: Failed with exit code 1.
    One or more batch tasks failed:
    * 601001636: Device error: Setting the debug port SELECT register failed while powering up sys and debug regions (Unknown Error in J-Link DLL (error code =-1)).

    This might indicate that the debug port is unavailable. Please double-check device power supply and SWD lines, and that SWD isn't disabled (Generic)


    Message: Batch task protection-get failed, Device error: Setting the debug port SELECT register failed while powering up sys and debug regions (Unknown Error in J-Link DLL (error code =-1)).

    This might indicate that the debug port is unavailable. Please double-check device power supply and SWD lines, and that SWD isn't disabled.

  • Hi, I checked your log file and it shows J-Link debugger itself is detected and configured correctly But when it tries to access the nRF53 debug port, all debug port register writes fail with -1, and JLINK_IsConnected() reports that the probe is not connected to a valid target. This indicates that the PC to J Link path is fine, but the J-Link cannot communicate with the nRF53’s debug port at all.

    That is mostly caused by a hardware connection or power issue on the target side. Could you please check the following:

    1. For reliable SWD debugging with J Link, you should power the custom board so that VDD is around 3.0–3.3 V, and connect that same VDD to the debugger’s VTref pin.
    2. Verify SWD wiring (SWDIO, SWDCLK, GND, VTref), connector orientation and no series resistors or level shifters should be on SWD lines.

    Kind Regards,
    Syed Maysum

Related