21. 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 Control, and generates interrupt requests to the CPU NVIC and to the D3 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.

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

21.1 EXTI main features

The EXTI main features are the following:

The asynchronous event inputs are classified in 2 groups:

21.2 EXTI block diagram

As shown in Figure 96 , 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, and their masking.

Figure 96. EXTI block diagram

Figure 96. EXTI block diagram. The diagram shows the internal structure of the EXTI block. On the left, 'Peripherals' are connected to the 'EXTI' block via 'Configurable event(x)' and 'Direct event(x)' inputs. The 'EXTI' block contains 'Registers', an 'Event Trigger', and a 'Masking' block. The 'Registers' are connected to an 'APB interface' and have bidirectional connections to the 'Event Trigger' and 'Masking' blocks. The 'Event Trigger' sends 'events' to the 'Masking' block. The 'Masking' block outputs various signals to external components: 'c1_it_exti_per(x)' and 'c1_event' to 'CPU1' (via 'nvic(n)' and 'rxev'); 'c2_it_exti_per(x)' and 'exti_event' to 'CPU2' (via 'nvic(n)' and 'rxev'); 'exti_c1_wkup', 'exti_c2_wkup', and 'exti_d3_wkup' to 'PWR'; and 'd3_it_exti_per(x)' and 'd3_pendclear_in[3:0]' to 'D3'. A reference code 'MS40540V3' is in the bottom right corner.
Figure 96. EXTI block diagram. The diagram shows the internal structure of the EXTI block. On the left, 'Peripherals' are connected to the 'EXTI' block via 'Configurable event(x)' and 'Direct event(x)' inputs. The 'EXTI' block contains 'Registers', an 'Event Trigger', and a 'Masking' block. The 'Registers' are connected to an 'APB interface' and have bidirectional connections to the 'Event Trigger' and 'Masking' blocks. The 'Event Trigger' sends 'events' to the 'Masking' block. The 'Masking' block outputs various signals to external components: 'c1_it_exti_per(x)' and 'c1_event' to 'CPU1' (via 'nvic(n)' and 'rxev'); 'c2_it_exti_per(x)' and 'exti_event' to 'CPU2' (via 'nvic(n)' and 'rxev'); 'exti_c1_wkup', 'exti_c2_wkup', and 'exti_d3_wkup' to 'PWR'; and 'd3_it_exti_per(x)' and 'd3_pendclear_in[3:0]' to 'D3'. A reference code 'MS40540V3' is in the bottom right corner.

21.2.1 EXTI connections between peripherals, CPU, and D3 domain

The peripherals able to generate wakeup events when the system is in Stop mode or a CPU is in CStop mode are connected to an EXTI Configurable event input or Direct Event input:

The Event inputs able to wakeup D3 for autonomous Run mode are provided with a D3 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(n) interrupts are connected to their respective CPU(n) NVIC, and, similarly, the CPU(n) event is connected to the CPU(n) rxev input.

The EXTI Wakeup signals are connected to the PWR block, and are used to wakeup the D3 domain and/or the CPU(n).

The D3 domain interrupts allow the system to trigger events for D3 domain autonomous Run mode operation.

21.3 EXTI functional description

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

Table 150. EXTI Event input configurations and register control (1)

Event input typeWakeup target(s)Logic implementationEXTI_RTSREXTI_FTSREXTI_SWIEREXTI_CnIMREXTI_CnEMREXTI_D3PMR
ConfigurableCPU(n) (2)Configurable event input, CPU wakeup logicXXXXX-
Any (3)Configurable event input, Any wakeup logicX
DirectCPU(n) (2)Direct event input, CPU wakeup logic---XX-
Any (3)Direct event input, Any wakeup logicX

1. X indicates that functionality is available.

2. Waking-up CPU1 and/or CPU2.

3. Waking-up D3 domain for autonomous Run mode, and/or CPU1, and/or CPU2.

21.3.1 EXTI Configurable event input CPU wakeup

Figure 98 is a detailed representation of the logic associated with Configurable Event inputs which will always wake up a CPU(n).

Figure 97. Configurable event triggering logic CPU wakeup

Figure 97: Configurable event triggering logic CPU wakeup. This block diagram shows the internal logic of the EXTI. 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(n) Event mask register', 'CPU(n) Interrupt mask register', and 'CPU(n) Pending request register'. A 'Configurable Event input(x)' enters from the left and is processed through an 'Asynchronous edge detection circuit' (with 'rst' input) and a 'CPU(n) Rising Edge detect Pulse generator' (with 'ck_folk_c(n)' clock input). The logic for each CPU is duplicated. It includes OR gates for software and hardware events, AND gates for mask registers, and OR gates for pending requests. The final logic for CPU(n) wakeup is shown at the bottom, combining 'CPU(n)Wakeup(x)', 'Other CPU(n)Wakeups', 'D3 Wakeup(x)', and 'Other D3 Wakeups' through a 'Synch' block (with 'ck_sys' clock input) to produce the output 'd3_wakeup c(n)_wakeup'. Other outputs include 'c(n)_it_exti_per(x)', 'c(n)_event', and 'CPU(n)Event(x)'.
Figure 97: Configurable event triggering logic CPU wakeup. This block diagram shows the internal logic of the EXTI. 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(n) Event mask register', 'CPU(n) Interrupt mask register', and 'CPU(n) Pending request register'. A 'Configurable Event input(x)' enters from the left and is processed through an 'Asynchronous edge detection circuit' (with 'rst' input) and a 'CPU(n) Rising Edge detect Pulse generator' (with 'ck_folk_c(n)' clock input). The logic for each CPU is duplicated. It includes OR gates for software and hardware events, AND gates for mask registers, and OR gates for pending requests. The final logic for CPU(n) wakeup is shown at the bottom, combining 'CPU(n)Wakeup(x)', 'Other CPU(n)Wakeups', 'D3 Wakeup(x)', and 'Other D3 Wakeups' through a 'Synch' block (with 'ck_sys' clock input) to produce the output 'd3_wakeup c(n)_wakeup'. Other outputs include 'c(n)_it_exti_per(x)', 'c(n)_event', and 'CPU(n)Event(x)'.

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.

