[49] POWER: SLEEPENTER and SLEEPEXIT events are asserted after pin reset

This anomaly applies to IC Rev. Engineering A, build codes QKAA-AB0.

Domains

Application, Network

Symptoms

EVENTS_SLEEPENTER and EVENTS_SLEEPEXIT are asserted.

Conditions

After device reset.

Consequences

If the firmware evaluates EVENTS_SLEEPENTER or EVENTS_SLEEPEXIT events, it might take the wrong action.

Workaround

When RESETREAS shows a pin reset (RESETPIN), ignore NRF_POWER->EVENTS_SLEEPENTER and NRF_POWER->EVENTS_SLEEPEXIT. Apply the following code after any reset:

For Application:
if (NRF_RESET_S->RESETREAS & RESET_RESETREAS_RESETPIN_Msk)
{ 
    NRF_POWER_S->EVENTS_SLEEPENTER = 0; 
    NRF_POWER_S->EVENTS_SLEEPEXIT = 0; 
}
For Network:
if (NRF_RESET_NS->RESETREAS & RESET_RESETREAS_RESETPIN_Msk)
{ 
    NRF_POWER_NS->EVENTS_SLEEPENTER = 0; 
    NRF_POWER_NS->EVENTS_SLEEPEXIT = 0; 
}
This workaround is implemented in MDK version 8.29.0 and later.