This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

NRF52 bricked with CONFIG_GPIO_AS_PINRESET and P0.21 tied to ground?

Dear Nordic Team,

Due to a mistake i flashed a bootloader-firmware with the compile flag CONFIG_GPIO_AS_PINRESET onto a custom board where pin P0.21 is tied to ground.

Now the nrfjprog output says:

nrfjprog -f nrf52 --program _build/nrf52811_xxaa.hex --sectorerase
ERROR: Cannot connect to any nRF device. Please make sure a device is
ERROR: connected to the debugger and supplied.
make: *** [flash] Error 42
When trying to connect with JLinkExe the output is:
Connecting to target via SWD
Found SW-DP with ID 0x2BA01477
Found SW-DP with ID 0x2BA01477
Could not power-up debug power domain.
Scanning AP map to find all available APs
AP[0]: Stopped AP scan as end of AP map has been reached
Iterating through AP map to find AHB-AP to use
Found SW-DP with ID 0x2BA01477
Found SW-DP with ID 0x2BA01477
Could not power-up debug power domain.
Scanning AP map to find all available APs
AP[0]: Stopped AP scan as end of AP map has been reached
Iterating through AP map to find AHB-AP to use

Can this board be considered as bricked, or is there a way to recover from this state?

Many Thanks

Parents Reply
  • I suspect he was able to disconnect P0.21 from ground and that's how he solved it. You of course don't have that option. 

    The only thing I can think of you might try is using the CTRL-AP port to reset and erase the entire chip and UICR. That's what --eraseall does however I think perhaps the code there doesn't like the actual chip being in reset. If you read this thread https://devzone.nordicsemi.com/f/nordic-q-a/12484/approtect-and-dap you'll find the commands for using JLink to directly access the CTRL-AP port without attempting any real connection, it just sends simple SWD commands directly. No iterating access points or anything. 

    If that doesn't work, I think you're bricked. It is not unlikely that reset is a very global signal which holds everything in the entire chip in reset until deasserted, that may well include the CTRL-AP port, unless someone cleverly thought about this kind of issue. You might want to try the above process several times just incase reset clears after a number of cycles on SWD on the AP. 

Children
Related