20. Extended interrupt and event controller (EXTI)

The extended interrupt and event controller (EXTI) manages wake-up through configurable and direct event inputs. It provides wake-up requests to the power control, and generates interrupt requests to the CPU NVIC and events to the CPU event input.

The EXTI wake-up requests allow the system to be woken up from Stop mode, and the CPU to be woken up from CStop mode.

Both the interrupt request and event request generation can also be used in Run modes.

20.1 EXTI main features

The EXTI main features are as follows:

The asynchronous event inputs are classified in 2 groups:

20.2 EXTI block diagram

As shown in Figure 155 , the EXTI consists of a register block accessed via an APB interface, an event input Trigger block, and a masking block.

The register block contains all EXTI registers.

The event input trigger block provides event input edge triggering logic.

The masking block provides the event input distribution to the different wake-up, interrupt and event outputs, and their masking.

Figure 155. EXTI block diagram

Figure 155. EXTI block diagram. The diagram shows the internal structure of the EXTI block. On the left, 'Peripherals' are connected to the 'Event trigger' block via 'Configurable event(x)' and 'Direct event(x)' signals. The 'Event trigger' block is connected to 'Registers' and 'Masking' blocks. The 'Registers' block is connected to an 'APB interface'. The 'Masking' block is connected to the 'CPU' (via 'cpu_it_exti_per(x)', 'cpu_event', and 'rxev' signals) and the 'PWR' block (via 'exti_cpu_wkup' signal). The entire EXTI block is labeled 'EXTI' at the bottom left. A small text 'MSV54701V1' is in the bottom right corner.
Figure 155. EXTI block diagram. The diagram shows the internal structure of the EXTI block. On the left, 'Peripherals' are connected to the 'Event trigger' block via 'Configurable event(x)' and 'Direct event(x)' signals. The 'Event trigger' block is connected to 'Registers' and 'Masking' blocks. The 'Registers' block is connected to an 'APB interface'. The 'Masking' block is connected to the 'CPU' (via 'cpu_it_exti_per(x)', 'cpu_event', and 'rxev' signals) and the 'PWR' block (via 'exti_cpu_wkup' signal). The entire EXTI block is labeled 'EXTI' at the bottom left. A small text 'MSV54701V1' is in the bottom right corner.

20.2.1 EXTI connections between peripherals and CPU

The peripherals able to generate wake-up events when the system is in Stop mode or the CPU is in CStop mode are connected to an EXTI configurable event input or direct event input:

The CPU interrupts are connected to their respective CPU NVIC, and, similarly, the CPU event is connected to the CPU rxev input.

The EXTI wake-up signals are connected to the PWR block, and are used to wake up the CPU.

20.3 EXTI functional description

Depending on the EXTI event input type and wake-up target(s), different logic implementations are used. The applicable features are controlled from register bits:

Table 143. EXTI event input configurations and register control (1)

Event input typeWake-up target(s)Logic implementationEXTI_RTSREXTI_FTSREXTI_SWIEREXTI_IMREXTI_EMR
ConfigurableCPUConfigurable event input, CPU wake-up logicXXXXX
DirectCPUDirect event input, CPU wake-up logic---XX

1. X indicates that functionality is available.

20.3.1 EXTI configurable event input - CPU wake-up

Figure 20.3.2 is a detailed representation of the logic associated with configurable event inputs which always wake up the CPU.

Figure 156. Configurable event triggering logic CPU wake-up

