11. Extended interrupts and events controller (EXTI)
The external interrupt/event controller consists of up to 24 edge detectors for generating event/interrupt requests. Each input line can be independently configured to select the type (interrupt or event) and the corresponding trigger event (rising or falling or both). Each line can also be masked independently. A pending register maintains the status line of the interrupt requests.
11.1 EXTI main features
The main features of the EXTI controller are the following:
- • independent trigger and mask on each interrupt/event line
- • dedicated status bit for each interrupt line
- • generation of up to 24 software event/interrupt requests
- • detection of external signals with a pulse width lower than the APB2 clock period. Refer to the electrical characteristics section of the STM32F75xxx and STM32F74xxx datasheets for details on this parameter.
11.2 EXTI block diagram
Figure 30 shows the block diagram.
Figure 30. External interrupt/event controller block diagram

The block diagram illustrates the internal architecture of the EXTI controller. At the top, an 'AMBA APB bus' is connected to a 'Peripheral interface'. The 'Peripheral interface' is also connected to 'PCLK2' and has bidirectional connections to five registers: 'Pending request register', 'Interrupt mask register', 'Software interrupt event register', 'Rising trigger selection register', and 'Falling trigger selection register'. Below these registers, the 'Pending request register' and 'Interrupt mask register' are connected to an AND gate, which outputs to 'To NVIC interrupt controller'. The 'Software interrupt event register' and 'Event mask register' (located below the AND gate) are connected to an OR gate. The 'Rising trigger selection register' and 'Falling trigger selection register' are connected to an 'Edge detect circuit', which is also connected to an 'Input line'. The output of the 'Edge detect circuit' is connected to the 'OR gate'. The 'OR gate' output is connected to a 'Pulse generator', which outputs to the left. The 'Event mask register' is also connected to the 'Pulse generator' output. The diagram is labeled 'MSV34192V1' in the bottom right corner.
11.3 Wakeup event management
The STM32F75xxx and STM32F74xxx devices are 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 ® -M7 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.
To use an external line as a wakeup event, refer to Section 11.4: Functional description .
11.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 event request by writing a '1' to the corresponding bit in the event mask register. When the selected edge occurs on the event line, an event pulse is generated. The pending bit corresponding to the event line is not set.
An interrupt/event request can also be generated by software by writing a '1' in the software interrupt/event register.
11.5 Hardware interrupt selection
To configure a line as interrupt sources, use the following procedure:
- 1. Configure the corresponding mask bit (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 external interrupt controller (EXTI) so that an interrupt coming from one of the 24 lines can be correctly acknowledged.
11.6 Hardware event selection
To configure a line as event sources, use the following procedure:
- 1. Configure the corresponding mask bit (EXTI_EMR)
- 2. Configure the Trigger selection bits of the event line (EXTI_RTSR and EXTI_FTSR)
11.7 Software interrupt/event selection
The line can be configured as software interrupt/event line. The following is the procedure to generate a software interrupt.
- 1. Configure the corresponding mask bit (EXTI_IMR, EXTI_EMR)
- 2. Set the required bit in the software interrupt register (EXTI_SWIER)
11.8 External interrupt/event line mapping
Up to 168 GPIOs are connected to the 16 external interrupt/event lines in the following manner:
Figure 31. External interrupt/event GPIO mapping

The diagram illustrates the mapping of GPIOs to external interrupt lines using multiplexers. Each multiplexer is controlled by configuration bits in the SYSCFG_EXTICR registers.
- EXTI0: Controlled by EXTI0[3:0] bits in the SYSCFG_EXTICR1 register. It multiplexes between PA0, PB0, PC0, PD0, PE0, PF0, PG0, PH0, PI0, PJ0, and PK0.
- EXTI1: Controlled by EXTI1[3:0] bits in the SYSCFG_EXTICR1 register. It multiplexes between PA1, PB1, PC1, PD1, PE1, PF1, PG1, PH1, PI1, PJ1, and PK1.
- EXTI15: Controlled by EXTI15[3:0] bits in the SYSCFG_EXTICR4 register. It multiplexes between PA15, PB15, PC15, PD15, PE15, PF15, PG15, PH15, and PJ15.
MS30440V1
The eight other EXTI lines are connected as follows:
- • EXTI line 16 is connected to the PVD output
- • EXTI line 17 is connected to the RTC Alarm event
- • EXTI line 18 is connected to the USB OTG FS Wakeup event
- • EXTI line 19 is connected to the Ethernet Wakeup event
- • EXTI line 20 is connected to the USB OTG HS (configured in FS) Wakeup event
- • EXTI line 21 is connected to the RTC Tamper and TimeStamp events
- • EXTI line 22 is connected to the RTC Wakeup event
- • EXTI line 23 is connected to the LPTIM1 asynchronous event
11.9 EXTI registers
Refer to Section 1.2 on page 63 for a list of abbreviations used in register descriptions.
11.9.1 Interrupt mask register (EXTI_IMR)
Address offset: 0x00
Reset value: 0x0000 0000
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | IM23 | IM22 | IM21 | IM20 | IM19 | IM18 | IM17 | IM16 |
| rw | rw | rw | rw | rw | rw | rw | rw | ||||||||
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| IM15 | IM14 | IM13 | IM12 | IM11 | IM10 | IM9 | IM8 | IM7 | IM6 | IM5 | IM4 | IM3 | IM2 | IM1 | IM0 |
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw |
Bits 31:24 Reserved, must be kept at reset value.
Bits 23:0 IMx : Interrupt mask on line x
0: Interrupt request from line x is masked
1: Interrupt request from line x is not masked
11.9.2 Event mask register (EXTI_EMR)
Address offset: 0x04
Reset value: 0x0000 0000
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | EM23 | EM22 | EM21 | EM20 | EM19 | EM18 | EM17 | EM16 |
| rw | rw | rw | rw | rw | rw | rw | rw | ||||||||
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| EM15 | EM14 | EM13 | EM12 | EM11 | EM10 | EM9 | EM8 | EM7 | EM6 | EM5 | EM4 | EM3 | EM2 | EM1 | EM0 |
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw |
Bits 31:24 Reserved, must be kept at reset value.
Bits 23:0 EMx : Event mask on line x
0: Event request from line x is masked
1: Event request from line x is not masked
11.9.3 Rising trigger selection register (EXTI_RTSR)
Address offset: 0x08
Reset value: 0x0000 0000
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | TR23 | TR22 | TR21 | TR20 | TR19 | TR18 | TR17 | TR16 |
| rw | rw | rw | rw | rw | rw | rw | rw | ||||||||
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| TR15 | TR14 | TR13 | TR12 | TR11 | TR10 | TR9 | TR8 | TR7 | TR6 | TR5 | TR4 | TR3 | TR2 | TR1 | TR0 |
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw |
Bits 31:24 Reserved, must be kept at reset value.
Bits 23:0 TRx : Rising trigger event configuration bit of line x
0: Rising trigger disabled (for Event and Interrupt) for input line
1: Rising trigger enabled (for Event and Interrupt) for input line
Note: The external wakeup lines are edge triggered, no glitch must be generated on these lines. If a rising edge occurs on the external interrupt line while writing to the EXTI_RTSR register, the pending bit is set.
Rising and falling edge triggers can be set for the same interrupt line. In this configuration, both generate a trigger condition.
11.9.4 Falling trigger selection register (EXTI_FTSR)
Address offset: 0x0C
Reset value: 0x0000 0000
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | TR23 | TR22 | TR21 | TR20 | TR19 | TR18 | TR17 | TR16 |
| rw | rw | rw | rw | rw | rw | rw | rw | ||||||||
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| TR15 | TR14 | TR13 | TR12 | TR11 | TR10 | TR9 | TR8 | TR7 | TR6 | TR5 | TR4 | TR3 | TR2 | TR1 | TR0 |
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw |
Bits 31:24 Reserved, must be kept at reset value.
Bits 23:0 TRx : Falling trigger event configuration bit of line x
0: Falling trigger disabled (for Event and Interrupt) for input line
1: Falling trigger enabled (for Event and Interrupt) for input line.
Note: The external wakeup lines are edge triggered, no glitch must be generated on these lines. If a falling edge occurs on the external interrupt line while writing to the EXTI_FTSR register, the pending bit is not set.
Rising and falling edge triggers can be set for the same interrupt line. In this configuration, both generate a trigger condition.
11.9.5 Software interrupt event register (EXTI_SWIER)
Address offset: 0x10
Reset value: 0x0000 0000
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | SWIER 23 | SWIER 22 | SWIER 21 | SWIER 20 | SWIER 19 | SWIER 18 | SWIER 17 | SWIER 16 |
| rw | rw | rw | rw | rw | rw | rw | rw | ||||||||
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| SWIER 15 | SWIER 14 | SWIER 13 | SWIER 12 | SWIER 11 | SWIER 10 | SWIER 9 | SWIER 8 | SWIER 7 | SWIER 6 | SWIER 5 | SWIER 4 | SWIER 3 | SWIER 2 | SWIER 1 | SWIER 0 |
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw |
Bits 31:24 Reserved, must be kept at reset value.
Bits 23:0 SWIERx : Software Interrupt on line x
If interrupt are enabled on line x in the EXTI_IMR register, writing '1' to SWIERx bit when it is set at '0' sets the corresponding pending bit in the EXTI_PR register, thus resulting in an interrupt request generation.
This bit is cleared by clearing the corresponding bit in EXTI_PR (by writing a 1 to the bit).
11.9.6 Pending register (EXTI_PR)
Address offset: 0x14
Reset value: 0x0000 0000
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | PR23 | PR22 | PR21 | PR20 | PR19 | PR18 | PR17 | PR16 |
| rc_w1 | rc_w1 | rc_w1 | rc_w1 | rc_w1 | rc_w1 | rc_w1 | rc_w1 | ||||||||
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| PR15 | PR14 | PR13 | PR12 | PR11 | PR10 | PR9 | PR8 | PR7 | PR6 | PR5 | PR4 | PR3 | PR2 | PR1 | PR0 |
| rc_w1 | rc_w1 | rc_w1 | rc_w1 | rc_w1 | rc_w1 | rc_w1 | rc_w1 | rc_w1 | rc_w1 | rc_w1 | rc_w1 | rc_w1 | rc_w1 | rc_w1 | rc_w1 |
Bits 31:24 Reserved, must be kept at reset value.
Bits 23:0 PRx : Pending bit
0: No trigger request occurred
1: selected trigger request occurred
This bit is set when the selected edge event arrives on the external interrupt line.
This bit is cleared by programming it to '1'.
11.9.7 EXTI register map
Table 45 gives the EXTI register map and the reset values.
Table 45. External interrupt/event controller register map and reset values
| Offset | Register | 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | ||||||||||||||||||||||||||
| 0x00 | EXTI_IMR | IM[23:0] | |||||||||||||||||||||||||||||||
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |
| 0x04 | EXTI_EMR | EM[23:0] | |||||||||||||||||||||||||||||||
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |
| 0x08 | EXTI_RTSR | TR[23:0] | |||||||||||||||||||||||||||||||
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |
| 0x0C | EXTI_FTSR | TR[23:0] | |||||||||||||||||||||||||||||||
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |
| 0x10 | EXTI_SWIER | SWIER[23:0] | |||||||||||||||||||||||||||||||
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |
| 0x14 | EXTI_PR | PR[23:0] | |||||||||||||||||||||||||||||||
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |
Refer to Section 2.2 on page 69 for the register boundary addresses.