20. Extended interrupt and event controller (EXTI)

The Extended Interrupt and event controller (EXTI) manages wakeup through configurable and direct event inputs. It provides wakeup requests to the power controller (PWR), and generates interrupt requests to the CPU NVIC and to the SRD domain DMAMUX2, and events to the CPU event input.

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

In addition, both the interrupt request and event request generation can be used in Run mode.

20.1 EXTI main features

The EXTI main features are the following:

The asynchronous event inputs are classified in two groups:

They have an SRD pending mask and a status register, and may have an SRD interrupt signal.

Direct events feature:

20.2 EXTI block diagram

As shown in Figure 95 , 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 wakeup, interrupt and event outputs, as well as their masking.

Figure 95. EXTI block diagram

Figure 95. 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)' inputs. The 'Event Trigger' block is connected to the 'Registers' block and the 'Masking' block. The 'Registers' block is connected to an 'APB interface'. The 'Masking' block outputs signals to the 'CPU' (nvic(n), rxe), 'PWR' (exti_cpu_wkup, exti_srd_wkup), and 'SRD' (srd_it_exti_per(x), srd_pendclear_in[3:0]). The entire EXTI block is labeled 'EXTI' at the bottom left. A reference code 'MSV50659V1' is in the bottom right corner.
Figure 95. 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)' inputs. The 'Event Trigger' block is connected to the 'Registers' block and the 'Masking' block. The 'Registers' block is connected to an 'APB interface'. The 'Masking' block outputs signals to the 'CPU' (nvic(n), rxe), 'PWR' (exti_cpu_wkup, exti_srd_wkup), and 'SRD' (srd_it_exti_per(x), srd_pendclear_in[3:0]). The entire EXTI block is labeled 'EXTI' at the bottom left. A reference code 'MSV50659V1' is in the bottom right corner.

20.2.1 EXTI connections between peripherals, CPU and SRD domain

The peripherals able to generate wakeup 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 event inputs able to wakeup SRD for Autonomous run mode are provided with an SRD domain pending request function, that has to be cleared. This clearing request is taken care of by the signal selected by the pending clear selection.

The CPU interrupts are connected to their respective CPU NVIC. Similarly, the CPU event is connected to the CPU rxe input.

The EXTI wakeup signals are connected to the PWR block. They are used to wake up the SRD domain and/or the CPU.

The SRD domain interrupts allow the system to trigger events for SRD domain Autonomous run operations.

20.3 EXTI functional description

Different logic implementations can be used, depending on the EXTI event input type and wakeup target(s). The applicable features are controlled from register bits:

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

Event input typeWakeup target(s)Logic implementationEXTI_RTSREXTI_FTSREXTI_SWIEREXTI_CPUIMREXTI_CPUEMREXTI_SRDPMR
ConfigurableCPUConfigurable event input, CPU wakeup logicXXXXX-
Any (2)Configurable event input, Any wakeup logicX
DirectCPUDirect event input, CPU wakeup logic---XX-
Any (2)Direct event input, Any wakeup logicX

1. X indicates that the functionality is available.

2. Waking up SRD domain for Autonomous run mode and/or CPU.

20.3.1 EXTI configurable event input CPU wakeup

Figure 97 provides a detailed representation of the logic associated to the configurable event inputs that always wake up the CPU.

Figure 96. Configurable event triggering logic CPU wakeup

Figure 96: Configurable event triggering logic CPU wakeup. This block diagram shows the internal logic of the EXTI for CPU wakeup. At the top, a 'Peripheral interface' block is connected to an 'APB interface'. Below it are several registers: '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 'CPU Pending request register' is connected to 'rcc_fclk_cpu'. On the left, a 'Configurable Event input(x)' is shown. This input passes through an OR gate and then into an 'Asynchronous edge detection circuit' which has a 'rst' input. The output of this circuit goes to a 'CPU Rising Edge detect Pulse generator' which has a 'Delay' block and is also connected to 'rcc_fclk_cpu'. The output of the pulse generator goes to a series of AND gates. The first AND gate takes inputs from the 'CPU Event mask register' and the 'CPU Interrupt mask register'. The output of this AND gate goes to an OR gate labeled 'CPU Event(x)', which also takes 'Other CPU Events' as input. The output of this OR gate is 'cpu_event'. Below this, another AND gate takes inputs from the 'CPU Pending request register' and the 'CPU Interrupt mask register'. Its output goes to an OR gate labeled 'CPU Wakeup(x)', which also takes 'Other CPU Wakeups' as input. The output of this OR gate goes to a 'Synch' block connected to 'ck_sys'. The output of the 'Synch' block goes to an OR gate labeled 'SRD Wakeup(x)', which also takes 'Other SRD Wakeups' as input. The output of this OR gate is 'srd_wakeup_cpu_wakeup'. Finally, the output of the 'CPU Rising Edge detect Pulse generator' also goes to an OR gate labeled 'cpu_it_exti_per(x)'. The entire logic block is labeled 'EXTI' at the bottom left. The diagram is identified by 'MSv50660V1' at the bottom right.
Figure 96: Configurable event triggering logic CPU wakeup. This block diagram shows the internal logic of the EXTI for CPU wakeup. At the top, a 'Peripheral interface' block is connected to an 'APB interface'. Below it are several registers: '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 'CPU Pending request register' is connected to 'rcc_fclk_cpu'. On the left, a 'Configurable Event input(x)' is shown. This input passes through an OR gate and then into an 'Asynchronous edge detection circuit' which has a 'rst' input. The output of this circuit goes to a 'CPU Rising Edge detect Pulse generator' which has a 'Delay' block and is also connected to 'rcc_fclk_cpu'. The output of the pulse generator goes to a series of AND gates. The first AND gate takes inputs from the 'CPU Event mask register' and the 'CPU Interrupt mask register'. The output of this AND gate goes to an OR gate labeled 'CPU Event(x)', which also takes 'Other CPU Events' as input. The output of this OR gate is 'cpu_event'. Below this, another AND gate takes inputs from the 'CPU Pending request register' and the 'CPU Interrupt mask register'. Its output goes to an OR gate labeled 'CPU Wakeup(x)', which also takes 'Other CPU Wakeups' as input. The output of this OR gate goes to a 'Synch' block connected to 'ck_sys'. The output of the 'Synch' block goes to an OR gate labeled 'SRD Wakeup(x)', which also takes 'Other SRD Wakeups' as input. The output of this OR gate is 'srd_wakeup_cpu_wakeup'. Finally, the output of the 'CPU Rising Edge detect Pulse generator' also goes to an OR gate labeled 'cpu_it_exti_per(x)'. The entire logic block is labeled 'EXTI' at the bottom left. The diagram is identified by 'MSv50660V1' 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 software interrupt event register (EXTI_SWIER3) register bit.

