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

Unable to program nRF51422 with sectorerase flag, forced chiperase to update FW?

Hello,

I am having some problems with what i assume is the readback protection.
Is it possible to update the firmware of the device without deleting UIRC (serial number among other things)?

Softdevice: nrf51422_xxAA
using debug build with readback enabled.

.rbpconf        = 0xFFFFFFFF

Serial number is located in UICR at 0x1000800 and is 24 bytes long and is not set in the binary.

Trying to use sectorerase to avoid having to delete all data fails:
nrfjprog -f nrf51 --program debug_0.0.0.hex --sectorerase
Parsing hex file.
ERROR: The operation attempted is unavailable due to readback protection in
ERROR: your device. Please use --recover to unlock the device.

I am able to debug the device, so readback protection should not be enabled.

If i am not overlooking something then my remaining option has to be running one of the following commands before programming the device
nrfjprog --recover
nrfjprog --eraseall

thus deleting all data.

Br,
Magnus

Parents Reply Children
Related