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

readback register and security

On the nRF51822, I see that by programming the readback protect register, one can prevent reading code regions 0 and 1 from the SWD interface. However, if one had access to the SWD interface, a debugger, and the nrfjprog tool, it appears that the UICR register could be erased independently of erasing the entire flash.

Assuming someone has access to the SWD interface pins, is there a way of ensuring full readback protection? Or at least ensuring that the entire flash must be erased before reading can occur?

  • As far as I know, enabling read-back protection should give the full protection you're after. The ERASEUICR register is not available on an nRF51822, since it doesn't have any pre-programmed code, as shown in table 4 in the nRF51822 Reference Manual, and hence there should be no way of getting access to code on an nRF51822 if read-back protection has been set. The only way to disable protection would be to do an erase-all, in which case the protected code would also be gone.

Related