
DocID024597 Rev 5
399/1830
RM0351
Extended interrupts and events controller (EXTI)
409
14.3.3 Peripherals
asynchronous
Interrupts
Some peripherals are able to generate events when the system is in run mode and also
when the system is in Stop mode, 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 necessary to allow the wakeup from Stop mode.
14.3.4 Hardware
interrupt
selection
To configure a line as an interrupt source, use the following procedure:
1.
Configure the corresponding mask bit in the EXTI_IMR register.
2. Configure the Trigger Selection bits of the Interrupt line (EXTI_RTSR and EXTI_FTSR).
3. Configure the enable and mask bits that control the NVIC IRQ channel mapped to the
EXTI so that an interrupt coming from one of the EXTI lines can be correctly
acknowledged.
Note:
The direct lines do not require any EXTI configuration.
14.3.5 Hardware
event
selection
To configure a line as an event source, use the following procedure:
1.
Configure the corresponding mask bit in the EXTI_EMR register.
2. Configure the Trigger Selection bits of the Event line (EXTI_RTSR and EXTI_FTSR).
14.3.6
Software interrupt/event selection
Any of the configurable lines can be configured as a software interrupt/event line. The
procedure to generate a software interrupt is as follows:
1.
Configure the corresponding mask bit (EXTI_IMR, EXTI_EMR).
2. Set the required bit of the software interrupt register (EXTI_SWIER).
14.4 EXTI
interrupt/event line mapping
In the STM32L4x5/STM32L4x6, 40 (STM32L475xx/476xx/486xx devices), up to 41
(STM32L496xx/4A6xx devices) interrupt/event lines are available. The GPIOs are
connected to 16 configurable interrupt/event lines (see
).