The rising edge EXTI rising trigger selection register (EXTI_RTSR1) , EXTI rising trigger selection register (EXTI_RTSR2) , EXTI rising trigger selection register (EXTI_RTSR3) , and falling edge EXTI falling trigger selection register (EXTI_FTSR1) , EXTI falling trigger selection register (EXTI_FTSR2) , EXTI falling trigger selection register (EXTI_FTSR3) 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_CPUIMR1) and EXTI interrupt mask register (EXTI_CPUIMR2) , EXTI interrupt mask register (EXTI_CPUIMR3) , and EXTI pending register (EXTI_CPUPR1) , EXTI pending register (EXTI_CPUPR2) , EXTI pending register (EXTI_CPUPR3) for configurable events 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_CPUPR register.

The devices feature dedicated event mask registers, i.e. EXTI event mask register (EXTI_C1EMR1) , EXTI event mask register (EXTI_C1EMR2) , and EXTI event mask register (EXTI_C1EMR3) . 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_CPUPR) 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 configurable event input Any wakeup

Figure 97 provides a detailed description of the logic associated to the configurable event inputs that can wake up SRD domain for Autonomous run mode and/or CPU (“Any” target). It provides the same functionality as the configurable event input CPU wakeup, with additional functionality to wake up the SRD domain independently.

When all CPU interrupts and CPU events are disabled, the asynchronous edge detection circuit is reset by the SRD domain clocked delay and rising edge detect pulse generator. This guarantees that the SRD domain clock is woken up before the asynchronous edge detection circuit is reset.

Table 127. Configurable event input asynchronous edge detector reset

EXTI_C1IMREXTI_C1EMRAsynchronous Edge detector reset by
Both = 0SRD domain clock rising edge detect pulse generator
At least one = 1CPU clock rising edge detect pulse generator

Figure 97. Configurable event triggering logic Any wakeup

Block diagram of the Configurable event triggering logic for 'Any' wakeup. The diagram shows the internal architecture of the EXTI block, including the APB interface, various registers (Software interrupt event register, Falling trigger selection register, Rising trigger selection register, CPU Event mask register, CPU Interrupt mask register, CPU Pending request register, SRD Pending mask register), and logic circuits (Asynchronous edge detection circuit, CPU Rising Edge detect Pulse generator, SRD Domain Rising Edge detect Pulse generator). It also shows the output signals: cpu_it_exti_per(x), cpu_event, srd_pendclear(x), srd_it_exti_per(x), cpu_wakeup, and srd_wakeup. The diagram is labeled with clock signals rcc_folk_cpu, ck_folk_srd, and ck_sys, and includes a reset signal rst. The bottom right corner contains the identifier MSV50661V2.
Block diagram of the Configurable event triggering logic for 'Any' wakeup. The diagram shows the internal architecture of the EXTI block, including the APB interface, various registers (Software interrupt event register, Falling trigger selection register, Rising trigger selection register, CPU Event mask register, CPU Interrupt mask register, CPU Pending request register, SRD Pending mask register), and logic circuits (Asynchronous edge detection circuit, CPU Rising Edge detect Pulse generator, SRD Domain Rising Edge detect Pulse generator). It also shows the output signals: cpu_it_exti_per(x), cpu_event, srd_pendclear(x), srd_it_exti_per(x), cpu_wakeup, and srd_wakeup. The diagram is labeled with clock signals rcc_folk_cpu, ck_folk_srd, and ck_sys, and includes a reset signal rst. The bottom right corner contains the identifier MSV50661V2.

The event triggering logic for “Any” target has additional SRD pending mask register EXTI SRD pending mask register (EXTI_SRDPMR1) , EXTI SRD pending mask register (EXTI_SRDPMR2) , EXTI SRD pending mask register (EXTI_SRDPMR3) and SRD pending request logic. The SRD pending request logic is only set for unmasked SRD pending events. The SRD pending request logic keeps the SRD domain in Run mode until the SRD pending request logic is cleared by the selected SRD domain pendclear source.

20.3.3 EXTI direct event input CPU wakeup

Figure 98 provides a detailed description of the logic associated with the direct event inputs that wake up the CPU.

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

Figure 98. Direct event triggering logic CPU wakeup

Figure 98. Direct event triggering logic CPU wakeup. This block diagram shows the internal logic of the EXTI for CPU wakeup. It includes an APB interface, a Peripheral interface, CPU Event and Interrupt mask registers, edge detection circuits (rising and falling), pulse generators, and various logic gates (AND, OR) that combine signals from direct event inputs, other CPU events, and SRD wakeups to generate output signals: cpu_it_exti_per(x), cpu_event, cpu_wakeup, and srd_wakeup_cpu_wakeup(x).

The diagram illustrates the internal logic of the EXTI for CPU wakeup. At the top, an APB interface connects to a Peripheral interface. Below this, there are two CPU registers: a CPU Event mask register and a CPU Interrupt mask register. The main logic starts with a Direct Event input(x) entering an Asynchronous Rising edge detection circuit (rst). This circuit's output is split: one path goes through a Delay block (clocked by ck_sys) and an AND gate (also receiving rcc_fclk_cpu 1) via a Synch block); the other path goes to a Failing edge detect Pulse generator (clocked by ck_sys). Both pulse generators' outputs are combined in an OR gate. This OR gate's output is ANDed with the CPU Event mask register output. The result is then ORed with Other CPU Events to produce the cpu_event output. Simultaneously, the OR gate's output is ANDed with the CPU Interrupt mask register output. This result is ORed with Other CPU Wakeups (which are synchronized with ck_sys) to produce the cpu_wakeup output. Finally, the cpu_wakeup output is ORed with SRD Wakeup(x) and Other SRD Wakeups to produce the srd_wakeup_cpu_wakeup(x) output. The entire logic block is labeled EXT1.

