In our application we need to have the NFC pins configured for GPIO and APPROTECT enabled.
As an additional safety feature I verify the UICR content inside my application (as OTA DFU packages seems to be stripped of any UICR bits)
After updating UICR one needs to reset the nRF52, from the nrf52832 data sheet: "After UICR has been written, the new UICR configuration will only take effect after a reset."
I can verify that I changed the UICR content (enabling APPROTECT) by reading it before and after the flash operation.
However after calling NVIC_SystemReset(); I can still read back flash content using nrfjprog.
(After a power cycle the protection is enabled as expected)
I suspect that NVIC_SystemReset() doesn't cause a reset as such, but more likely just restarts the chip by jumping according to the interrupt vector table.
Note:
The hardware is using the using P0.21 as a GPIO pin.
And I'm using nRF5_SDK_14.2.0_17b948a with s132_nrf52_5.1.0_softdevice.hex
The test is performed with an attached J-link programmer and a running gdb instance
Is there another way to reset the nRF52 that will cause a reread of the UICR data, perhaps using the watchdog?
Regards Visti Andresen