Unable to Recover nRF52832 After Debugging Session

Hi everyone,

After a debugging session using the debug tool in nRF Connect SDK with an nRF52832 on a custom board, the chip is now completely unresponsive—I can't flash or erase it.

Steps I've Tried and fails:

  1. Erase All using nRF Connect
  2. Running nrfjprog --recover
  3. Trying to connect via J-Link Commander (connect command)

When attempting to connect using nRF Connect, I get:

Fullscreen
1
2
3
Reading readback protection status for Application core
Failed "reading readback protection status for application core". Error: code: 1, description: Generic, message: Batch task protection-get failed, [Probe] Device error: Failed to write DebugPort register 2: Unknown Error in J-Link DLL (error code =-1)
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), code: Generic. Message: Batch task protection-get failed, [Probe] Device error: Failed to write DebugPort register 2: Unknown Error in J-Link DLL (error code =-1).
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

When running nrfjprog --recover --log, I get repeated failures:

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
--------------------------------------------------------------------------------
D:\Nordic Semiconductor\nrf-command-line-tools\bin\nrfjprog.exe --recover --log
nrfjprog version 10.24.2 external
--------------------------------------------------------------------------------
Load library at D:\Nordic Semiconductor\nrf-command-line-tools\bin\nrfjprog.dll.
Library loaded, loading member functions.
Member functions succesfully loaded.
[ Client] - open
[ Client] - start
[ Client] - stdout: Jlinkarm nRF Worker ready. Handling sequence 5ae88b0a-0282-4ead-9957-1e426ddf9bcf.
[ Client] - Command open executed for 67 milliseconds with result 0
[ Client] - config
[ Client] - Command config executed for 15 milliseconds with result 0
[ Client] - enum_emu_snr
[SeggerBackend] - Logger sink registered in Segger backend logger
[ JLink] - Logger sink registered in JLink logger
[ nRFXX] - open
[ nRFXX] - just_check_family
[SeggerBackend] - open_dll
[SeggerBackend] - No J-Link DLL path was provided. Attempting to auto detect.
[SeggerBackend] - Load library at C:\Program Files\SEGGER\JLink_V794i\JLink_x64.dll.
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Has anyone encountered this issue before? Is there a known method to recover an nRF52832 stuck in this state?

Thanks in advance for any help!

Parents
  • Hi,

     

    It sounds like your device is continuously asserting, where the default behaviour is then to do a soft-reset. If this happens early in the boot-process, it is quite hard to recover the device.

     

    Try to run nrfjprog --recover in a loop, by creating a batch file like this (rename it to recover.bat or something):

    Fullscreen
    1
    2
    3
    :loop
    nrfjprog --recover -f nrf52
    goto loop
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

     

    And run this while power-cycling your DUT.

    Could you try this and report back if you still have issues?

     

    Kind regards,

    Håkon

  • This also saved me with my nrf52840 DK. Thank you!

Reply Children
No Data