Figure 156. Configurable event triggering logic CPU wake-up. This block diagram shows the internal logic of the EXTI (Extended Interrupt) controller. At the top, an 'APB interface' connects to a 'Peripheral interface' block. Below this, several registers are shown: 'Software interrupt event register', 'Falling trigger selection register', 'Rising trigger selection register', 'CPU Event mask register', 'CPU Interrupt mask register', and 'CPU Pending request register'. The 'Software interrupt event register' and 'Falling trigger selection register' feed into an OR gate. The output of this OR gate and 'Configurable Event input(x)' feed into an 'Asynchronous edge detection circuit' which also receives an 'rst' signal. The output of this circuit feeds into a 'Delay' block and a 'CPU Rising Edge detect Pulse generator'. The 'Delay' block output feeds into an AND gate. The 'CPU Rising Edge detect Pulse generator' output feeds into another AND gate. The 'Rising trigger selection register' and 'CPU Event mask register' also feed into this second AND gate. The output of the second AND gate feeds into a third AND gate. The 'CPU Interrupt mask register' and 'CPU Pending request register' (which receives 'rcc_folk') also feed into this third AND gate. The output of the third AND gate feeds into an OR gate labeled 'CPU Event(x)'. This OR gate also receives 'Other CPU Events'. The output of this OR gate is labeled 'cpu_event'. Below this, another OR gate labeled 'CPU wakeup(x)' receives inputs from the third AND gate and 'Other CPU wakeups'. The output of this OR gate feeds into a 'Synch' block which receives 'sys_ck'. The output of the 'Synch' block is labeled 'cpu_wakeup'. The entire logic block is labeled 'EXTI' at the bottom left. A reference 'MSv54702V1' is at the bottom right.
Figure 156. Configurable event triggering logic CPU wake-up. This block diagram shows the internal logic of the EXTI (Extended Interrupt) controller. At the top, an 'APB interface' connects to a 'Peripheral interface' block. Below this, several registers are shown: 'Software interrupt event register', 'Falling trigger selection register', 'Rising trigger selection register', 'CPU Event mask register', 'CPU Interrupt mask register', and 'CPU Pending request register'. The 'Software interrupt event register' and 'Falling trigger selection register' feed into an OR gate. The output of this OR gate and 'Configurable Event input(x)' feed into an 'Asynchronous edge detection circuit' which also receives an 'rst' signal. The output of this circuit feeds into a 'Delay' block and a 'CPU Rising Edge detect Pulse generator'. The 'Delay' block output feeds into an AND gate. The 'CPU Rising Edge detect Pulse generator' output feeds into another AND gate. The 'Rising trigger selection register' and 'CPU Event mask register' also feed into this second AND gate. The output of the second AND gate feeds into a third AND gate. The 'CPU Interrupt mask register' and 'CPU Pending request register' (which receives 'rcc_folk') also feed into this third AND gate. The output of the third AND gate feeds into an OR gate labeled 'CPU Event(x)'. This OR gate also receives 'Other CPU Events'. The output of this OR gate is labeled 'cpu_event'. Below this, another OR gate labeled 'CPU wakeup(x)' receives inputs from the third AND gate and 'Other CPU wakeups'. The output of this OR gate feeds into a 'Synch' block which receives 'sys_ck'. The output of the 'Synch' block is labeled 'cpu_wakeup'. The entire logic block is labeled 'EXTI' at the bottom left. A reference 'MSv54702V1' is at the bottom right.

The software interrupt event register allows the system to trigger configurable events by software, writing the EXTI software interrupt event register (EXTI_SWIER1) , the EXTI software interrupt event register (EXTI_SWIER2) , or the EXTI interrupt mask register (EXTI_IMR1) register bit.

The rising edge EXTI rising trigger selection register (EXTI_RTSR1) , EXTI rising trigger selection register (EXTI_RTSR2) , EXTI interrupt mask register (EXTI_IMR1) , and falling edge EXTI falling trigger selection register (EXTI_FTSR1) , EXTI falling trigger selection register (EXTI_FTSR2) , EXTI interrupt mask register (EXTI_IMR1) selection registers allow the system to enable and select the configurable event active trigger edge or both edges.

The devices feature dedicated interrupt mask registers, namely EXTI interrupt mask register (EXTI_IMR1) and EXTI interrupt mask register (EXTI_IMR2) , EXTI interrupt mask register (EXTI_IMR3) , and EXTI pending register (EXTI_PR1) , EXTI pending register (EXTI_PR2) , for configurable event pending request registers. The CPU pending register is only set for an unmasked CPU interrupt. Each event provides a individual CPU interrupt to the CPU NVIC. The configurable event interrupts need to be acknowledged by software in the EXTI_PR register.

The devices feature dedicated event mask registers, i.e. EXTI event mask register (EXTI_EM1) , EXTI interrupt mask register (EXTI_IMR2) , and EXTI event mask register (EXTI_EM3) . The enabled event then generates an event on the CPU. All events for a CPU are OR-ed together into a single CPU event signal. The CPU pending register (EXTI_PR) is not set for an unmasked CPU event.

When a CPU interrupt or CPU event is enabled, the asynchronous edge detection circuit is reset by the clocked delay and rising edge detect pulse generator. This guarantees that the CPU clock is woken up before the asynchronous edge detection circuit is reset.

Note: A detected configurable event, enabled by the CPU, is only cleared when the CPU wakes up.

20.3.2 EXTI direct event input - CPU wake up

Figure 157 is a detailed representation of the logic associated with direct event inputs waking up the CPU.

Direct events only provide CPU interrupt enable and CPU event enable functionality.

Figure 157. Direct event triggering logic CPU wake up

Figure 157: Direct event triggering logic CPU wake up. This block diagram shows the internal logic of the EXTI (Extended Interrupt) controller. On the left, 'Direct event input(x)' enters the 'Asynchronous Rising edge detection circuit rst'. This circuit is also connected to a 'Delay' block (input: sys_ck) and a 'Failing edge detect Pulse generator' (input: sys_ck). The output of the rising edge detection circuit goes to a 'Synch' block (input: rcc_fclk) and also to an OR gate. The output of the failing edge detect pulse generator goes to the same OR gate. The output of this OR gate goes to an AND gate. The other inputs to this AND gate are 'CPU Event mask register' and 'CPU Interrupt mask register', both connected via a 'Peripheral interface' and 'APB interface'. The output of this AND gate goes to another OR gate, which also receives 'Other CPU wakeups'. The output of this OR gate is 'CPU wakeup(x)', which then passes through a 'Synch' block (input: sys_ck) to become 'cpu_wakeup'. Another path from the 'CPU Interrupt mask register' goes through an AND gate to produce 'cpu_it_exti_per(x)'. A 'CPU Rising Edge detect Pulse generator' (input: rcc_fclk) also receives inputs from the 'CPU Event mask register' and 'CPU Interrupt mask register' and produces 'CPU Event(x)', which is OR-ed with 'Other CPU Events' to produce 'cpu_event'. The entire logic is contained within a box labeled 'EXTI'.
Figure 157: Direct event triggering logic CPU wake up. This block diagram shows the internal logic of the EXTI (Extended Interrupt) controller. On the left, 'Direct event input(x)' enters the 'Asynchronous Rising edge detection circuit rst'. This circuit is also connected to a 'Delay' block (input: sys_ck) and a 'Failing edge detect Pulse generator' (input: sys_ck). The output of the rising edge detection circuit goes to a 'Synch' block (input: rcc_fclk) and also to an OR gate. The output of the failing edge detect pulse generator goes to the same OR gate. The output of this OR gate goes to an AND gate. The other inputs to this AND gate are 'CPU Event mask register' and 'CPU Interrupt mask register', both connected via a 'Peripheral interface' and 'APB interface'. The output of this AND gate goes to another OR gate, which also receives 'Other CPU wakeups'. The output of this OR gate is 'CPU wakeup(x)', which then passes through a 'Synch' block (input: sys_ck) to become 'cpu_wakeup'. Another path from the 'CPU Interrupt mask register' goes through an AND gate to produce 'cpu_it_exti_per(x)'. A 'CPU Rising Edge detect Pulse generator' (input: rcc_fclk) also receives inputs from the 'CPU Event mask register' and 'CPU Interrupt mask register' and produces 'CPU Event(x)', which is OR-ed with 'Other CPU Events' to produce 'cpu_event'. The entire logic is contained within a box labeled 'EXTI'.
  1. 1. The CPU interrupt for asynchronous direct event inputs (peripheral wake-up signals) is synchronized with the CPU clock. The synchronous direct event inputs (peripheral interrupt signals), after the asynchronous edge detection, are directly sent to the CPU interrupt without resynchronization.

20.4 EXTI event input mapping

For the sixteen GPIO event inputs the associated IOPORT pin has to be selected in the SBS register SBS_EXTICRn. The same pin from each IOPORT maps to the corresponding EXTI event input.

The wake-up capabilities of each event input are detailed in Table 144 . An event input can wake up the CPU.

The EXTI event inputs with a connection to the CPU NVIC are indicated in the Connection to NVIC column. For the EXTI events not having a connection to the NVIC, the peripheral interrupt is directly connected to the NVIC in parallel with the connection to the EXTI.

All EXTI event inputs are OR-ed together and connected to the CPU event input (rxev).

Table 144. EXTI event input mapping

Event inputSourceEvent input typeConnection to NVIC
0 - 15EXTI[15:0]ConfigurableYes
16PVD and AVD (1)ConfigurableYes
17RTC alarms,ConfigurableYes
18RTC tamper, RTC timestamp, LSE_CSS (2)ConfigurableYes
19RTC wake-up timerConfigurableYes
20VBUS_FS_PLUG_UNPLUGConfigurableYes (3)
21VBUS_HS_PLUG_UNPLUGConfigurableYes (3)
22I2C1 wake-upDirectYes
23I2C2 wake-upDirectYes
24I2C3 wake-upDirectYes
25I3C1 wake-upDirectYes
26USART1 wake-upDirectYes
27USART2 wake-upDirectYes
28USART3 wake-upDirectYes
29Reserved--
30UART4 wake-upDirectYes
31UART5 wake-upDirectYes
32UART7 wake-upDirectYes
33UART8 wake-upDirectYes
34ADF wake-upConfigurableYes
35LPUART1 wake-upDirectYes
36SPI1 wake-upDirectYes
37SPI2 wake-upDirectYes
38SPI3 wake-upDirectYes
39SPI4 wake-upDirectYes

Table 144. EXTI event input mapping (continued)

Event inputSourceEvent input typeConnection to NVIC
40SPI5 wake-upDirectYes
41SPI6 wake-upDirectYes
42MDIO wake-upDirectYes
43USB_OTG_FS wake-upDirectYes
44USB_OTG_HS wake-upDirectYes
45UCPD wake-upDirectYes
46ETH_wake-up (3)ConfigurableYes
47LPTIM1 wake-upDirectYes
48LPTIM2 wake-upDirectYes
49LPTIM2 CH1ConfigurableYes
50LPTIM3 wake-upDirectYes
51LPTIM3 CH1ConfigurableYes
52LPTIM4 wake-upDirectYes
53LPTIM5 wake-upDirectYes
54HDMI-CEC wake-upConfigurableYes
55WKUP1DirectYes
56WKUP2DirectYes
57WKUP3DirectYes
58WKUP4DirectYes
59WGLS wake-upDirectYes
60Reserved--
61Reserved--
62Reserved--
63Reserved--
64Reserved--
65Reserved--
66Reserved--
67Reserved--
68Reserved--
69Reserved--
70Reserved--
71Reserved--
72Reserved--
73Reserved--
74Reserved--

Table 144. EXTI event input mapping (continued)

Event inputSourceEvent input typeConnection to NVIC
75Reserved--
76Reserved--
77DTS wake-upDirectYes
78Reserved--
79Reserved--
80Reserved--
  1. 1. PVD and AVD signals are OR-ed together on the same EXTI event input.
  2. 2. RTC Tamper, RTC timestamp and LSE_CSS are OR-ed together on the same EXTI event input.
  3. 3. lpi_intr_o OR pmt_intr_o

20.5 EXTI functional behavior

The direct event inputs are enabled in the respective peripheral generating the event. The configurable events are enabled by enabling at least one of the trigger edges.

An event only wakes up the CPU when the event-associated CPU interrupt is unmasked and/or the CPU event is unmasked.

Table 145. Masking functionality

CPUConfigurable event inputs
PRx bits of EXTI_PR
CPU
Interrupt enable
MRx bits of
EXTI_IMR
Event enable
MRx bits of
EXTI_EMR
InterruptEventWake-up
00NoMaskedMaskedMasked
01NoMaskedYesYes
10Status latchedYesMaskedYes
11Status latchedYesYesYes

For configurable event inputs, when the enabled edge(s) occur on the event input, an event request is generated. When the associated CPU interrupt is unmasked, the corresponding pending PRx bit in EXTI_PR is set and the CPU interrupt signal is activated. EXTI_PR PRx pending bit must be cleared by software writing it to '1'. This clears the CPU interrupt.

For direct event inputs, when enabled in the associated peripheral, an event request is generated on the rising edge only. There is no corresponding CPU pending bit. When the associated CPU interrupt is unmasked the corresponding CPU interrupt signal is activated.

The CPU event has to be unmasked to generate an event. When the enabled edge(s) occur on the event input a CPU event pulse is generated. There is no CPU event pending bit.

Both a CPU interrupt and a CPU event may be enabled on the same event input. They both trigger the same event input condition(s).

For the configurable event inputs an event input request can be generated by software when writing a '1' in the software interrupt/event register EXTI_SWIER.

20.5.1 EXTI CPU interrupt procedure

20.5.2 EXTI CPU event procedure

20.5.3 EXTI CPU wake-up procedure

20.5.4 EXTI software interrupt/event trigger procedure

Any of the configurable event inputs can be triggered from the software interrupt/event register (the associated CPU interrupt and/or CPU event must be enabled by their respective procedure).

Note: An edge on the configurable event input also triggers an interrupt/event.

20.6 EXTI registers

The registers can only be accessed with a 32-bit (word). A byte or half-word cannot be read or written.

20.6.1 EXTI rising trigger selection register (EXTI_RTSR1)

Address offset: 0x00

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.RT21RT20RT19RT18RT17RT16
rwrwrwrwrwrw
1514131211109876543210
RT15RT14RT13RT12RT11RT10RT9RT8RT7RT6RT5RT4RT3RT2RT1RT0
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:22 Reserved, must be kept at reset value.

Bits 21:0 RT[21:0] : Rising trigger event configuration bit of configurable event input x. (1)

0: Rising trigger disabled (for event and interrupt) for input line

1: Rising trigger enabled (for event and interrupt) for input line

  1. The configurable event inputs are edge triggered, no glitch must be generated on these inputs.
    If a rising edge on the configurable event input occurs during writing of the register, the associated pending bit is not set.
    Rising and falling edge triggers can be set for the same configurable event input. In this case, both edges generate a trigger.

20.6.2 EXTI falling trigger selection register (EXTI_FTSR1)

Address offset: 0x04

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.FT21FT20FT19FT18FT17FT16
rwrwrwrwrwrw
1514131211109876543210
FT15FT14FT13FT12FT11FT10FT9FT8FT7FT6FT5FT4FT3FT2FT1FT0
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:22 Reserved, must be kept at reset value.

Bits 21:0 FT[21:0] : Falling trigger event configuration bit of configurable event input x. (1)

0: Falling trigger disabled (for event and interrupt) for input line

1: Falling trigger enabled (for event and interrupt) for input line.

  1. The configurable event inputs are edge triggered, no glitch must be generated on these inputs.
    If a falling edge on the configurable event input occurs during writing of the register, the associated pending bit is not set.
    Rising and falling edge triggers can be set for the same configurable event input. In this case, both edges generate a trigger.

20.6.3 EXTI software interrupt event register (EXTI_SWIER1)

Address offset: 0x08

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.SW 21SW 20SW 19SW 18SW 17SW 16
rwrwrwrwrwrw

1514131211109876543210
SW 15SW 14SW 13SW 12SW 11SW 10SW9SW8SW7SW6SW5SW4SW3SW2SW1SW0
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:22 Reserved, must be kept at reset value.

Bits 21:0 SWx : Software interrupt on event x (x = 21 to 0).

This bitfield always returns 0 when read.

0: Writing 0 has no effect.

1: Writing a 1 to this bit triggers an event on line x. This bit is auto cleared by HW.

20.6.4 EXTI rising trigger selection register (EXTI_RTSR2)

Address offset: 0x20

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.RT54Res.Res.RT51Res.RT49Res.
rwrwrw

1514131211109876543210
Res.RT46Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.RT34Res.Res.
rwrw

Bits 31:23 Reserved, must be kept at reset value.

Bit 22 RT54 : Rising trigger event configuration bit of configurable event input x+32. (1)

0: Rising trigger disabled (for event and interrupt) for input line

1: Rising trigger enabled (for event and interrupt) for input line

Bits 21:20 Reserved, must be kept at reset value.

Bit 19 RT51 : Rising trigger event configuration bit of configurable event input x+32. (1)

0: Rising trigger disabled (for event and interrupt) for input line

1: Rising trigger enabled (for event and interrupt) for input line

Bit 18 Reserved, must be kept at reset value.

Bit 17 RT49 : Rising trigger event configuration bit of configurable event input x+32. (1)

0: Rising trigger disabled (for event and interrupt) for input line

1: Rising trigger enabled (for event and interrupt) for input line

Bits 16:15 Reserved, must be kept at reset value.

Bit 14 RT46 : Rising trigger event configuration bit of configurable event input x+32. (1)

0: Rising trigger disabled (for event and interrupt) for input line

1: Rising trigger enabled (for event and interrupt) for input line

Bits 13:3 Reserved, must be kept at reset value.

Bit 2 RT34 : Rising trigger event configuration bit of configurable event input x+32. (1)

0: Rising trigger disabled (for event and interrupt) for input line

1: Rising trigger enabled (for event and interrupt) for input line

Bits 1:0 Reserved, must be kept at reset value.

  1. 1. The configurable event inputs are edge triggered, no glitch must be generated on these inputs.
    If a rising edge on the configurable event input occurs during writing of the register, the associated pending bit is not set.
    Rising and falling edge triggers can be set for the same configurable event input. In this case, both edges generate a trigger.

20.6.5 EXTI falling trigger selection register (EXTI_FTSR2)

Address offset: 0x24

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.FT54Res.Res.FT51Res.FT49Res.
1514131211109876543210
Res.FT46Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.FT34Res.Res.
rwrw

Bits 31:23 Reserved, must be kept at reset value.

Bit 22 FT54 : Falling trigger event configuration bit of configurable event input x+32. (1)

0: Falling trigger disabled (for event and interrupt) for input line

1: Falling trigger enabled (for event and interrupt) for input line

Bits 21:20 Reserved, must be kept at reset value.

Bit 19 FT51 : Falling trigger event configuration bit of configurable event input x+32. (1)

0: Falling trigger disabled (for event and interrupt) for input line

1: Falling trigger enabled (for event and interrupt) for input line

Bit 18 Reserved, must be kept at reset value.

Bit 17 FT49 : Falling trigger event configuration bit of configurable event input x+32. (1)

0: Falling trigger disabled (for event and interrupt) for input line

1: Falling trigger enabled (for event and interrupt) for input line

Bits 16:15 Reserved, must be kept at reset value.

Bit 14 FT46 : Falling trigger event configuration bit of configurable event input x+32. (1)

0: Falling trigger disabled (for event and interrupt) for input line

1: Falling trigger enabled (for event and interrupt) for input line

Bits 13:3 Reserved, must be kept at reset value.

Bit 2 FT34 : Falling trigger event configuration bit of configurable event input x+32. (1)

0: Falling trigger disabled (for event and interrupt) for input line

1: Falling trigger enabled (for event and interrupt) for input line

Bits 1:0 Reserved, must be kept at reset value.

  1. 1. The configurable event inputs are edge triggered, no glitch must be generated on these inputs.
    If a falling edge on the configurable event input occurs during writing of the register, the associated pending bit is not set.
    Rising and falling edge triggers can be set for the same configurable event input. In this case, both edges generate a trigger.

20.6.6 EXTI software interrupt event register (EXTI_SWIER2)

Address offset: 0x28

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.SW
54
Res.Res.SW
51
Res.SW
49
Res.
rwrwrw

1514131211109876543210
Res.SW
46
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.SW
34
Res.Res.
rwrw

Bits 31:23 Reserved, must be kept at reset value.

Bit 22 SW54 : Software interrupt on event x+32

Always returns 0 when read.

0: Writing 0 has no effect.

1: Writing a 1 to this bit triggers an event on line x. This bit is auto cleared by HW.

Bits 21:20 Reserved, must be kept at reset value.

Bit 19 SW51 : Software interrupt on event x+32

Always returns 0 when read.

0: Writing 0 has no effect.

1: Writing a 1 to this bit triggers an event on line x. This bit is auto cleared by HW.

Bit 18 Reserved, must be kept at reset value.

Bit 17 SW49 : Software interrupt on event x+32

Always returns 0 when read.

0: Writing 0 has no effect.

1: Writing a 1 to this bit triggers an event on line x. This bit is auto cleared by HW.

Bits 16:15 Reserved, must be kept at reset value.

Bit 14 SW46 : Software interrupt on event x+32

Always returns 0 when read.

0: Writing 0 has no effect.

1: Writing a 1 to this bit triggers an event on line x. This bit is auto cleared by HW.

Bits 13:3 Reserved, must be kept at reset value.

Bit 2 SW34 : Software interrupt on event x+32

Always returns 0 when read.

0: Writing 0 has no effect.

1: Writing a 1 to this bit triggers an event on line x. This bit is auto cleared by HW.

Bits 1:0 Reserved, must be kept at reset value.

20.6.7 EXTI interrupt mask register (EXTI_IMR1)

Address offset: 0x80

Reset value: 0xFFC0 0000

31302928272625242322212019181716
IM31IM30IM29IM28IM27IM26IM25IM24IM23IM22IM21IM20IM19IM18IM17IM16
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
IM15IM14IM13IM12IM11IM10IM9IM8IM7IM6IM5IM4IM3IM2IM1IM0
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:22 IM[31:22] : CPU interrupt mask on direct event input x (1)

0: Interrupt request from line x is masked

1: Interrupt request from line x is unmasked

Bits 21:0 IM[21:0] : CPU interrupt mask on configurable event input x (2)

0: Interrupt request from line x is masked

1: Interrupt request from line x is unmasked

  1. 1. The reset value for direct event inputs is set to '1' in order to enable the interrupt by default.
  2. 2. The reset value for configurable event inputs is set to '0' in order to disable the interrupt by default.

20.6.8 EXTI event mask register (EXTI_EMR1)

Address offset: 0x84

Reset value: 0x0000 0000

31302928272625242322212019181716
EM31EM30EM29EM28EM27EM26EM25EM24EM23EM22EM21EM20EM19EM18EM17EM16
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
EM15EM14EM13EM12EM11EM10EM9EM8EM7EM6EM5EM4EM3EM2EM1EM0
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:0 EM[31:0] : CPU event mask on event input x
0: Event request from line x is masked
1: Event request from line x is unmasked

20.6.9 EXTI pending register (EXTI_PR1)

Address offset: 0x88

Reset value: 0xXXXX XXXX

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.PR21PR20PR19PR18PR17PR16
rc_w1rc_w1rc_w1rc_w1rc_w1rc_w1
1514131211109876543210
PR15PR14PR13PR12PR11PR10PR9PR8PR7PR6PR5PR4PR3PR2PR1PR0
rc_w1rc_w1rc_w1rc_w1rc_w1rc_w1rc_w1rc_w1rc_w1rc_w1rc_w1rc_w1rc_w1rc_w1rc_w1rc_w1

Bits 31:22 Reserved, must be kept at reset value.

Bits 21:0 PR[21:0] : Configurable event inputs x 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 writing a 1 into the bit or by changing the sensitivity of the edge detector.

20.6.10 EXTI interrupt mask register (EXTI_IMR2)

Address offset: 0x90

Reset value: 0xFFFF5 FFFF

31302928272625242322212019181716
Res.Res.Res.Res.IM59IM58IM57IM56IM55IM54IM53IM52IM51IM50IM49IM48
1514131211109876543210
IM47IM46IM45IM44IM43IM42IM41IM40IM39IM38IM37IM36IM35IM34IM33IM32
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:28 Reserved, must be kept at reset value.

Bits 27:0 IM[59:32] : CPU interrupt mask on direct event input x+32 (x = 59 to 32)

0: Interrupt request from line x is masked

1: Interrupt request from line x is unmasked

20.6.11 EXTI event mask register (EXTI_EMR2)

Address offset: 0x94

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.EM59EM58EM57EM56EM55EM54EM53EM52EM51EM50EM49EM48
1514131211109876543210
EM47EM46EM45EM44EM43EM42EM41EM40EM39EM38EM37EM36EM35EM34EM33EM32
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:28 Reserved, must be kept at reset value.

Bits 27:0 EM[59:32] : CPU event mask on event input x+32 (x = 59 to 32)

0: Event request from line x is masked

1: Event request from line x is unmasked

20.6.12 EXTI pending register (EXTI_PR2)

Address offset: 0x98

Reset value: 0xXXXX XXXX

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.PR54Res.Res.PR51Res.PR49Res.
rc_w1rc_w1rc_w1
1514131211109876543210
Res.PR46Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.PR34Res.Res.
rc_w1rc_w1

Bits 31:23 Reserved, must be kept at reset value.

Bit 22 PR54 : Configurable event inputs x+32 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 writing a 1 into the bit or by changing the sensitivity of the edge detector.

Bits 21:20 Reserved, must be kept at reset value.

Bit 19 PR51 : Configurable event inputs x+32 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 writing a 1 into the bit or by changing the sensitivity of the edge detector.

Bit 18 Reserved, must be kept at reset value.

Bit 17 PR49 : Configurable event inputs x+32 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 writing a 1 into the bit or by changing the sensitivity of the edge detector.

Bits 16:15 Reserved, must be kept at reset value.

Bit 14 PR46 : Configurable event inputs x+32 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 writing a 1 into the bit or by changing the sensitivity of the edge detector.

Bits 13:3 Reserved, must be kept at reset value.

Bit 2 PR34 : Configurable event inputs x+32 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 writing a 1 into the bit or by changing the sensitivity of the edge detector.

Bits 1:0 Reserved, must be kept at reset value.

20.6.13 EXTI interrupt mask register (EXTI_IMR3)

Address offset: 0xA0

Reset value: 0x0F8B FFFF

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.IM77Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
rw