Each CPU has its dedicated interrupt mask register, namely EXTI interrupt mask register (EXTI_CnIMR1) and EXTI interrupt mask register (EXTI_CnIMR2) , EXTI interrupt mask register (EXTI_CnIMR3) , and EXTI pending register (EXTI_CnPR1) , EXTI pending register (EXTI_CnPR2) , EXTI pending register (EXTI_CnPR3) for Configurable events pending request registers. The CPU pending register will only be set for an unmasked CPU(n) interrupt. Each event provides a individual CPU(n) interrupt to the CPU(n) NVIC. The Configurable events interrupts need to be acknowledged by software in the EXTI_CnPR register.

Each CPU has dedicated event mask registers, i.e. EXTI event mask register (EXTI_CnEMR1) , EXTI event mask register (EXTI_CnEMR2) , and EXTI event mask register (EXTI_CnEMR3) . The enabled event then generates an event on a CPU. All events for a CPU are OR-ed together into a single CPU CPU(n) event signal. The CPU Pending register (EXTI_CnPR) will not be set for an unmasked CPU event.

When a CPU(n) interrupt or CPU(n) 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(n) clock is woken up before the Asynchronous edge detection circuit is reset.

Note: A detected Configurable event, enabled by CPU(n), is only cleared when CPU(n) wakes up. When the CPU(n) is kept in hold (see Section 7: Power control (PWR)), the detected Configurable event will not be cleared and the system will be kept in Run mode. To clear the detected Configurable event the other CPU shall release the CPU(n) from hold.

21.3.2 EXTI configurable event input Any wakeup

Figure 98 is a detailed representation of the logic associated with Configurable Event inputs that can wakeup D3 domain for autonomous Run mode and/or CPU(n) (“Any” target). It provides the same functionality as the Configurable event input CPU wakeup, with additional functionality to wake up the D3 domain independently.

When all CPU(n) interrupts and CPU(n) events are disabled, the Asynchronous edge detection circuit is reset by the D3 domain clocked Delay and Rising edge detect pulse generator. This guarantees that the D3 domain clock is woken up before the Asynchronous edge detection circuit is reset.

Table 151. Configurable Event input Asynchronous Edge detector reset

EXTI_C1IMREXTI_C1EMREXTI_C2IMREXTI_C2EMRAsynchronous Edge detector reset by
Both = 0Both = 0D3 domain clock rising edge detect pulse generator
At least one = 1Both = 0CPU1 clock rising edge detect pulse generator
Both = 0At least one = 1CPU2 clock rising edge detect pulse generator
At least one = 1At least one = 1CPU1 clock rising edge detect pulse generator
OR-ed (1) with
CPU2 clock rising edge detect pulse generator
  1. 1. The first rising edge detect pulse generator will reset the Asynchronous Edge detection circuit. A new Configurable Event input edge for both CPUs will only be detected after the last rising edge detect pulse generator has completed. A Configurable Event input edge arriving between the detection of the first and the last rising edge detect pulse generator detection will only signal a new event to the first CPU.

Figure 98. Configurable event triggering logic Any wakeup

Figure 98: Configurable event triggering logic Any wakeup. This block diagram shows the internal logic of the EXTI. At the top, a 'Peripheral interface' block connects to an 'APB interface' on the left and to several registers: 'Software interrupt event register', 'Falling trigger selection register', 'Rising trigger selection register', 'CPU(n) Event mask register', 'CPU(n) Interrupt mask register', 'CPU(n) Pending request register', and 'D3 Pending mask register'. A 'Configurable Event input(x)' enters from the left and is processed by an 'Asynchronous edge detection circuit' which has a 'rst' input. This circuit's output goes to a 'Delay' block and a 'CPU(n) Rising Edge detect Pulse generator'. The pulse generator is controlled by 'ck_fclk_c(n)' and its output goes to an AND gate. The AND gate also takes inputs from the 'CPU(n) Event mask register' and the 'CPU(n) Interrupt mask register'. The output of this AND gate goes to an OR gate labeled 'CPU(n)Event(x)'. Below the pulse generator, another 'Delay' block and 'D3 Domain Rising Edge detect Pulse generator' are shown, controlled by 'ck_fclk_d3'. Their output goes to a 'D3 Pending request' block, which also receives input from the 'D3 Pending mask register'. The 'D3 Pending request' block's output goes to an OR gate labeled 'D3 Wakeup(x)'. At the bottom, a 'Synch' block receives inputs from 'CPU(n)Wakeup(x)' and 'D3 Wakeup(x)' and is controlled by 'ck_sys'. The 'Synch' block's output goes to an OR gate labeled 'Other CPU(n)Wakeups' and 'Other D3 Wakeups'. The final output 'd3_wakeup c(n)_wakeup' is the output of this OR gate. A legend indicates that logic blocks shaded in gray are 'Logic duplicated for each CPU'. The diagram is labeled 'EXTI' at the bottom left and 'MS40537V1' at the bottom right.
Figure 98: Configurable event triggering logic Any wakeup. This block diagram shows the internal logic of the EXTI. At the top, a 'Peripheral interface' block connects to an 'APB interface' on the left and to several registers: 'Software interrupt event register', 'Falling trigger selection register', 'Rising trigger selection register', 'CPU(n) Event mask register', 'CPU(n) Interrupt mask register', 'CPU(n) Pending request register', and 'D3 Pending mask register'. A 'Configurable Event input(x)' enters from the left and is processed by an 'Asynchronous edge detection circuit' which has a 'rst' input. This circuit's output goes to a 'Delay' block and a 'CPU(n) Rising Edge detect Pulse generator'. The pulse generator is controlled by 'ck_fclk_c(n)' and its output goes to an AND gate. The AND gate also takes inputs from the 'CPU(n) Event mask register' and the 'CPU(n) Interrupt mask register'. The output of this AND gate goes to an OR gate labeled 'CPU(n)Event(x)'. Below the pulse generator, another 'Delay' block and 'D3 Domain Rising Edge detect Pulse generator' are shown, controlled by 'ck_fclk_d3'. Their output goes to a 'D3 Pending request' block, which also receives input from the 'D3 Pending mask register'. The 'D3 Pending request' block's output goes to an OR gate labeled 'D3 Wakeup(x)'. At the bottom, a 'Synch' block receives inputs from 'CPU(n)Wakeup(x)' and 'D3 Wakeup(x)' and is controlled by 'ck_sys'. The 'Synch' block's output goes to an OR gate labeled 'Other CPU(n)Wakeups' and 'Other D3 Wakeups'. The final output 'd3_wakeup c(n)_wakeup' is the output of this OR gate. A legend indicates that logic blocks shaded in gray are 'Logic duplicated for each CPU'. The diagram is labeled 'EXTI' at the bottom left and 'MS40537V1' at the bottom right.