Figure 98. Direct event triggering logic CPU wakeup. This block diagram shows the internal logic of the EXTI for CPU wakeup. It includes an APB interface, a Peripheral interface, CPU Event and Interrupt mask registers, edge detection circuits (rising and falling), pulse generators, and various logic gates (AND, OR) that combine signals from direct event inputs, other CPU events, and SRD wakeups to generate output signals: cpu_it_exti_per(x), cpu_event, cpu_wakeup, and srd_wakeup_cpu_wakeup(x).
  1. 1. The CPU interrupt for asynchronous direct event inputs (peripheral wakeup 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.3.4 EXTI direct event input Any wakeup

Figure 99 provides a detailed description of the logic associated to the direct event inputs that wake up SRD domain for Autonomous run mode and/or CPU, (“Any” target). It provides the same functionality as the direct event input CPU wakeup, plus additional functionality to wakeup the SRD domain independently.

Figure 99. Direct event triggering logic Any wakeup

Figure 99. Direct event triggering logic Any wakeup. This block diagram shows the internal logic of the EXTI for 'Any' wakeup. At the top, a 'Peripheral interface' block is connected to an 'APB interface'. Below it are three registers: 'CPU Event mask register', 'CPU Interrupt mask register', and 'SRD Pending mask register'. The 'Direct Event input(x)' enters from the left and is split into three paths: 1) A 'Delay' block followed by an AND gate with 'ck_sys'. 2) An 'Asynchronous Rising edge detection circuit rst' block. 3) A 'Falling edge detect Pulse generator' block. The output of the 'Delay' path goes to a 'Synch' block (clocked by 'rcc_fclk_cpu') and then to an AND gate. The output of the 'Asynchronous Rising edge detection circuit' goes to a 'CPU Rising Edge detect Pulse generator' (clocked by 'rcc_fclk_cpu') and to an OR gate. The output of the 'Falling edge detect Pulse generator' goes to the same OR gate. The 'CPU Rising Edge detect Pulse generator' output goes to an AND gate. The 'SRD Pending mask register' output goes to an AND gate. The outputs of the AND gates are combined with 'Other CPU Events' and 'Other CPU Wakeups' through a series of OR gates. The final outputs are 'cpu_event', 'cpu_it_exti_per(x)', 'srd_pending', 'srd_pending_clear(x)', 'srd_it_exti_per(x)', 'srd_wakeup_cpu_wakeup', and 'srd_wakeup_srd_wakeup'. The 'EXTI' label is at the bottom left, and the reference 'MSV50663V1' is at the bottom right.
Figure 99. Direct event triggering logic Any wakeup. This block diagram shows the internal logic of the EXTI for 'Any' wakeup. At the top, a 'Peripheral interface' block is connected to an 'APB interface'. Below it are three registers: 'CPU Event mask register', 'CPU Interrupt mask register', and 'SRD Pending mask register'. The 'Direct Event input(x)' enters from the left and is split into three paths: 1) A 'Delay' block followed by an AND gate with 'ck_sys'. 2) An 'Asynchronous Rising edge detection circuit rst' block. 3) A 'Falling edge detect Pulse generator' block. The output of the 'Delay' path goes to a 'Synch' block (clocked by 'rcc_fclk_cpu') and then to an AND gate. The output of the 'Asynchronous Rising edge detection circuit' goes to a 'CPU Rising Edge detect Pulse generator' (clocked by 'rcc_fclk_cpu') and to an OR gate. The output of the 'Falling edge detect Pulse generator' goes to the same OR gate. The 'CPU Rising Edge detect Pulse generator' output goes to an AND gate. The 'SRD Pending mask register' output goes to an AND gate. The outputs of the AND gates are combined with 'Other CPU Events' and 'Other CPU Wakeups' through a series of OR gates. The final outputs are 'cpu_event', 'cpu_it_exti_per(x)', 'srd_pending', 'srd_pending_clear(x)', 'srd_it_exti_per(x)', 'srd_wakeup_cpu_wakeup', and 'srd_wakeup_srd_wakeup'. The 'EXTI' label is at the bottom left, and the reference 'MSV50663V1' is at the bottom right.
  1. 1. The CPU interrupt and SRD domain interrupt for asynchronous direct event inputs (peripheral wakeup signals) are synchronized with the CPU clock and the SRD domain clock, respectively. The synchronous direct event inputs (peripheral interrupt signals), after the asynchronous edge detection, are directly sent to the CPU interrupt and the SRD domain interrupt without resynchronization in the EXTI.

20.3.5 EXTI SRD pending request clear selection

The SRD pending request logic of the event inputs that are able to wake up SRD domain for Autonomous run mode can be cleared by the selected SRD pendclear source.

For each SRD pending request, an SRD domain pendclear source can be selected from four different inputs.

Figure 100 provides a detailed description of the SRD pendclear source selection logic.

Figure 100. SRD domain pending request clear logic

Figure 100. SRD domain pending request clear logic diagram. The diagram shows an APB interface connected to a Peripheral interface. The Peripheral interface is connected to an SRD pending clear selection register. The register is connected to a multiplexer. The multiplexer has four inputs: srd_pendclear_in[0] (DMA_ch6_evt), srd_pendclear_in[1] (DMA_ch7_evt), srd_pendclear_in[2] (LPTIM2 out), and srd_pendclear_in[3] (LPTIM3 out). The output of the multiplexer is connected to an SRD pending request block within an EXTI block. The SRD pending request block is also connected to Event(x).

The diagram illustrates the SRD domain pending request clear logic. It features an APB interface connected to a Peripheral interface. The Peripheral interface is linked to an SRD pending clear selection register. This register controls a multiplexer that selects from four potential sources: srd_pendclear_in[0] (DMA_ch6_evt), srd_pendclear_in[1] (DMA_ch7_evt), srd_pendclear_in[2] (LPTIM2 out), and srd_pendclear_in[3] (LPTIM3 out). The selected source is fed into an SRD pending request block, which is part of the EXTI system and also receives input from Event(x).

Figure 100. SRD domain pending request clear logic diagram. The diagram shows an APB interface connected to a Peripheral interface. The Peripheral interface is connected to an SRD pending clear selection register. The register is connected to a multiplexer. The multiplexer has four inputs: srd_pendclear_in[0] (DMA_ch6_evt), srd_pendclear_in[1] (DMA_ch7_evt), srd_pendclear_in[2] (LPTIM2 out), and srd_pendclear_in[3] (LPTIM3 out). The output of the multiplexer is connected to an SRD pending request block within an EXTI block. The SRD pending request block is also connected to Event(x).

The SRD pending request clear selection registers EXTI SRD pending clear selection register low (EXTI_SRDPCR1L) , EXTI SRD pending clear selection register high (EXTI_SRDPCR1H) , EXTI SRD pending clear selection register low (EXTI_SRDPCR2L) , EXTI SRD pending clear selection register high (EXTI_SRDPCR2H) and EXTI SRD pending clear selection register high (EXTI_SRDPCR3H) allow the system to select the source to reset the SRD pending request.

20.4 EXTI event input mapping

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

The wakeup capabilities of each event input are detailed in Table 128 . An event input can wake up the CPU, and in the case of “Any” can also wake up SRD domain for Autonomous run mode.

The EXTI event inputs that are connected to the CPU NVIC are indicated in the Connection to NVIC column. For the EXTI events that do not have 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 128. EXTI Event input mapping

