Extended interrupts and events controller (EXTI)
12
Extended interrupts and events controller (EXTI)
12.1
Introduction
The EXTI main features are as follows:
•
Generation of up to 40 event/interrupt requests
–
–
•
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)
12.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 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
EXTI lines
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.
12.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.
To generate an 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
event request by writing a '1' to the corresponding bit in the event mask register. When the
324/1693
26 configurable lines
14 direct lines
connections).
DocID024597 Rev 3
RM0351
Table 43:
Need help?
Do you have a question about the STM32L4x6 and is the answer not in the manual?
Questions and answers