Unable to Flash nRF52832 Using nRF52840DK using nRF Programmer: Error Code -1 (Failed to Write DebugPort Register)

Hello Nordic Support Team,

I'm encountering a persistent issue when I try to flash an nRF52832 board using an nRF52840DK (PCA10056, nRF52840_xxAA_REV3) with nRF Programmer v4.5.0. The setup was working previously using the VS Code extension (as described in Case ID: 339001), now I am back to step 1. I am unable to flash or reset the external IC even with the nRF Programmer GUI tool. The error logs show the following message:

Fullscreen
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
In a normal case where I disconnect the DK from the external board, I would get a log as below, where the programmer can read the file memory
Fullscreen
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
uestions

I have tried the following:

  1. Checked Readback Protection:
    Log shows NRFDL_PROTECTION_STATUS_NONE, so the device is not protected.

  2. Power Cycle:
    Tried power-cycling the device and reconnecting multiple times.

  3. nrfjprog Commands:

    • nrfjprog --recover -f NRF52 --snr 1050264751 resulted in error -21.
    • nrfjprog --eraseall also failed with a similar error.

My Questions are:

  • Could this be a hardware issue? for example, the swd cable is not securely connected?
  • Any recommended steps to resolve the DebugPort register error?

Thank you in advance for your support!

Parents
  • Hello,

    The errors indicate that there may be some connectivity issue between the DK and your custom board preventing the debug probe from communicating with the target . There could also be mismatching IO voltages that causes the communication to fail. Is the SWD0_SEL pin still tied to GND? 

    Best regards,

    Vidar

  • Hi Vidar

    In case 339001, I realised that the SWO_SEL pin must be tied to GND, which is still tied to GND. The solder bridge SB19 is still connected, proving voltage reference to the DK. 

    I also verified the power supply to the custom board is 3.3V, and all SWD pins are securely connected.

    Is there anywhere else I should look into?

  • Hi,

    Thanks for confirming that SWO_SEL is tied to ground. 

    nrfjprog --recover -f NRF52 --snr 1050264751 resulted in error -21.

    This looks like an uncommon error code to be returned from nrfjprog.

    (https://docs.nordicsemi.com/bundle/ug_nrf_cltools/page/UG/cltools/nrf_nrfjprogexe_return_codes.html)

    Please run "nrfjprog --recover --log" and post the log file here.

    Best regards,

    Vidar

  • Fullscreen
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • This command should have created a file name log.log in your current directory (C:\Users\xl). Can you please post that file here?

  • XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • Thank you for providing the log. Not surprisingly, the log shows that communication between the debugger and the nrf is failing. This is often an indication of a connection issue or mismatched IO voltages between the debugger and the target. Or that he target may not be properly powered.

    Do you have a voltmeter you can use to measure the VDD voltage on the nRF52840 DK and voltage on the SWDIO line from the 52832 target (when *not* connected to the debugger)?

Reply
  • Thank you for providing the log. Not surprisingly, the log shows that communication between the debugger and the nrf is failing. This is often an indication of a connection issue or mismatched IO voltages between the debugger and the target. Or that he target may not be properly powered.

    Do you have a voltmeter you can use to measure the VDD voltage on the nRF52840 DK and voltage on the SWDIO line from the 52832 target (when *not* connected to the debugger)?

Children
No Data