The event triggering logic for “Any” target has additional D3 Pending mask register EXTI D3 pending mask register (EXTI_D3PMR1) , EXTI D3 pending mask register (EXTI_D3PMR2) , EXTI D3 pending mask register (EXTI_D3PMR3) and D3 Pending request logic. The D3 Pending request logic will only be set for unmasked D3 Pending events. The D3 Pending request logic keeps the D3 domain in Run mode until the D3 Pending request logic is cleared by the selected D3 domain pendclear source.

21.3.3 EXTI direct event input CPU wakeup

Figure 99 is a detailed representation of the logic associated with Direct Event inputs waking up a CPU(n).

Direct events only provide CPU(n) interrupt enable and CPU(n) event enable functionality.

Note: Direct events are cleared in the peripheral generating the event. When a Direct event input enabled by CPU(n) is cleared by the other CPU before the CPU(n) clock is running, (i.e. when CPU(n) is kept in hold, see Section 7: Power control (PWR) ), the CPU(n) will no longer receive neither a CPU(n) interrupt nor a CPU(n) event, and will not wakeup. However the system will stay in Run mode, generating the CPU(n) clock. For this reason CPU(n) Direct events shall not be cleared by the other CPU.

Figure 99. Direct event triggering logic CPU Wakeup

Block diagram of Direct event triggering logic CPU Wakeup showing signal flow from Direct Event input(x) through various detection circuits and logic gates to CPU(n) registers and external outputs like c(n)_event and d3_wakeup.

The diagram illustrates 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 two registers: 'CPU(n) Event mask register' and 'CPU(n) Interrupt mask register'. The 'Direct Event input(x)' enters from the left and is processed by two parallel paths: an 'Asynchronous Rising edge detection circuit rst' and a 'Falling edge detect Pulse generator'. Both are clocked by 'ck_sys'. The rising edge path includes a 'Delay' and an AND gate, followed by a 'Synch' block clocked by 'ck_fclk_c(n)^(1)'. The falling edge path includes a 'Pulse generator' clocked by 'ck_sys'. These signals are combined with outputs from 'CPU(n) Rising Edge detect Pulse generator' (clocked by 'ck_fclk_c(n)') and 'CPU(n) Interrupt mask register' via an AND gate. The result is ORed with 'Other CPU(n)Events' to produce 'c(n)_event' and 'c(n)_it_exti_per(x)'. Another path combines signals from the 'Falling edge detect Pulse generator' and 'CPU(n) Rising Edge detect Pulse generator' via an OR gate, then an AND gate with 'CPU(n) Event mask register' output. This is ORed with 'Other CPU(n)Wakeups' and 'D3 Wakeup(x)' to produce 'd3_wakeup' and 'c(n)_wakeups'. A 'Synch' block clocked by 'ck_sys' is used for the wakeup signals. A legend indicates that logic blocks with a grey square are 'Logic duplicated for each CPU'. The entire section is labeled 'EXTI' and the diagram code 'MS40538V2' is in the bottom right.

Block diagram of Direct event triggering logic CPU Wakeup showing signal flow from Direct Event input(x) through various detection circuits and logic gates to CPU(n) registers and external outputs like c(n)_event and d3_wakeup.
  1. 1. The CPU(n) interrupt for asynchronous Direct Event inputs (peripheral Wakeup signals) is synchronized with the CPU(n) clock. The synchronous Direct Event inputs (peripheral interrupt signals), after the asynchronous edge detection, are directly sent to the CPU(n) interrupt without resynchronization.

21.3.4 EXTI direct event input Any wakeup

Figure 100 is a detailed representation of the logic associated with Direct Event inputs waking up D3 domain for autonomous Run mode and/or CPU(n), (“Any” target). It provides the same functionality as the Direct event input CPU wakeup, plus additional functionality to wakeup the D3 domain independently.

Figure 100. Direct event triggering logic Any Wakeup

Figure 100. Direct event triggering logic Any Wakeup. This block diagram shows the internal logic of the EXTI for direct event inputs. At the top, a 'Peripheral interface' block is connected to an 'APB interface'. Below it, a 'Logic duplicated for each CPU' block contains three registers: 'CPU(n) Event mask register', 'CPU(n) Interrupt mask register', and 'D3 Pending mask register'. These registers are connected to a series of AND and OR gates. The 'Direct Event input(x)' enters from the left and is processed by an 'Asynchronous Rising edge detection circuit rst' and a 'Failing edge detect Pulse generator'. The rising edge detection output is synchronized with 'ck_fclk_d3(1)' and 'ck_fclk_c(n)(1)' clocks through 'Synch' blocks. The failing edge detection output is synchronized with 'ck_sys'. The logic combines these signals with the register outputs to generate 'CPU(n)Event(x)', 'Other CPU(n)Events', 'd3_pending', 'CPU(n)Wakeups', 'Other CPU(n)Wakeups', 'D3 Wakeup(x)', and 'Other D3 Wakeups'. These signals are then processed through further logic and synchronization to produce the final output signals: 'd3_pendclear(x)', 'c(n)_it_exti_per(x)', 'c(n)_event', 'd3_it_exti_per(x)', 'c(n)_wakeup', and 'd3_wakeup'. The entire logic block is labeled 'EXTI' at the bottom left and 'MS40542V2' at the bottom right.
Figure 100. Direct event triggering logic Any Wakeup. This block diagram shows the internal logic of the EXTI for direct event inputs. At the top, a 'Peripheral interface' block is connected to an 'APB interface'. Below it, a 'Logic duplicated for each CPU' block contains three registers: 'CPU(n) Event mask register', 'CPU(n) Interrupt mask register', and 'D3 Pending mask register'. These registers are connected to a series of AND and OR gates. The 'Direct Event input(x)' enters from the left and is processed by an 'Asynchronous Rising edge detection circuit rst' and a 'Failing edge detect Pulse generator'. The rising edge detection output is synchronized with 'ck_fclk_d3(1)' and 'ck_fclk_c(n)(1)' clocks through 'Synch' blocks. The failing edge detection output is synchronized with 'ck_sys'. The logic combines these signals with the register outputs to generate 'CPU(n)Event(x)', 'Other CPU(n)Events', 'd3_pending', 'CPU(n)Wakeups', 'Other CPU(n)Wakeups', 'D3 Wakeup(x)', and 'Other D3 Wakeups'. These signals are then processed through further logic and synchronization to produce the final output signals: 'd3_pendclear(x)', 'c(n)_it_exti_per(x)', 'c(n)_event', 'd3_it_exti_per(x)', 'c(n)_wakeup', and 'd3_wakeup'. The entire logic block is labeled 'EXTI' at the bottom left and 'MS40542V2' at the bottom right.
  1. 1. The CPU(n) interrupt and D3 domain interrupt for asynchronous Direct Event inputs (peripheral Wakeup signals) are synchronized, respectively, with the CPU(n) clock and the D3 domain clock. The synchronous Direct Event inputs (peripheral interrupt signals), after the asynchronous edge detection, are directly sent to the CPU(n) interrupt and the D3 domain interrupt without resynchronization in the EXTI.

21.3.5 EXTI D3 pending request clear selection

Event inputs able to wake up D3 domain for autonomous Run mode have D3 Pending request logic that can be cleared by the selected D3 pendclear source. For each D3 Pending request a D3 domain pendclear source can be selected from four different inputs.

Figure 101 is a detailed representation of the logic selecting the D3 pendclear source.

Block diagram of D3 domain Pending request clear logic. It shows an APB interface connected to a Peripheral interface, which is connected to a D3 pending clear selection register. The register is connected to a multiplexer that selects from four inputs: d3_pendclear_in[0] (DMA_ch6_evt), d3_pendclear_in[1] (DMA_ch7_evt), d3_pendclear_in[2] (LPTIM4 out), and d3_pendclear_in[3] (LPTIM5 out). The multiplexer output is connected to a D3 pending request block within an EXTI block. The D3 pending request block is also connected to an Event(x) block. The diagram is labeled MS40541V2.

Figure 101. D3 domain Pending request clear logic

Block diagram of D3 domain Pending request clear logic. It shows an APB interface connected to a Peripheral interface, which is connected to a D3 pending clear selection register. The register is connected to a multiplexer that selects from four inputs: d3_pendclear_in[0] (DMA_ch6_evt), d3_pendclear_in[1] (DMA_ch7_evt), d3_pendclear_in[2] (LPTIM4 out), and d3_pendclear_in[3] (LPTIM5 out). The multiplexer output is connected to a D3 pending request block within an EXTI block. The D3 pending request block is also connected to an Event(x) block. The diagram is labeled MS40541V2.

The D3 Pending request clear selection registers EXTI D3 pending clear selection register low (EXTI_D3PCR1L) , EXTI D3 pending clear selection register high (EXTI_D3PCR1H) , EXTI D3 pending clear selection register low (EXTI_D3PCR2L) , EXTI D3 pending clear selection register high (EXTI_D3PCR2H) , EXTI D3 pending clear selection register low (EXTI_D3PCR3L) and EXTI D3 pending clear selection register high (EXTI_D3PCR3H) allow the system to select the source to reset the D3 Pending request.

21.4 EXTI event input mapping

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

The wakeup capabilities of each Event input are detailed in Table 152 . An Event input can either wake up CPU1, CPU2 or both, and in the case of “Any” can also wake up D3 domain for autonomous Run mode.

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 152. EXTI Event input mapping

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

Table 152. EXTI Event input mapping (continued)

Event inputSourceEvent input typeWakeup target(s)Connection to NVIC
49LPTIM2 outputConfigurableAnyNo (3)
50LPTIM3 wakeupDirectAnyYes
51LPTIM3 outputConfigurableAnyNo (3)
52LPTIM4 wakeupDirectAnyYes
53LPTIM5 wakeupDirectAnyYes
54SWPMI wakeupDirectCPU1 or CPU2Yes
55 (4)WKUP1DirectCPU1 or CPU2Yes
56 (4)WKUP2DirectCPU1 or CPU2Yes
57 (4)WKUP3DirectCPU1 or CPU2Yes
58 (4)WKUP4DirectCPU1 or CPU2Yes
59 (4)WKUP5DirectCPU1 or CPU2Yes
60 (4)WKUP6DirectCPU1 or CPU2Yes
61RCC interruptDirectCPU1 or CPU2No (5)
62I2C4 Event interruptDirectCPU1 or CPU2No (5)
63I2C4 Error interruptDirectCPU1 or CPU2No (5)
64LPUART1 global InterruptDirectCPU1 or CPU2No (5)
65SPI6 interruptDirectCPU1 or CPU2No (5)
66BDMA CH0 interruptDirectCPU1 or CPU2No (5)
67BDMA CH1 interruptDirectCPU1 or CPU2No (5)
68BDMA CH2 interruptDirectCPU1 or CPU2No (5)
69BDMA CH3 interruptDirectCPU1 or CPU2No (5)
70BDMA CH4 interruptDirectCPU1 or CPU2No (5)
71BDMA CH5 interruptDirectCPU1 or CPU2No (5)
72BDMA CH6 interruptDirectCPU1 or CPU2No (5)
73BDMA CH7 interruptDirectCPU1 or CPU2No (5)
74DMAMUX2 interruptDirectCPU1 or CPU2No (5)
75ADC3 interruptDirectCPU1 or CPU2No (5)
76SAI4 interruptDirectCPU1 or CPU2No (5)
77HSEM0 interruptDirectCPU1 onlyNo (5)
78HSEM1 interruptDirectCPU2 onlyNo (5)
79CortexM4 SEV interruptDirectCPU1 onlyNo (3)
80CortexM7 SEV interrupt (6)DirectCPU2 onlyNo (3)
81Reserved---
82WWDG1 resetConfigurableCPU2 onlyYes
83Reserved---

Table 152. EXTI Event input mapping (continued)

Event inputSourceEvent input typeWakeup target(s)Connection to NVIC
84WWDG2 resetConfigurableCPU1 onlyYes
85HDMI-CEC wakeupConfigurableCPU1 or CPU2Yes
86ETHERNET wakeupConfigurableCPU1 or CPU2Yes
87HSECSS interruptDirectCPU1 or CPU2No (5)
88Reserved---
  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
  6. 6. Event duration is equal to 512 clock cycles.

21.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.

When in Stop mode an event will always wake up the D3 domain. In system Run and Stop modes an event will always generate an associated D3 domain interrupt. An event will only wake up a CPU when the event associated CPU interrupt is unmasked and/or the CPU event is unmasked.

Table 153. Masking functionality

CPU(n)Configurable event inputs PRx bits of EXTI_CnPRCPU(n)D3 domain wakeup
Interrupt enable MRx bits of EXTI_CnIMREvent enable MRx bits of EXTI_CnEMRInterruptEventWakeup
00NoMaskedMaskedMaskedYes (1) / Masked (2)
01NoMaskedYesYesYes
10Status latchedYesMaskedYesYes
11Status latchedYesYesYesYes
  1. 1. Only for Event inputs that allow the system to wakeup D3 domain for autonomous Run mode (Any target).
  2. 2. For Event inputs that will always wake up CPU(n).

For Configurable event inputs, when the enabled edge(s) occur on the event input, an event request is generated. When the associated CPU(n) interrupt is unmasked, the corresponding pending PRx bit in EXTI_CnPR is set and the CPU(n) interrupt signal is activated. EXTI_CnPR PRx pending bit shall be cleared by software writing it to '1'. This will clear the CPU(n) 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(n) pending bit. When the

associated CPU(n) interrupt is unmasked the corresponding CPU(n) interrupt signal is activated.

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

Both a CPU(n) interrupt and a CPU(n) event may be enabled on the same Event input. They will 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.

Whenever an Event input is enabled and a CPU(n) interrupt and/or CPU(n) event is unmasked, the Event input will also generate a D3 domain wakeup next to the CPU(n) wakeup.

Some Event inputs are able to wakeup the D3 domain autonomous Run mode, in this case the CPU(n) interrupt and CPU(n) event are masked, preventing the CPU(n) to be woken up. Two D3 domain autonomous Run mode wakeup mechanisms are supported:

21.5.1 EXTI CPU interrupt procedure

21.5.2 EXTI CPU event procedure

21.5.3 EXTI CPU wakeup procedure

21.5.4 EXTI D3 domain wakeup for autonomous Run mode procedure

21.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(n) interrupt and/or CPU(n) event shall be enabled by their respective procedure).

Note: An edge on the Configurable event input will also trigger an interrupt/event.

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

21.6 EXTI registers

Every register can only be accessed with 32-bit (word). A byte or half-word cannot be read or written.

21.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 TRx : 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 will not be set.
    Rising and falling edge triggers can be set for the same Configurable Event input. In this case, both edges generate a trigger.

21.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 TRx : 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 will not be set.
    Rising and falling edge triggers can be set for the same Configurable Event input. In this case, both edges generate a trigger.

21.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 SWIERx : Software interrupt on line x

Will always return 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 auto cleared by HW.

21.6.4 EXTI D3 pending mask register (EXTI_D3PMR1)

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 MRx : D3 Pending Mask on Event input x

0: D3 Pending request from Line x is masked. Writing this bit to 0 will also clear the D3 Pending request.

1: D3 Pending request from Line x is unmasked. The D3 domain pending signal when triggered will keep D3 domain wakeup active until cleared.

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

Bits 21:19 MRx : D3 Pending Mask on Event input x

0: D3 Pending request from Line x is masked. Writing this bit to 0 will also clear the D3 Pending request.

1: D3 Pending request from Line x is unmasked. The D3 domain pending signal when triggered will keep D3 domain wakeup active until cleared.

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

Bits 15:0 MRx : D3 Pending Mask on Event input x

0: D3 Pending request from Line x is masked. Writing this bit to 0 will also clear the D3 Pending request.

1: D3 Pending request from Line x is unmasked. The D3 domain pending signal when triggered will keep D3 domain wakeup active until cleared.

21.6.5 EXTI D3 pending clear selection register low (EXTI_D3PCR1L)

Address offset: 0x10

Reset value: 0x0000 0000

31302928272625242322212019181716
PCS15PCS14PCS13PCS12PCS11PCS10PCS9PCS8
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
PCS7PCS6PCS5PCS4PCS3PCS2PCS1PCS0
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:0 PCSx : D3 Pending request clear input signal selection on Event input x = truncate (n/2)

00: DMA ch6 event selected as D3 domain pendclear source

01: DMA ch7 event selected as D3 domain pendclear source

10: LPTIM4 out selected as D3 domain pendclear source

11: LPTIM5 out selected as D3 domain pendclear source

21.6.6 EXTI D3 pending clear selection register high (EXTI_D3PCR1H)

Address offset: 0x14

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.PCS25Res.Res.
rwrw
1514131211109876543210
Res.Res.Res.Res.PCS21PCS20PCS19Res.Res.Res.Res.Res.Res.
rwrwrwrwrwrw

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

Bits 19:18 PCSx : D3 Pending request clear input signal selection on Event input x = truncate ((n+32)/2)

00: DMA ch6 event selected as D3 domain pendclear source

01: DMA ch7 event selected as D3 domain pendclear source

10: LPTIM4 out selected as D3 domain pendclear source

11: LPTIM5 out selected as D3 domain pendclear source

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

Bits 11:6 PCSx : D3 Pending request clear input signal selection on Event input x = truncate ((n+32)/2)

00: DMA ch6 event selected as D3 domain pendclear source

01: DMA ch7 event selected as D3 domain pendclear source

10: LPTIM4 out selected as D3 domain pendclear source

11: LPTIM5 out selected as D3 domain pendclear source

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

21.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 TRx : 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 TRx : 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: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 will not be set.
    Rising and falling edge triggers can be set for the same Configurable Event input. In this case, both edges generate a trigger.

21.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 TRx : Falling trigger event configuration bit of Configurable Event input x+32. (1)

Bit 18 Reserved, must be kept at reset value.

Bit 17 TRx : Falling trigger event configuration bit of Configurable Event input x+32. (1)

Bits 16: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 will not be set.
    Rising and falling edge triggers can be set for the same Configurable Event input. In this case, both edges generate a trigger.

21.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 51Res.SWIER 49Res.
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 SWIERx : Software interrupt on line x+32
Will always return 0 when read.

Bit 18 Reserved, must be kept at reset value.

Bit 17 SWIERx : Software interrupt on line x+32

Will always return 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 auto cleared by HW.

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

21.6.10 EXTI D3 pending mask register (EXTI_D3PMR2)

Address offset: 0x2C

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.MR53MR52MR51MR50MR49MR48
rwrwrwrwrwrw
1514131211109876543210
Res.Res.Res.Res.Res.Res.MR41Res.Res.Res.Res.Res.MR35MR34Res.Res.
rwrwrw

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

Bits 21:16 MRx : D3 Pending Mask on Event input x+32

0: D3 Pending request from Line x+32 is masked. Writing this bit to 0 will also clear the D3 Pending request.

1: D3 Pending request from Line x+32 is unmasked. The D3 domain pending signal when triggered will keep D3 domain wakeup active until cleared.

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

Bit 9 MRx : D3 Pending Mask on Event input x+32

0: D3 Pending request from Line x+32 is masked. Writing this bit to 0 will also clear the D3 Pending request.

1: D3 Pending request from Line x+32 is unmasked. The D3 domain pending signal when triggered will keep D3 domain wakeup active until cleared.

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

Bits 3:2 MRx : D3 Pending Mask on Event input x+32

0: D3 Pending request from Line x+32 is masked. Writing this bit to 0 will also clear the D3 Pending request.

1: D3 Pending request from Line x+32 is unmasked. The D3 domain pending signal when triggered will keep D3 domain wakeup active until cleared.

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

21.6.11 EXTI D3 pending clear selection register low (EXTI_D3PCR2L)

Address offset: 0x30
Reset value: 0x0000 0000

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

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

Bits 19:18 PCSx : D3 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 PCSx : D3 Pending request clear input signal selection on Event input x= truncate ((n+64)/2)

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

21.6.12 EXTI D3 pending clear selection register high (EXTI_D3PCR2H)

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.PCS53PCS52PCS51PCS50PCS49PCS48
rwrwrwrwrwrwrwrwrwrwrwrw

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

Bits 11:0 PCSx : D3 Pending request clear input signal selection on Event input x= truncate ((n+96)/2)

21.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.TR86TR85TR84Res.TR82Res.Res.
r/wr/wr/wr/w
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.

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

Bits 22:20 TRx : Rising trigger event configuration bit of Configurable Event input x+64. (1)

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

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

Bit 19 Reserved, must be kept at reset value.

Bit 18 TRx : Rising trigger event configuration bit of Configurable Event input x+64. (1)

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

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

Bits 17: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 will not be set.
    Rising and falling edge triggers can be set for the same Configurable Event input. In this case, both edges generate a trigger.

21.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.TR86TR85TR84Res.TR82Res.Res.
r/wr/wr/wr/w
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.

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

Bits 22:20 TRx : Falling trigger event configuration bit of Configurable Event input x+64. (1)

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

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

Bit 19 Reserved, must be kept at reset value.

Bit 18 TRx : Falling trigger event configuration bit of Configurable Event input x+64. (1)

0: Falling trigger disabled (for Event and Interrupt) for input line
1: Falling trigger enabled (for Event and Interrupt) for input line

Bits 17: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 will not be set.
    Rising and falling edge triggers can be set for the same Configurable Event input. In this case, both edges generate a trigger.

21.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.SWIER 86SWIER 85SWIER 84Res.SWIER 82Res.Res.
rwrwrwrw
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.

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

Bits 22:20 SWIERx : Software interrupt on line x+64
Will always return 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 auto cleared by HW.

Bit 19 Reserved, must be kept at reset value.

Bit 18 SWIERx : Software interrupt on line x+64
Will always return 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 auto cleared by HW.

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

21.6.16 EXTI D3 pending mask register (EXTI_D3PMR3)

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 MRx : D3 Pending Mask on Event input x+64

0: D3 Pending request from Line x+64 is masked. Writing this bit to 0 will also clear the D3 Pending request.

1: D3 Pending request from Line x+64 is unmasked. The D3 domain pending signal when triggered will keep D3 domain wakeup active until cleared.

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

21.6.17 EXTI D3 pending clear selection register low (EXTI_D3PCR3L)

Address offset: 0x50

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.Res.Res.Res.Res.Res.Res.Res.Res.

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

21.6.18 EXTI D3 pending clear selection register high (EXTI_D3PCR3H)

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 PCSx : D3 Pending request clear input signal selection on Event input x= truncate \( ((n+160)/2) \)

00: DMA ch6 event selected as D3 domain pendclear source

01: DMA ch7 event selected as D3 domain pendclear source

10: LPTIM4 out selected as D3 domain pendclear source

11: LPTIM5 out selected as D3 domain pendclear source

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

21.6.19 EXTI interrupt mask register (EXTI_CnIMR1)

Address offset: 0x80 (EXTI_C1IMR1), 0xC0 (EXTI_C2IMR1)

Reset value: 0xFFC0 0000

31302928272625242322212019181716
MR31MR30MR29MR28MR27MR26MR25MR24MR23MR22MR21MR20MR19MR18MR17MR16
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
MR15MR14MR13MR12MR11MR10MR9MR8MR7MR6MR5MR4MR3MR2MR1MR0
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:22 MRx : 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 MRx : 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.

21.6.20 EXTI event mask register (EXTI_CnEMR1)

Address offset: 0x84 (EXTI_C1EMR1), 0xC4 (EXTI_C2EMR1)

Reset value: 0x0000 0000

31302928272625242322212019181716
MR31MR30MR29MR28MR27MR26MR25MR24MR23MR22MR21MR20MR19MR18MR17MR16
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
MR15MR14MR13MR12MR11MR10MR9MR8MR7MR6MR5MR4MR3MR2MR1MR0
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:0 MRx : CPU Event mask on Event input x

0: Event request from Line x is masked

1: Event request from Line x is unmasked

21.6.21 EXTI pending register (EXTI_CnPR1)

Address offset: 0x88 (EXTI_C1PR1), 0xC8 (EXTI_C2PR1)

Reset value: undefined

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.PR21PR21PR19PR18PR17PR16
1514131211109876543210
PR15PR14PR13PR12PR11PR10PR9PR8PR7PR6PR5PR4PR3PR2PR1PR0
rc1rc1rc1rc1rc1rc1rc1rc1rc1rc1rc1rc1rc1rc1rc1rc1

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

Bits 21:0 PRx : 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.

21.6.22 EXTI interrupt mask register (EXTI_CnIMR2)

Address offset: 0x90 (EXTI_C1IMR2), 0xD0 (EXTI_C2IMR2)

Reset value: 0xFFF5 FFFF

31302928272625242322212019181716
MR63MR62MR61MR60MR59MR58MR57MR56MR55MR54MR53MR52MR51MR50MR49MR48
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
MR47MR46Res.MR44MR43MR42MR41MR40MR39MR38MR37MR36MR35MR34MR33MR32
rwrw1rwrwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:20 MRx : CPU n Interrupt Mask on Direct Event input x+32 (1)

0: Interrupt request from Line x is masked

1: Interrupt request from Line x is unmasked

Bit 19 MRx : CPU n interrupt Mask on Configurable Event input x+32 (2)

0: Interrupt request from Line x is masked

1: Interrupt request from Line x is unmasked

Bit 18 MRx : CPU n Interrupt Mask on Direct Event input x+32 (1)

0: Interrupt request from Line x is masked

1: Interrupt request from Line x is unmasked

Bit 17 MRx : CPU n interrupt Mask on Configurable Event input x+32 (2)

0: Interrupt request from Line x is masked

1: Interrupt request from Line x is unmasked

Bits 16:14 MRx : CPUn Interrupt Mask on Direct Event input x+32 (1)

Bit 13 Reserved, must be kept at reset value (1).

Bits 12:0 MRx : CPUn Interrupt Mask on Direct Event input x+32 (1)

  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.

21.6.23 EXTI event mask register (EXTI_CnEMR2)

Address offset: 0x94 (EXTI_C1EMR2), 0xD4 (EXTI_C2EMR2)

Reset value: 0x0000 0000

31302928272625242322212019181716
MR63MR62MR61MR60MR59MR58MR57MR56MR55MR54MR53MR52MR51MR50MR49MR48
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

1514131211109876543210
MR47MR46Res.MR44MR43MR42MR41MR40MR39MR38MR37MR36MR35MR34MR33MR32
rwrw0rwrwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:14 MRx : CPUn Event mask on Event input x+32

Bit 13 Reserved, must be kept at reset value.

Bits 12:0 MRx : CPUn Event mask on Event input x+32

21.6.24 EXTI pending register (EXTI_CnPR2)

Address offset: 0x98 (EXTI_C1PR2), 0xD8 (EXTI_C2PR2)

Reset value: undefined

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

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 PRx : 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 PRx : 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:0 Reserved, must be kept at reset value.

21.6.25 EXTI interrupt mask register (EXTI_CnIMR3)

Address offset: 0xA0 (EXTI_C1IMR3), 0xE0 (EXTI_C2IMR3)

Reset value: 0x018B FFFF

31302928272625242322212019181716
ResResResResResResResMR88MR87MR86MR85MR84ResMR82ResMR80
rwrwrwrwrwrwrw
1514131211109876543210
MR79MR78MR77MR76MR75MR74MR73MR72MR71MR70MR69MR68MR67MR66MR65MR64
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

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

Bits 24:23 MRx : CPU n 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 22:20 MRx : CPU n interrupt Mask on Configurable Event input x+64 (2)

0: Interrupt request from Line x is masked

1: Interrupt request from Line x is unmasked

Bit 19 Reserved, must be kept at reset value (1) .

Bit 18 MRx : CPU n interrupt Mask on Configurable Event input x+64 (2)

