Device Recovery
Unable to program
Locked core
When using probe-rs
you may run into an issue like this one:
probe-rs download –chip nRF9151_xxAA –binary-format hex build_feather_nrf9151_ns/merged.hex –allow-erase-all
WARN probe_rs::vendor::nordicsemi::sequences::nrf: Core 0 is locked. Erase procedure will be started to unlock it.
WARN probe_rs::architecture::arm::core::armv8m: The core is in locked up status as a result of an unrecoverable exception
Erasing ✔ 100% [####################] 424.00 KiB @ 38.40 KiB/s (took 11s)
Programming ✔ 100% [####################] 424.00 KiB @ 38.78 KiB/s (took 11s) Finished in 21.98s
Any error that refers to a locked core, indicates the device is in a bad state.
Connecting to the chip was unsuccessful
If you interrupt a programming session in progress, the UICR on the 9151 may find its way into a unsupported state. This results in the following error:
Executing task: probe-rs download --chip nRF9151_xxAA --binary-format hex build/circuitdojo_feather_nrf9151/merged.ed.hex --probe 2e8a:000c:E66382593669B21
Error: Connecting to the chip was unsuccessful.
Caused by:
0: An ARM specific error occurred.
1: Error using access port FullyQualifiedApAddress { dp: Default, ap: V1(0) }.
2: Failed to read register DRW at address 0x0c
3: An error occurred in the communication with an access port or debug port.
4: Target device responded with a FAULT response to the request.
The terminal process "/opt/homebrew/bin/zsh '-l', '-c', 'probe-rs download --chip nRF9151_xxAA --binary-format hex build/circuitdojo_feather_nrf9151/merged.ed.hex --
The Solution
Make sure you have the rust toolchain installed before you get to the next step.
Download the recovery
utility and run it with the hex you'd like to program:
git clone https://github.com/circuitdojo/recovery.git
cd recovery
cargo install --path .
recovery path/to/your/merged.hex
More information can be found here: https://github.com/circuitdojo/recovery
Device no longer shows up on your machine
In rare cases the RP2040 firmware may become corrupted. The easiest way to restore it is by following this proceedure:
- Unplug your 9151 Feather
- While pressing the BS button plug in the USB cable and count "1 Mississippi"
- Wait for your computer to initialize as a disk drive.
-
Download the latest
debugprobe.uf2
from Github here: https://github.com/raspberrypi/debugprobe/releases. Copy it from theapp/_hex/
folder to the newly appeared disk drive. -
The RP2040 should restart and initialize immediately. If you're on Linux you can run
lsusb
to see if it's setup correctly: