
DocID024597 Rev 5
397/1830
RM0351
Extended interrupts and events controller (EXTI)
409
14
Extended interrupts and events controller (EXTI)
14.1 Introduction
The EXTI main features are as follows:
•
Generation of up to 40 (STM32L475xx/476xx/486xx devices), up to 41
(STM32L496xx/4A6xx devices) event/interrupt requests
–
26 configurable lines
–
14 direct lines (STM32L475xx/476xx/486xx devices), 15 direct lines
(STM32L496xx/4A6xx devices)
•
Independent mask on each event/interrupt line
•
Configurable rising or falling edge (configurable lines only)
•
Dedicated status bit (configurable lines only)
•
Emulation of event/interrupt requests (configurable lines only)
14.2
EXTI main features
The extended interrupts and events controller (EXTI) manages the external and internal
asynchronous events/interrupts and generates the event request to the CPU/Interrupt
Controller and a wake-up request to the Power Controller.
The EXTI allows the management of up to 40 (STM32L475xx/476xx/486xx devices), up to
41 (STM32L496xx/4A6xx devices) event lines which can wake up from the Stop 0 and
Stop 1 modes. Not all events can wake up from the Stop 2 mode (refer to
The lines are either configurable or direct:
•
The lines are configurable: the active edge can be chosen independently, and a status
flag indicates the source of the interrupt. The configurable lines are used by the I/Os
external interrupts, and by few peripherals.
•
The lines are direct: they are used by some peripherals to generate a wakeup from
Stop event or interrupt. The status flag is provided by the peripheral.
Each line can be masked independently for an interrupt or an event generation.
This controller also allows to emulate events or interrupts by software, multiplexed with the
corresponding hardware event line, by writing to a dedicated register.
14.3
EXTI functional description
For the configurable interrupt lines, the interrupt line should be configured and enabled in
order to generate an interrupt. 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
interrupt line, an interrupt request is generated. The pending bit corresponding to the
interrupt line is also set. This request is cleared by writing a ‘1’ in the pending register.
For the direct interrupt lines, the interrupt is enabled by default in the interrupt mask register
and there is no corresponding pending bit in the pending register.