Event inputSourceEvent input typeWakeup target(s)Connection to NVIC
0 - 15EXTI[15:0]ConfigurableAnyYes
16PVD and AVD (1)ConfigurableCPU onlyYes
17RTC alarmsConfigurableCPU onlyYes
18RTC tamper, RTC timestamp, RCC LSECSS (2)ConfigurableCPU onlyYes
19RTC wakeup timerConfigurableAnyYes
20COMP1ConfigurableAnyYes
21COMP2ConfigurableAnyYes
22I2C1 wakeupDirectCPU onlyYes
23I2C2 wakeupDirectCPU onlyYes
24I2C3 wakeupDirectCPU onlyYes
25I2C4 wakeupDirectAnyYes
26USART1 wakeupDirectCPU onlyYes
27USART2 wakeupDirectCPU onlyYes
28USART3 wakeupDirectCPU onlyYes
29USART6 wakeupDirectCPU onlyYes
30UART4 wakeupDirectCPU onlyYes
31UART5 wakeupDirectCPU onlyYes
32UART7 wakeupDirectCPU onlyYes
33UART8 wakeupDirectCPU onlyYes
34LPUART1 RX wakeupDirectAnyYes
35LPUART1 TX wakeupDirectAnyYes
36SPI1 wakeupDirectCPU onlyYes
37SPI2 wakeupDirectCPU onlyYes
38SPI3 wakeupDirectCPU onlyYes
39SPI4 wakeupDirectCPU onlyYes
40SPI5 wakeupDirectCPU onlyYes
41SPI6 wakeupDirectAnyYes
42MDIO wakeupDirectCPU onlyYes
43USB1 wakeupDirectCPU onlyYes
44Reserved---
45Reserved---
46Reserved---
47LPTIM1 wakeupDirectCPU onlyYes
48LPTIM2 wakeupDirectAnyYes

Table 128. EXTI Event input mapping (continued)

Event inputSourceEvent input typeWakeup target(s)Connection to NVIC
49LPTIM2 outputConfigurableAnyNo (3)
50LPTIM3 wakeupDirectAnyYes
51LPTIM3 outputConfigurableAnyNo (3)
52UART9 wakeupDirectCPU onlyYes
53USART10 wakeupDirectCPU onlyYes
54SWPMI wakeupDirectCPU onlyYes
55 (4)WKUP1DirectCPU onlyYes
56 (4)WKUP2DirectCPU onlyYes
57 (4)WKUP3DirectCPU onlyYes
58 (4)WKUP4DirectCPU onlyYes
59 (4)WKUP5DirectCPU onlyYes
60 (4)WKUP6DirectCPU onlyYes
61RCC interruptDirectCPU onlyNo (5)
62I2C4 Event interruptDirectCPU onlyNo (5)
63I2C4 Error interruptDirectCPU onlyNo (5)
64LPUART1 global InterruptDirectCPU onlyNo (5)
65SPI6 interruptDirectCPU onlyNo (5)
66BDMA2 CH0 interruptDirectCPU onlyNo (5)
67BDMA2 CH1 interruptDirectCPU onlyNo (5)
68BDMA2 CH2 interruptDirectCPU onlyNo (5)
69BDMA2 CH3 interruptDirectCPU onlyNo (5)
70BDMA2 CH4 interruptDirectCPU onlyNo (5)
71BDMA2 CH5 interruptDirectCPU onlyNo (5)
72BDMA2 CH6 interruptDirectCPU onlyNo (5)
73BDMA2 CH7 interruptDirectCPU onlyNo (5)
74DMAMUX2 interruptDirectCPU onlyNo (5)
75Reserved---
76Reserved---
77Reserved---
78Reserved---
79Reserved---
80Reserved---
81Reserved---
82Reserved---
83Reserved---

Table 128. EXTI Event input mapping (continued)

Event inputSourceEvent input typeWakeup target(s)Connection to NVIC
84Reserved---
85HDMI-CEC wakeupConfigurableCPU onlyYes
86Reserved---
87HSECSS interruptDirectCPU onlyNo (5)
88TEMP wakeupDirectAnyYes
  1. 1. PVD and AVD signals are OR-ed together on the same EXTI event input.
  2. 2. RTC Tamper, RTC timestamp and RCC LSECSS signals are OR-ed together on the same EXTI event input.
  3. 3. Not available on CPU NVIC, to be used for system wakeup only or CPU event input (rxev).
  4. 4. Signals of WKUP1 to WKUP6 correspond to WKUPn pin+1.
  5. 5. Available on CPU NVIC directly from the peripheral.

20.5 EXTI functional behavior

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

In Stop mode, an event always wakes up the SRD domain.

In system Run and Stop modes, an event always generates an associated SRD domain interrupt. An event only wakes up the CPU when the event associated CPU interrupt is unmasked and/or the CPU event is unmasked.

Table 129. Masking functionality

CPUConfigurable event inputs PRx bits of EXTI_CPUPRCPUSRD domain wakeup
Interrupt enable MRx bits of EXTI_CPUIMREvent enable MRx bits of EXTI_CPUREMRInterruptEventWakeup
00NoMaskedMaskedMaskedYes (1) / Masked (2)
01NoMaskedYesYesYes
10Status latchedYesMaskedYesYes
11Status latchedYesYesYesYes
  1. 1. Only for event inputs that allow the system to wake up SRD domain for Autonomous run mode (Any target).
  2. 2. For event inputs that always wake up the CPU.

For configurable event inputs, an event request is generated when the enabled edge(s) is/are detected on the event input. When the associated CPU interrupt is unmasked, the corresponding pending PRx bit in EXTI_CPUPR is set and the CPU interrupt signal is activated. EXTI_CPUPR PRx pending bit must be cleared by software by programming 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) is/are detected 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 configurable event inputs, an event input request can be generated by software by writing 1 in the software interrupt/event register EXTI_SWIER.

Whenever an event input is enabled and a CPU interrupt and/or CPU event is unmasked, the event input also generates an SRD domain wakeup next to the CPU wakeup.

Some event inputs can wake up the SRD domain Autonomous run mode. In this case the CPU interrupt and CPU event are masked, preventing the CPU to be woken up. Two SRD domain Autonomous run mode wakeup mechanisms are supported:

20.5.1 EXTI CPU interrupt procedure

  1. 1. Unmask the event input interrupt by setting the corresponding mask bits in the EXTI_CPUIMR register.
  2. 2. For configurable event inputs, enable the event input by setting either one or both the corresponding trigger edge enable bits in EXTI_RTSR and EXTI_FTSR registers.
  3. 3. Enable the associated interrupt source in the CPU NVIC or use the SEVONPEND, so that an interrupt coming from the CPU interrupt signal can be detected by the CPU after a WFI/WFE instruction.

For configurable event inputs, the associated EXTI pending bit needs to be cleared.

20.5.2 EXTI CPU event procedure

  1. 1. Unmask the event input by setting the corresponding mask bits of the EXTI_CPEUMR register.
  2. 2. For configurable event inputs, enable the event input by setting either one or both the corresponding trigger edge enable bits in EXTI_RTSR and EXTI_FTSR registers.
  3. 3. The CPU event signal is detected by the CPU after a WFE instruction.

