PM0215 The STM32 Cortex-M0 instruction set
Doc ID 022979 Rev 1 67/91
3.7.10 SVC
Supervisor call.
Syntax
SVC #imm
where: ‘imm’ is an integer in the range 0-255.
Operation
The SVC instruction causes the SVC exception. imm is ignored by the processor. It can be
retrieved by the exception handler to determine what service is being requested.
Restrictions: None
Condition flags
This instruction does not change the flags.
Examples
SVC 0x32 ; Supervisor Call (SVC handler can extract the immediate value
; by locating it via the stacked PC)
3.7.11 WFE
Wait for event. WFE is a hint instruction.
Syntax
WFE
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 28.
WFE is intended for power saving only. When writing software assume that WFE might
behave as NOP.
Restrictions: None
Condition flags
This instruction does not change the flags.
Examples
WFE ; Wait for event