nRF52840 locked with APPROTECT, unable to recover/flash without nRESET pin

Hi,

I am working on a custom nRF52840 design (using nRF Connect SDK v2.9.3) and I have accidentally locked the chip via APPROTECT.

My major issue is that on this hardware revision, the physical nRESET pin (P0.18) is not routed out and is completely inaccessible.

I have tried recovering the chip using OpenOCD (nrf52_recover), which successfully executes the erase command (nrf52.cpu device has been successfully erased and unlocked), but immediately after the erase, OpenOCD fails with Could not find MEM-AP to control the core because it cannot perform a hardware reset. The chip then re-locks itself instantly on the next connection attempt.

I have compiled the new firmware with CONFIG_NRF_APPROTECT_USE_UICR=n, but I cannot flash it using probe-rs or OpenOCD due to this lock/unlock loop.

Is there any official way or special SWD sequence to permanently unlock and flash an nRF52840 (with the newer APPROTECT hardware) after a mass erase without having access to the physical nRESET pin?

Thanks for the help!

Related