nrf5340

[168] CPU: CPU can malfunction after sleep

This anomaly applies to Revision 1, build codes CLAA-D00, QKAA-D00.

Domains

Application, Network

Symptoms

The device behaves erratically.

Conditions

Shortly after the CPU and all peripherals have entered IDLE state, the network or application core CPU is woken up by one of the following sources:
  • RTC: All events
  • GPIOTE: PORT event
  • LPCOMP: All events
  • NFCT: Field detect event
  • WDT: All events
  • POWER: All events
  • CLOCK: All events
  • USBREG: All events
  • IPC: All events

Consequences

Network or application core CPU can hard-fault, trigger lockup reset, or become unresponsive. Network or application core can behave erratically.

Workaround

In the network core and application core, disable IRQ before executing WFE or WFI by using the following code:


SCB->SCR |= SCB_SCR_SEVONPEND_Msk;
__disable_irq();
__WFE(); // or __WFI();
__nop();__nop();__nop();__nop();__nop();__nop();__nop();__nop(); // 8 NOPs
__enable_irq();

If the application core is executing WFE or WFI from RAM with the CPU running at 128 MHz, use 26 NOPs instead of 8 NOPs.

The workaround is included in nRF Connect SDK version 2.5.1.

By default, the workaround is enabled for the application and network cores when running from flash. For additional configurations for running from RAM, see the nRF Connect SDK release notes.