For configurable event inputs, there is no EXTI pending bit to clear.

20.5.3 EXTI CPU wakeup procedure

  1. 1. Unmask the event input by setting at least one of the corresponding mask bits in the EXTI_CPUIMR and/or EXTI_CPUEMR registers. The CPU wakeup is generated at the same time as the unmasked CPU interrupt and/or CPU event.
  2. 2. For configurable event inputs, enable the event input by setting either one or both the corresponding trigger edge enable bits in EXTI_RTSR and EXTI_FTSR registers.
  3. 3. Direct events automatically generate a CPU wakeup.

20.5.4 EXTI SRD domain wakeup for Autonomous run mode procedure

  1. 1. Mask the event input for waking up the CPU by clearing both the corresponding mask bits in the EXTI_CPUIMR and/or EXTI_CPUEMR registers.
  2. 2. For configurable event inputs, enable the event input by setting either one or both the corresponding trigger edge enable bits in EXTI_RTSR and EXTI_FTSR registers.
  3. 3. Direct events automatically generate an SRD domain wakeup.
  4. 4. Select the SRD domain wakeup mechanism in EXTI_SRDPMR.
    • – When SRD domain wakeup without pending (EXTI_PMR = 0) is selected, the Wakeup is automatically cleared following the clearing of the event input.
    • – When SRD domain wakeup with pending (EXTI_PMR = 1) is selected, the Wakeup needs to be cleared by a selected SRD domain pendclear source.
      A pending SRD domain wakeup signal can also be cleared by firmware by clearing the associated EXTI_SRDPMR register bit.
  5. 5. An SRD domain interrupt is generated after the SRD domain wakeup:
    • – Configurable event inputs generate a pulse on SRD domain interrupt.
    • – Direct event inputs activate the SRD domain interrupt until the event input is cleared in the peripheral.

20.5.5 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 shall be enabled by their respective procedure). Follow the steps below:

  1. 1. Enable the event input by setting at least one of the corresponding edge trigger bits in the EXTI_RTSR and/or EXTI_FTSR registers.
  2. 2. Unmask the software interrupt/event trigger by setting at least one of the corresponding mask bits in the EXTI_CPUIMR and/or EXTI_CPUEMR registers.
  3. 3. Trigger the software interrupt/event by writing 1 to the corresponding bit in the EXTI_SWIER register.
  4. 4. The event input can be disabled by clearing the EXTI_RTSR and EXTI_FTSR register bits.

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

A software trigger can be used to set the SRD pending request logic, keeping the SRD domain in Run until the SRD pending request logic is cleared.

20.6 EXTI registers

EXTI registers can only be accessed in 32-bit (word) mode. Byte or half-word formats are not allowed.

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.TR21TR20TR19TR18TR17TR16
rwrwrwrwrwrw
1514131211109876543210
TR15TR14TR13TR12TR11TR10TR9TR8TR7TR6TR5TR4TR3TR2TR1TR0
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

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

Bits 21:0 TR[21:0] : Rising trigger event configuration bit of configurable event input x (x= 21 to 0)

Note: 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 while writing to 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.TR21TR20TR19TR18TR17TR16
rwrwrwrwrwrw
1514131211109876543210
TR15TR14TR13TR12TR11TR10TR9TR8TR7TR6TR5TR4TR3TR2TR1TR0
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

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

Bits 21:0 TR[21:0] : Falling trigger event configuration bit of configurable event input x (x= 21 to 0)

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

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

Note: 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 while writing to 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.SWIER 21SWIER 20SWIER 19SWIER 18SWIER 17SWIER 16
rwrwrwrwrwrw
1514131211109876543210
SWIER 15SWIER 14SWIER 13SWIER 12SWIER 11SWIER 10SWIER 9SWIER 8SWIER 7SWIER 6SWIER 5SWIER 4SWIER 3SWIER 2SWIER 1SWIER 0
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

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

Bits 21:0 SWIER[21:0] : Software interrupt on line 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 will trigger an event on line x.

This bit is automatically cleared by hardware.

20.6.4 EXTI SRD pending mask register (EXTI_SRDPMR1)

Address offset: 0x0C

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.MR25Res.Res.Res.MR21MR20MR19Res.Res.Res.
rwrwrwrw
1514131211109876543210
MR15MR14MR13MR12MR11MR10MR9MR8MR7MR6MR5MR4MR3MR2MR1MR0
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

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

Bit 25 MR25 : SRD pending mask on event input x (x =25)

0: SRD pending request from line x is masked. Writing this bit to 0 also clears the SRD Pending request.

1: SRD pending request from line x is unmasked. When triggered, the SRD domain pending signal keeps SRD domain wakeup active until cleared.

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

Bits 21:19 MR[21:19] : SRD pending mask on event input x (x = 21 to 19)

0: SRD pending request from line x is masked. Writing this bit to 0 also clears the SRD pending request.

1: SRD pending request from line x is unmasked. When triggered, the SRD domain pending signal keeps SRD domain wakeup active until cleared.

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

Bits 15:0 MR[15:0] : SRD pending mask on event input x (x = 15 to 0)

0: SRD pending request from line x is masked. Writing this bit to 0 also clears the SRD pending request.

1: SRD pending request from line x is unmasked. When triggered, the SRD domain pending signal keeps SRD domain wakeup active until cleared.

20.6.5 EXTI SRD pending clear selection register low (EXTI_SRDPCR1L)

Address offset: 0x10

Reset value: 0x0000 0000

