ERASEUICR behavior with/without UICR.APPROTECT

Hi all, 

I want for confirm my findings concerning ERASEUICR. I want to be able to erase the UICR from inside my firmware for automatic testing purposes (no debugger is involved). This works as long as the NRF_UICR->APPROTECT ist not enabled. However, as soon as I write 0xFFFFFF00 to NRF_UICR->APPROTECT (and do a reset!), erasing the uicr from the firmware becomes not possible anymore.

Is this the exptected behaviour? I am aware that after setting the UICR.APPROTECT to enabled (0xffffff00) and resetting, the debugger should not be able to modify/write the UICR and that only an ERASEALL will recover the functionality. However I was not expecting that erasing the UICR from inside my firmware will also be blocked.

Note: after enabling AAPPROTECT and before doing the reset, the UICR still can be erased successfully. 


I am also aware of the following table

Please confirm that this indeed the expected behavior. Thank you!

Regards, 

  • Hi,

    Your findings are correct. The UICR cannot be erased even on the chip after AP Protect has been enabled, as that would disable AP protect. That would be a potential security issue in case it was possible to manipulate the device to run that code.

    Regarding the reset you are right, the UICR is only read after reset, so any change in the UICR (like enabling pin reset or enabling AP Protect) will only take affect after a reset.

Related