Approtect mechanisms on nrf52840

Hi all, 

I am trying to understand the different Access Port Protection mechanisms on the nRF52840. From several tickets, own experiments and from the data sheet I was able to come up with the following summary:

  1. For older revisions <= 2: it is enough to write 0xFFFFFF00 to the UICR.APPROTECT register and perform any kind of reset, even a software reset by sys_reboot(SYS_REBOOT_COLD) does the job. After the reset it is no longer possible to read/write flash (without exploiting the known vulnerability), which is the desired behavior. 


  2. For newer revisions >=3: the APPROTECT is enabled per default. To flash the device you would need to do recover/erase-all. Then after flashing, it is recommended for more security, but not necessary to:
    • write 0xFFFFFF00 to the UICR.APPROTECT (as in older versions)
    • write 0x00 to APPROTECT.FORCEPROTECT

           --> In this case however, in order for the protection to kick in, it is not enough anymore to do a soft reset sys_reboot(SYS_REBOOT_COLD) after enabling the hardware protection (UICR.APPROTECT). Only other reset types (Watchdog, pin-reset- brownout, etc.) /power-on resets would enable the protection again. I am wondering why exclude the soft reset from being a valid type to re-/activate the hardware protection as it was the case older versions?

Thanks for clarifying!

Regards

Parents Reply Children
No Data
Related