31302928272625242322212019181716
PCS15[1:0]PCS14[1:0]PCS13[1:0]PCS12[1:0]PCS11[1:0]PCS10[1:0]PCS9[1:0]PCS8[1:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
PCS7[1:0]PCS6[1:0]PCS5[1:0]PCS4[1:0]PCS3[1:0]PCS2[1:0]PCS1[1:0]PCS0[1:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:0 PCS[15:0][1:0] : SRD pending request clear input signal selection on event input x = truncate (n/2)

00: DMA channel 6 event selected as SRD domain pendclear source

01: DMA channel 7 event selected as SRD domain pendclear source

10: LPTIM2 out selected as SRD domain pendclear source

11: LPTIM3 out selected as SRD domain pendclear source

20.6.6 EXTI SRD pending clear selection register high (EXTI_SRDPCR1H)

Address offset: 0x14

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.PCS25[1:0]Res.Res.
rwrw
1514131211109876543210
Res.Res.Res.Res.PCS21[1:0]PCS20[1:0]PCS19[1:0]Res.Res.Res.Res.Res.Res.
rwrwrwrwrwrw

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

Bits 19:18 PCS25[1:0] : SRD pending request clear input signal selection on Event input x = truncate \( ((n+32)/2) \)

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

Bits 11:6 PCS[21:19][1:0] : SRD pending request clear input signal selection on Event input x = truncate \( ((n+32)/2) \)

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

20.6.7 EXTI rising trigger selection register (EXTI_RTSR2)

Address offset: 0x20

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.TR51Res.TR49Res.
rwrw
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.

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

Bit 19 TR51 : Rising trigger event configuration bit of configurable event input x+32 (x = 51)

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

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

Note: 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 while writing to 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.

Bit 18 Reserved, must be kept at reset value.

Bit 17 TR49 : Rising trigger event configuration bit of configurable event input x+32 (x = 49)

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

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

Note: 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 while writing to 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.

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

20.6.8 EXTI falling trigger selection register (EXTI_FTSR2)

Address offset: 0x24

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.TR51Res.TR49Res.
rwrw
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.

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

Bit 19 TR51 : Falling trigger event configuration bit of configurable event input x+32 (x = 51)

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

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

Note: 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 while writing to 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.

Bit 18 Reserved, must be kept at reset value.

Bit 17 TR49 : Falling trigger event configuration bit of configurable event input x+32 (x = 49)

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

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

Note: 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 while writing to 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.

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

20.6.9 EXTI software interrupt event register (EXTI_SWIER2)

Address offset: 0x28

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.SWIER
51
Res.SWIER
49
Res.
rwrw
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.

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

Bit 19 SWIER51 : Software interrupt on line x+32 (x = 51)

This bit always returns 0 when read.

0: Writing 0 has no effect.

1: Writing a 1 to this bit will trigger an event on line x. This bit is automatically cleared by hardware.

Bit 18 Reserved, must be kept at reset value.

Bit 17 SWIER49 : Software interrupt on line x+32 (x = 49)

This bit always returns 0 when read.

0: Writing 0 has no effect.

1: Writing a 1 to this bit will trigger an event on line x. This bit is automatically cleared by hardware.

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

20.6.10 EXTI SRD pending mask register (EXTI_SRDPMR2)

Address offset: 0x2C

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.MR51MR50MR49MR48
rwrwrwrw
1514131211109876543210
Res.Res.Res.Res.Res.Res.MR41Res.Res.Res.Res.Res.MR35MR34Res.Res.
rwrwrw

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

Bits 19:16 MR[51:48] : SRD pending mask on event input x+32 (x = 51 to 48)

0: SRD pending request from line x+32 is masked. Writing this bit to 0 also clears the SRD pending request.

1: SRD pending request from line x+32 is unmasked. When triggered, the SRD domain pending signal keeps SRD domain wakeup active until cleared.

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

Bit 9 MR41 : SRD pending mask on event input x+32 (x = 41)

0: SRD pending request from Line x+32 is masked. Writing this bit to 0 also clears the SRD Pending request.

1: SRD pending request from Line x+32 is unmasked. When triggered, the SRD domain pending signal keeps SRD domain wakeup active until cleared.

Bits 8:4 Reserved, must be kept at reset value.

Bits 3:2 MR[35:34] : SRD Pending Mask on Event input x+32 (x = 35 to 34)

0: SRD pending request from Line x+32 is masked. Writing this bit to 0 also clears the SRD Pending request.

1: SRD pending request from Line x+32 is unmasked. When triggered, the SRD domain pending signal keeps SRD domain wakeup active until cleared.

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

20.6.11 EXTI SRD pending clear selection register low (EXTI_SRDPCLR2L)

Address offset: 0x30

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.PCS41Res.Res.Res.
rwrw
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.PCS35PCS34Res.Res.Res.Res.Res.Res.
rwrwrwrw

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

Bits 19:18 PCS41[1:0] : SRD Pending request clear input signal selection on Event input x = truncate \( ((n+64)/2) \)

Bits 17:8 Reserved, must be kept at reset value.

Bits 7:4 PCS[35:34][1:0] : SRD Pending request clear input signal selection on Event input x= truncate \( ((n+64)/2) \)

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

20.6.12 EXTI SRD pending clear selection register high (EXTI_SRDPCTR2H)

Address offset: 0x34

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.PCS51PCS50PCS49PCS48
rwrwrwrwrwrwrwrw

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

Bits 7:0 PCS[51:48][1:0] : SRD Pending request clear input signal selection on Event input x= truncate \( ((n+96)/2) \)

20.6.13 EXTI rising trigger selection register (EXTI_RTSR3)

Address offset: 0x40

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.TR85Res.Res.TR82Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
rwrw

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

Bit 21 TR85 : Rising trigger event configuration bit of configurable event input x+64 (x = 85)

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

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

Note: 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 while writing to 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.

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

Bit 18 TR82 : Rising trigger event configuration bit of configurable event input x+64 (x = 82)

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

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

Note: 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 while writing to 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.

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

20.6.14 EXTI falling trigger selection register (EXTI_FTSR3)

Address offset: 0x44

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.TR85Res.Res.TR82Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
rwrw

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

Bit 21 TR[85] : Falling trigger event configuration bit of configurable event input x+64 (x = 85)

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

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

Note: 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 while writing to 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.

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

Bit 18 TR82 : Falling trigger event configuration bit of configurable event input x+64 (x = 82)

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

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

Note: 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 while writing to 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.

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

20.6.15 EXTI software interrupt event register (EXTI_SWIER3)

Address offset: 0x48

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.SWIER
85
Res.Res.SWIER
82
Res.Res.
rwrw
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.

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

Bit 21 SWIER85 : Software interrupt on line x+64 (x = 85)

This bitfield always returns 0 when read.

0: Writing 0 has no effect.

1: Writing a 1 to this bit will trigger an event on line x. This bit is automatically cleared by hardware.

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

Bit 18 SWIER82 : Software interrupt on line x+64 (x = 82)

This bitfield always returns 0 when read.

0: Writing 0 has no effect.

1: Writing a 1 to this bit will trigger an event on line x. This bit is automatically cleared by hardware.

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

20.6.16 EXTI SRD pending mask register (EXTI_SRDPMR3)

Address offset: 0x4C

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.MR88Res.Res.Res.Res.Res.Res.Res.Res.
rw
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.

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

Bit 24 MR88 : SRD pending mask on event input x+64 (x = 88)

0: SRD pending request from Line x+64 is masked. Writing this bit to 0 also clears the SRD pending request.

1: SRD Pending request from Line x+64 is unmasked. When triggered, the SRD domain pending signal keeps SRD domain wakeup active until cleared.

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

20.6.17 EXTI SRD pending clear selection register high (EXTI_SRDPCR3H)

Address offset: 0x54

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.PCS88
rwrw
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.

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

Bits 17:16 PCS88[1:0] : SRD pending request clear input signal selection on event input x= truncate \( ((n+160)/2) \)

00: DMA channel 6 event selected as SRD domain pendclear source

01: DMA channel 7 event selected as SRD domain pendclear source

10: LPTIM2 out selected as SRD domain pendclear source

11: LPTIM3 out selected as SRD domain pendclear source

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

20.6.18 EXTI interrupt mask register (EXTI_CPUIMR1)

Address offset: 0x80

Reset value: 0xFFC0 0000

31302928272625242322212019181716
MR31MR30MR29MR28MR27MR26MR25MR24MR23MR22MR21MR20MR19MR18MR17MR16
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

1514131211109876543210
MR15MR14MR13MR12MR11MR10MR9MR8MR7MR6MR5MR4MR3MR2MR1MR0
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:22 MR[31:22] : CPU interrupt mask on direct event input x (x = 31 to 22)

0: Interrupt request from Line x is masked

1: Interrupt request from Line x is unmasked

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

Bits 21:0 MR[21:0] : CPU interrupt mask on configurable event input x (x = 21 to 0)

0: Interrupt request from Line x is masked

1: Interrupt request from Line x is unmasked

Note: The reset value for configurable event inputs is set to 0 in order to disable the interrupt by default.

20.6.19 EXTI event mask register (EXTI_CPUEMR1)

Address offset: 0x84

Reset value: 0x0000 0000

31302928272625242322212019181716
MR31MR30MR29MR28MR27MR26MR25MR24MR23MR22MR21MR20MR19MR18MR17MR16
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

1514131211109876543210
MR15MR14MR13MR12MR11MR10MR9MR8MR7MR6MR5MR4MR3MR2MR1MR0
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:0 MR[31:0] : CPU event mask on event input x (x = 31 to 0)

0: Event request from Line x is masked

1: Event request from Line x is unmasked

20.6.20 EXTI pending register (EXTI_CPUPR1)

Address offset: 0x88

Reset value: undefined

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.PR21PR20PR19PR18PR17PR16
1514131211109876543210
PR15PR14PR13PR12PR11PR10PR9PR8PR7PR6PR5PR4PR3PR2PR1PR0
rc1rc1rc1rc1rc1rc1rc1rc1rc1rc1rc1rc1rc1rc1rc1rc1

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

Bits 21:0 PR[21:0] : Configurable event inputs x Pending bit (x = 21 to 0)

0: No trigger request occurred

1: selected trigger request occurred

This bit is set when the selected edge event is detected on the external interrupt line. This bit is cleared by writing 1 to the bit or by changing the edge detector sensitivity.

20.6.21 EXTI interrupt mask register (EXTI_CPUIMR2)

Address offset: 0x90

Reset value: 0xFFFF5 FFFF

31302928272625242322212019181716
MR63MR62MR61MR60MR59MR58MR57MR56MR55MR54MR53MR52MR51MR50MR49MR48
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
MR47Res.Res.Res.MR43MR42MR41MR40MR39MR38MR37MR36MR35MR34MR33MR32
rwrwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:20 MR[63:52] : CPU interrupt mask on direct event input x+32 (x = 63 to 52)

0: Interrupt request from Line x is masked

1: Interrupt request from Line x is unmasked

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

Bit 19 MR51 : CPU interrupt mask on configurable event input x+32 (x = 51)

0: Interrupt request from Line x is masked

1: Interrupt request from Line x is unmasked

Note: The reset value for configurable event inputs is set to 0 in order to disable the interrupt by default.

Bit 18 MR50 : CPU Interrupt mask on direct Event input x+32 (x = 50)

0: Interrupt request from Line x is masked

1: Interrupt request from Line x is unmasked

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

Bit 17 MR[49] : CPU interrupt mask on configurable event input x+32 (x = 49)

0: Interrupt request from Line x is masked

1: Interrupt request from Line x is unmasked

Note: The reset value for configurable event inputs is set to 0 in order to disable the interrupt by default.

Bits 16:15 MR[48:47] : CPU interrupt mask on direct event input x+32 (x = 47 to 46)

0: Interrupt request from Line x is masked

1: Interrupt request from Line x is unmasked

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

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

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

Bits 11:0 MR[43:32] : CPU Interrupt mask on direct event input x+32 (x = 43 to 32)

0: Interrupt request from Line x is masked

1: Interrupt request from Line x is unmasked

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

20.6.22 EXTI event mask register (EXTI_CPUEMR2)

Address offset: 0x94

Reset value: 0x0000 0000

31302928272625242322212019181716
MR63MR62MR61MR60MR59MR58MR57MR56MR55MR54MR53MR52MR51MR50MR49MR48
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
MR47Res.Res.Res.MR43MR42MR41MR40MR39MR38MR37MR36MR35MR34MR33MR32
rwrwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:15 MR[63:47] CPU event mask on event input x+32 (x = 63 to 47)

0: Event request from Line x is masked

1: Event request from Line x is unmasked

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

Bits 11:0 MR[43:32] : CPU event mask on event input x+32 (x = 43 to 32)

0: Event request from Line x is masked

1: Event request from Line x is unmasked

20.6.23 EXTI pending register (EXTI_CPUPR2)

Address offset: 0x98

Reset value: undefined

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.PR51Res.PR49Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
rc1rc1

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

Bit 19 PR51 : Configurable event inputs x+32 pending bit (x = 51)

0: No trigger request occurred

1: Selected trigger request occurred

This bit is set when the selected edge event is detected on the external interrupt line. This bit is cleared by writing a 1 to the bit or by changing the edge detector sensitivity.

Bit 18 Reserved, must be kept at reset value.

Bit 17 PR49 : Configurable event inputs x+32 pending bit (x = 49)

0: No trigger request occurred

1: selected trigger request occurred

This bit is set when the selected edge event is detected on the external interrupt line. This bit is cleared by writing a 1 to the bit or by changing the edge detector sensitivity.

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

20.6.24 EXTI interrupt mask register (EXTI_CPUIMR3)

Address offset: 0xA0

Reset value: 0x018B FFFF

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.MR88MR87Res.MR85Res.Res.MR82Res.MR80
1514131211109876543210
Res.Res.MR77Res.Res.MR74MR73MR72MR71MR70MR69MR68MR67MR66MR65MR64
rwrwrwrwrwrwrwrwrwrwrwrw

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

Bits 24:23 MR[88:87] : CPU interrupt mask on direct event input x+64 (x =88, 87)

0: Interrupt request from Line x is masked

1: Interrupt request from Line x is unmasked

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

Bit 22 Reserved, must be kept at reset value.

Bit 21 MR[85] : CPU interrupt mask on configurable event input x+64 (x = 85)

0: Interrupt request from Line x is masked

1: Interrupt request from Line x is unmasked

Note: The reset value for configurable event inputs is set to 0 in order to disable the interrupt by default.

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

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

Bit 18 MR82 : CPU interrupt mask on configurable event input x+64 (x =82)

0: Interrupt request from Line x is masked

1: Interrupt request from Line x is unmasked

Note: The reset value for configurable event inputs is set to 0 in order to disable the interrupt by default.

Bit 17 Reserved, must be kept at reset value.

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

Bit 16 MR[80] : CPU interrupt mask on direct event input x+64 (x = 80)

0: Interrupt request from Line x is masked

1: Interrupt request from Line x is unmasked

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

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

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

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

0: Interrupt request from Line x is masked

1: Interrupt request from Line x is unmasked

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

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

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

Bits 12:0 MR[74:54] : CPU interrupt mask on direct event input x+64 (x = 74 to 54)

0: Interrupt request from Line x is masked

1: Interrupt request from Line x is unmasked

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

20.6.25 EXTI event mask register (EXTI_CPUEMR3)

Address offset: 0xA4

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.MR88MR87Res.MR85Res.Res.MR82Res.MR80
rwrwrwrwrw
1514131211109876543210
Res.Res.MR77Res.Res.MR74MR73MR72MR71MR70MR69MR68MR67MR66MR65MR64
rwrwrwrwrwrwrwrwrwrwrwrw

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

Bits 24:23 MR[88:87] : CPU event mask on event input x+64 (x = 88, 87)

Bit 22 Reserved, must be kept at reset value.

Bit 21 MR85 : CPU event mask on event input x+64 (x = 85)

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

Bit 18 MR82 : CPU event mask on event input x+64 (x = 82)

Bit 17 Reserved, must be kept at reset value.

Bit 16 MR[80] : CPU event mask on event input x+64 (x = 80)

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

Bit 13 MR77 : CPU event mask on event input x+64 (x = 77)

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

Bits 10:0 MR[74:64] : CPU event mask on event input x+64 (x = 74 to 64)

20.6.26 EXTI pending register (EXTI_CPUPR3)

Address offset: 0xA8

Reset value: undefined

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.PR85Res.Res.PR82Res.Res.
rc1rc1
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.

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

Bit 21 PR[85] : Configurable event inputs x+64 pending bit (x = 85)

This bit is set when the selected edge event is detected on the external interrupt line. This bit is cleared by writing 1 to the bit or by changing the edge detector sensitivity.

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

Bit 18 PR82 : Configurable event inputs x+64 pending bit (x = 82)

This bit is set when the selected edge event is detected on the external interrupt line. This bit is cleared by writing 1 to the bit or by changing the edge detector sensitivity.

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

20.6.27 EXTI register map

The following table gives the EXTI register map and the reset values.

Table 130. Asynchronous interrupt/event controller register map and reset values

OffsetRegister name313029282726252423222120191817161514131211109876543210
0x00EXTI_RTSR1Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.TR[21:0]
0000000000000000000000
0x04EXTI_FTSR1Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.TR[21:0]
0000000000000000000000
0x08EXTI_SWIER1Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.SWIER[21:0]
0000000000000000000000
0x0CEXTI_SRDPMR1Res.Res.Res.Res.Res.Res.MR[25]Res.Res.Res.MR[21:19]Res.Res.Res.MR[15:0]
00000000000000000000

Table 130. Asynchronous interrupt/event controller register map and reset values (continued)

OffsetRegister name313029282726252423222120191817161514131211109876543210
0x10EXTI_SRDCPCR1LPCS[15]PCS[14]PCS[13]PCS[12]PCS[11]PCS[10]PCS[9]PCS[8]PCS[7]PCS[6]PCS[5]PCS[4]PCS[3]PCS[2]PCS[1]PCS[0]
Reset value00000000000000000000000000000000
0x14EXTI_SRDCPCR1HRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.PCS[25]Res.Res.Res.Res.Res.Res.Res.PCS[21]PCS[20]PCS[19]Res.Res.Res.Res.Res.Res.Res.Res.Res.
Reset value0000
0x20EXTI_RTSR2Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.TR[51]Res.TR[49]Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
Reset value00
0x24EXTI_FTSR2Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.TR[51]Res.TR[49]Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
Reset value00
0x28EXTI_SWIER2Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.SWIER[51]Res.SWIER[49]Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
Reset value00
0x2CEXTI_SRDPMR2Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.MR[51:48]Res.Res.Res.Res.Res.Res.MR[41]Res.Res.Res.Res.Res.MR[35]MR[34]Res.Res.
Reset value0000000
0x30EXTI_SRDCPCR2LRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.PCS[41]Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.PCS[35]PCS[34]Res.Res.Res.Res.
Reset value000
0x34EXTI_SRDCPCR2HRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.PCS[51]PCS[50]PCS[49]PCS[48]Res.Res.
Reset value000000
0x40EXTI_RTSR3Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.TR[85]Res.Res.TR[82]Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
Reset value00
0x44EXTI_FTSR3Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.TR[85]Res.Res.TR[82]Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
Reset value00
0x48EXTI_SWIER3Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.SWIER[85]Res.Res.SWIER[82]Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
Reset value00
0x4CEXTI_SRDPMR3Res.Res.Res.Res.Res.Res.Res.MR[88]Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
Reset value0
0x50ReservedRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
0x54EXTI_SRDCPCR3HRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.PCS[88]Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
Reset value00
0x58-0x7CReserved

Table 130. Asynchronous interrupt/event controller register map and reset values (continued)

OffsetRegister name313029282726252423222120191817161514131211109876543210
0x80EXTI_CPUIMR1MR[31:22]MR[21:0]
Reset value11111111110000000000000000000000
0x84EXTI_CPUEMR1MR[31:0]
Reset value00000000000000000000000000000000
0x88EXTI_CPUPR1Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.PR[21:0]
Reset value0000000000000000000000
0x90EXTI_CPUIMR2MR[63:47]Res.Res.Res.MR[43:32]
Reset value1111111111101011111111111111
0x94EXTI_CPUEMR2MR[63:47]Res.Res.Res.MR[43:32]
Reset value0000000000000000000000000000
0x98EXTI_CPUPR2Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.PR[51]Res.PR[49]Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
Reset value00
0xA0EXTI_CPUIMR3Res.Res.Res.Res.Res.Res.Res.MR[88]MR[87]Res.MR[85]Res.MR[82]Res.MR[80]Res.Res.Res.MR[77]Res.Res.MR[74:64]
Reset value1100111111111111
0xA4EXTI_CPUEMR3Res.Res.Res.Res.Res.Res.Res.MR[88]MR[87]Res.MR[85]Res.MR[82]Res.MR[80]Res.Res.Res.MR[77]Res.Res.MR[74:64]
Reset value0000000000000000
0xA8EXTI_CPUPR3Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.PR[85]Res.PR[82]Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
Reset value00
0xAC-0xBCReservedRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.

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