This anomaly applies to Revision 1, build codes LACA-A0A.
Symptoms
The registers in the NRF_APPROTECT peripheral are not retained in SYSTEM ON IDLE mode.
Conditions
The device enters SYSTEM ON IDLE mode after configuring access port protection to be open.
Consequences
The access port is closed.
Workaround
If current consumption is not critical during debugging, enter constant latency mode at startup to force retention of the AP-protect registers by implementing the following code.
#ifdef DEBUG
NRF_POWER->TASKS_CONSTLAT = 1;
#endif
For power-aware troubleshooting, reapply the AP-protect settings when the system should be ready for debugging after waking from WFI/WFE. This prevents the attaching of a debugger in SYSTEM ON IDLE mode, so an external wakeup might be needed. The AP-protect settings can be reloaded using the following MDK-provided method.
nrf91_handle_approtect();
Debuggers and programmers can do a CTRL-AP reset to reload the AP-protect settings to unlock the device. If the device remains locked, performing a CTRL-AP eraseall opens the AP-protection.