PM0214 Rev 9 191/262
PM0214 The STM32 Cortex-M4 instruction set
261
3.11.11 WFE
Wait For Event. WFE is a hint instruction.
Syntax
WFE{cond}
Where: ‘cond’ is an optional condition code, see Conditional execution on page 65.
Operation
If the event register is 0, WFE suspends execution until one of the following events occurs:
• An exception, unless masked by exception mask registers or the current priority level
• An exception enters Pending state, if SEVONPEND in System Control Register is set
• A Debug Entry request, if Debug is enabled
• An event signaled by a peripheral or another processor in a multiprocessor system
using the SEV instruction.
If the event register is 1, WFE clears it to 0 and returns immediately.
For more information see Power management on page 47.
Condition flags
This instruction does not change the flags.
Examples
WFE ; Wait for event