The STM32 Cortex-M0 instruction set PM0215
68/91 Doc ID 022979 Rev 1
3.7.12 WFI
Wait for Interrupt.
Syntax
WFI
Operation
WFI is a hint instruction that suspends execution until one of the following events occurs:
● An exception
● An interrupt becomes pending which would preempt if PRIMASK was clear
● A Debug Entry request, regardless of whether Debug is enabled.
WFI is intended for power saving only. When writing software assume that WFI might
behave as a NOP operation.
Restrictions
None
Condition flags
This instruction does not change the flags.
Examples
WFI ; Wait for interrupt