PM0214 Rev 9 49/262
PM0214 The Cortex-M4 processor
261
Wakeup from WFE
The processor wakes up if:
• it detects an exception with sufficient priority to cause exception entry
• it detects an external event signal, see Section 2.5.3: External event input / extended
interrupt and event input
• in a multiprocessor system, another processor in the system executes an SEV
instruction.
In addition, if the SEVONPEND bit in the SCR is set to 1, any new pending interrupt triggers
an event and wakes up the processor, even if the interrupt is disabled or has insufficient
priority to cause exception entry. For more information about the SCR see System control
register (SCR) on page 230.
2.5.3 External event input / extended interrupt and event input
The processor provides an external event input signal.
This signal is generated by the External or Extended Interrupt/event Controller (EXTI) on
asynchronous event detection (from external input pins or asynchronous peripheral event).
This signal can wakeup the processor from WFE, or set the internal WFE event register to
one to indicate that the processor must not enter sleep mode on a later WFE instruction, as
described in Wait for event on page 48. Fore more details please refer to the STM32
reference manual, Low power modes section.
2.5.4 Power management programming hints
ISO/IEC C cannot directly generate the WFI and WFE instructions. The CMSIS provides the
following functions for these instructions:
void __WFE(void) // Wait for Event
void __WFI(void) // Wait for Interrupt