15.6.2.8.2 Standby Mode
The Standby mode allows achieving very low-power consumption.
In this mode, all clocks are stopped except those which are kept running if requested by a running module or have the ONDEMAND bit set to zero. For example, the RTC can operate in Standby mode. In this case, its Generic Clock clock source will also be enabled.
The regulator and the RAM operate in Low-Power mode.
A SLEEPONEXIT feature is also available.
- Entering Standby mode: This mode is entered by executing the WFI instruction with the SCR.SLEEPDEEP bit of the CPU is written to 1.
- Exiting Standby mode: Any peripheral able to generate an asynchronous interrupt can wake up the system. For example, a module running on a Generic clock can trigger an interrupt. When the enabled asynchronous wake-up event occurs and the system is woken up, the device will either execute the interrupt service routine or continue the normal program execution according to the Priority Mask Register (PRIMASK) configuration of the CPU.