Bits 31:14 Reserved, must be kept at reset value.

Bit 13 IM[77] : CPU interrupt mask on direct event input x+64 (1)

0: Interrupt request from line x is masked

1: Interrupt request from line x is unmasked

Bits 12:0 Reserved, must be kept at reset value.

  1. 1. The reset value for direct event inputs is set to '1' in order to enable the interrupt by default.

20.6.14 EXTI event mask register (EXTI_EMR3)

Address offset: 0xA4

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.EM77Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
rw

Bits 31:14 Reserved, must be kept at reset value.

Bit 13 EM[77] : CPU event mask on event input x+64

0: Event request from line x is masked

1: Event request from line x is unmasked

Bits 12:0 Reserved, must be kept at reset value.

20.6.15 EXTI register map

Table 146. Extended interrupt and event controller register map and reset values

OffsetRegister name reset value313029282726252423222120191817161514131211109876543210
0x00EXTI_RTSR1Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.RT21RT20RT19RT18RT17RT16RT15RT14RT13RT12RT11RT10RT9RT8RT7RT6RT5RT4RT3RT2RT1RT0
Reset value0000000000000000000000
0x04EXTI_FTSR1Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.FT21FT20FT19FT18FT17FT16FT15FT14FT13FT12FT11FT10FT9FT8FT7FT6FT5FT4FT3FT2FT1FT0
Reset value0000000000000000000000
0x08EXTI_SWIER1Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.SW21SW20SW19SW18SW17SW16SW15SW14SW13SW12SW11SW10SW9SW8SW7SW6SW5SW4SW3SW2SW1SW0
Reset value0000000000000000000000
0x12-0x1CReserved
0x20EXTI_RTSR2Res.Res.Res.Res.Res.Res.Res.Res.Res.RT54Res.Res.RT51Res.RT49Res.Res.RT46Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.RT34Res.Res.
Reset value00000
0x24EXTI_FTSR2Res.Res.Res.Res.Res.Res.Res.Res.Res.FT54Res.Res.FT51Res.FT49Res.Res.FT46Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.FT34Res.Res.
Reset value00000
0x28EXTI_SWIER2Res.Res.Res.Res.Res.Res.Res.Res.Res.SW54Res.Res.SW51Res.SW49Res.Res.SW46Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.SW34Res.Res.
Reset value00000
0x2C-0x7CReserved
0x80EXTI_IMR1IM31IM30IM29IM28IM27IM26IM25IM24IM23IM22IM21IM20IM19IM18IM17IM16IM15IM14IM13IM12IM11IM10IM9IM8IM7IM6IM5IM4IM3IM2IM1IM0
Reset value11111111110000000000000000000000
0x84EXTI_EMR1EM31EM30EM29EM28EM27EM26EM25EM24EM23EM22EM21EM20EM19EM18EM17EM16EM15EM14EM13EM12EM11EM10EM9EM8EM7EM6EM5EM4EM3EM2EM1EM0
Reset value00000000000000000000000000000000
0x88EXTI_PR1Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.PR21PR20PR19PR18PR17PR16PR15PR14PR13PR12PR11PR10PR9PR8PR7PR6PR5PR4PR3PR2PR1PR0
Reset valueXXXXXXXXXXXXXXXXXXXXXX
0x90EXTI_IMR2Res.Res.Res.Res.IM59IM58IM57IM56IM55IM54IM53IM52IM51IM50IM49IM48IM47IM46IM45IM44IM43IM42IM41IM40IM39IM38IM37IM36IM35IM34IM33IM32
Reset value1111111101011111111111111111
0x94EXTI_EMR2Res.Res.Res.Res.EM59EM58EM57EM56EM55EM54EM53EM52EM51EM50EM49EM48EM47EM46EM45EM44EM43EM42EM41EM40EM39EM38EM37EM36EM35EM34EM33EM32
Reset value0000000000000000000000000000
0x98EXTI_PR2Res.Res.Res.Res.Res.Res.Res.Res.Res.PR54Res.Res.PR51Res.PR49Res.Res.PR46Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.PR34Res.Res.
Reset valueXXXXX
0x9CReserved

Table 146. Extended interrupt and event controller register map and reset values (continued)

OffsetRegister name reset value313029282726252423222120191817161514131211109876543210
0xA0EXTI_IMR3Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.IM77Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
Reset value1
0xA4EXTI_EMR3Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.EM77Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
Reset value0

Refer to Section 2.3 on page 150 for the register boundary addresses.