Interrupts and events RM0008
198/1096 Doc ID 13902 Rev 12
Figure 20. External interrupt/event controller block diagram
10.2.3 Wakeup event management
The STM32F10xxx is able to handle external or internal events in order to wake up the core
(WFE). The wakeup event can be generated either by:
● enabling an interrupt in the peripheral control register but not in the NVIC, and enabling
the SEVONPEND bit in the Cortex-M3 System Control register. When the MCU
resumes from WFE, the peripheral interrupt pending bit and the peripheral NVIC IRQ
channel pending bit (in the NVIC interrupt clear pending register) have to be cleared.
● or configuring an external or internal EXTI line in event mode. When the CPU resumes
from WFE, it is not necessary to clear the peripheral interrupt pending bit or the NVIC
IRQ channel pending bit as the pending bit corresponding to the event line is not set.
In connectivity line devices, Ethernet wakeup events also have the WFE wakeup capability.
To use an external line as a wakeup event, refer to Section 10.2.4: Functional description.
10.2.4 Functional description
To generate the interrupt, the interrupt line should be configured and enabled. This is done
by programming the two trigger registers with the desired edge detection and by enabling
the interrupt request by writing a ‘1’ to the corresponding bit in the interrupt mask register.
When the selected edge occurs on the external interrupt line, an interrupt request is
generated. The pending bit corresponding to the interrupt line is also set. This request is
reset by writing a ‘1’ in the pending register.
To generate the event, the event line should be configured and enabled. This is done by
programming the two trigger registers with the desired edge detection and by enabling the
trigger
selection
Peripheral interface
mask
register
Edge detect
AMBA APB bus
PCLK2
19
19 19
1919
circuit
Pending
register
interrupt
request
.
19
19
To NVIC Interrupt
Software
Controller
trigger
selection
Rising Falling
19
Event
mask
Pulse
generator
19
19
19
19
Input
Line
Interrupt
register register
register
19
19
event
register
ai15801