0: Interrupt request from Line x is masked

1: Interrupt request from Line x is unmasked

Bit 17 Reserved, must be kept at reset value (1) .

Bits 16:0 MRx : CPU n 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

  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.

21.6.26 EXTI event mask register (EXTI_CnEMR3)

Address offset: 0xA4 (EXTI_C1EMR3), 0xE4 (EXTI_C2EMR3)

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.MR88MR87MR86MR85MR84Res.MR82Res.MR80
rwrwrwrwrwrwrw
1514131211109876543210
MR79MR78MR77MR76MR75MR74MR73MR72MR71MR70MR69MR68MR67MR66MR65MR64
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

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

Bits 24:0 MRx : CPU n Event mask on Event input x+64

0: Event request from Line x is masked

1: Event request from Line x is unmasked

21.6.27 EXTI pending register (EXTI_CnPR3)

Address offset: 0xA8 (EXTI_C1PR3), 0xE8 (EXTI_C2PR3)

Reset value: undefined

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.PR86PR85PR84Res.PR82Res.Res.
rc1rc1rc1rc1
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.

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

Bits 22:20 PRx : Configurable event inputs x+64 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 19 Reserved, must be kept at reset value.

Bit 18 PRx : Configurable event inputs x+64 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 17:0 Reserved, must be kept at reset value.

21.6.28 EXTI register map

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

Table 154. 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]
Reset value0000000000000000000000
0x04EXTI_FTSR1Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.TR[21:0]
Reset value0000000000000000000000
0x08EXTI_SWIER1Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.SWIER[21:0]
Reset value0000000000000000000000
0x0CEXTI_D3PMR1Res.Res.Res.Res.Res.Res.MR[25]Res.Res.Res.MR[21:19]Res.Res.Res.MR[15:0]
Reset value00000000000000000000
0x10EXTI_D3PCR1LPCS[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 value0000000000000000
0x14EXTI_D3PCR1HRes.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 value00000
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_D3PMR2Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.MR[53:48]Res.Res.Res.Res.Res.MR[41]Res.Res.Res.Res.MR[35]MR[34]Res.Res.
Reset value000000000
0x30EXTI_D3PCR2LRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.PCS[41]Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.PCS[35]PCS[34]Res.Res.Res.Res.Res.Res.Res.
Reset value000000
0x34EXTI_D3PCR2HRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.PCS[53]PCS[52]PCS[51]PCS[50]PCS[49]PCS[48]Res.Res.Res.Res.Res.Res.
Reset value000000000000
0x40EXTI_RTSR3Res.Res.Res.Res.Res.Res.Res.Res.TR[86]TR[85]TR[84]Res.TR[82]Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
Reset value0000

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

OffsetRegister name313029282726252423222120191817161514131211109876543210
0x44EXTI_FTSR3Res.Res.Res.Res.Res.Res.Res.Res.Res.TR[86]TR[85]TR[84]Res.TR[82]Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
Reset value0000
0x48EXTI_SWIER3Res.Res.Res.Res.Res.Res.Res.Res.Res.SWIER[86]SWIER[85]SWIER[84]Res.SWIER[82]Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
Reset value0000
0x4CEXTI_D3PMR3Res.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
0x50EXTI_D3PCR3LRes.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.
Reset value
0x54EXTI_D3PCR3HRes.Res.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.
Reset value00
0x58-0x7CReserved
0x80EXTI_C1IMR1MR[31:22]MR[21:0]
Reset value11111111110000000000000000000000
0x84EXTI_C1EMR1MR[31:0]
Reset value00000000000000000000000000000000
0x88EXTI_C1PR1Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.PR[21:0]
Reset value0000000000000000000000
0x90EXTI_C1IMR2MR[63:52]MR[51]MR[50]MR[49]MR[48:46]Res.MR[44:32]
Reset value1111111111110101111111111111111
0x94EXTI_C1EMR2MR[63:46]Res.MR[44:32]
Reset value0000000000000000000000000000000
0x98EXTI_C1PR2Res.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_C1IMR3Res.Res.Res.Res.Res.Res.MR[88]MR[87]MR[86]MR[85]MR[84]Res.MR[82]Res.MR[80:64]
Reset value110000111111111111111111
0xA4EXTI_C1EMR3Res.Res.Res.Res.Res.Res.MR[88:84]Res.MR[82]Res.MR[80:64]
Reset value000000000000000000000000
0xA8EXTI_C1PR3Res.Res.Res.Res.Res.Res.Res.Res.PR[86]PR[85]PR[84]Res.PR[82]Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
Reset value0000

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

OffsetRegister name313029282726252423222120191817161514131211109876543210
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.Res.
0xAC-0xBCReserved
0xC0EXTI_C2IMR1MR[31:22]MR[21:0]
Reset value11111111111000000000000000000000
0xC4EXTI_C2EMR1MR[31:0]
Reset value00000000000000000000000000000000
0xC8EXTI_C2PR1Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.PR[21:0]
Reset value000000000000000000000
0xD0EXTI_C2IMR2MR[63:52]MR[51]MR[50]MR[49]MR[48:46]Res.MR[44:32]
Reset value11111111111111111111111111111111
0xD4EXTI_C2EMR2MR[63:46]Res.MR[44:32]
Reset value00000000000000000000000000000000
0xD8EXTI_C2PR2Res.Res.Res.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.
Reset value00
0xE0EXTI_C2IMR3Res.Res.Res.Res.Res.Res.Res.Res.MR[88]MR[87]MR[86]MR[85]MR[84]Res.MR[82]Res.MR[80:64]
Reset value1100001111111111111111
0xE4EXTI_C2EMR3Res.Res.Res.Res.Res.Res.Res.Res.MR[88:84]MR[80:64]
Reset value0000000000000000000000
0xE8EXTI_C2PR3Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.PR[86]PR[85]PR[84]Res.PR[82]Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
Reset value0000
Refer to Section 2.3 on page 134 for the register boundary addresses.