Extended interrupt and event controller (EXTI) RM0367
294/1043 RM0367 Rev 7
13.3.3 Peripherals asynchronous interrupts
Some peripherals can generate events when the system is in Run mode or in Stop mode,
thus allowing to wake up the system from Stop mode.
To accomplish this, the peripheral generates both a synchronized (to the system clock, e.g.
APB clock) and an asynchronous version of the event. This asynchronous event is
connected to an EXTI direct line.
Note: Few peripherals with wakeup from Stop capability are connected to an EXTI configurable
line. In this case the EXTI configuration is required to allow the wakeup from Stop mode.
13.3.4 Hardware interrupt selection
To configure a line as an interrupt source, use the following procedure:
1. Configure the mask bits of the Interrupt lines (EXTI_IMR)
2. Configure the Trigger Selection bits of the Interrupt lines (EXTI_RTSR and
EXTI_FTSR)
3. Configure the enable and mask bits that control the NVIC IRQ channel mapped to the
extended interrupt controller (EXTI) so that an interrupt coming from any one of the
lines can be correctly acknowledged.
The direct lines do not require any EXTI configuration.
For code example, refer to A.7.2: Extended interrupt selection code example.
13.3.5 Hardware event selection
To configure a line as an event source, use the following procedure:
1. Configure the mask bits of the Event lines (EXTI_EMR)
2. Configure the Trigger Selection bits of the Event lines (EXTI_RTSR and EXTI_FTSR).
13.3.6 Software interrupt/event selection
Any of the configurable lines can be configured as software interrupt/event lines. The
procedure below must be followed to generate a software interrupt.
1. Configure the mask bits of the Interrupt/Event lines (EXTI_IMR, EXTI_EMR)
2. Set the required bit in the software interrupt register (EXTI_SWIER).