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

20.1 EXTI main features

The EXTI main features are the following:

The asynchronous event inputs are classified in 2 groups:

20.2 EXTI block diagram

As shown in Figure 91 , 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 91. EXTI block diagram

Figure 91. 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 is connected to the 'Registers' block and the 'Event trigger' block. The 'Masking' block outputs are connected to the 'CPU' (via 'cpu_it_exti_per(x)', 'cpu_event', and 'exti_cpu_wkup'), 'PWR' (via 'exti_d3_wkup'), and 'D3' (via 'd3_it_exti_per(x)' and 'd3_pendclear_in[3:0]'). The 'CPU' block contains 'nvic(n)' and 'rxev'. The 'PWR' and 'D3' blocks are also shown. The entire EXTI block is labeled 'EXTI' at the bottom left. A reference code 'MSv41947V1' is in the bottom right corner.
Figure 91. 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 is connected to the 'Registers' block and the 'Event trigger' block. The 'Masking' block outputs are connected to the 'CPU' (via 'cpu_it_exti_per(x)', 'cpu_event', and 'exti_cpu_wkup'), 'PWR' (via 'exti_d3_wkup'), and 'D3' (via 'd3_it_exti_per(x)' and 'd3_pendclear_in[3:0]'). The 'CPU' block contains 'nvic(n)' and 'rxev'. The 'PWR' and 'D3' blocks are also shown. The entire EXTI block is labeled 'EXTI' at the bottom left. A reference code 'MSv41947V1' is in the bottom right corner.

20.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 the 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 interrupts are connected to their respective CPU NVIC, and, similarly, the CPU event is connected to the CPU rxev input.

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

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

20.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 141. EXTI Event input configurations and register control (1)

Event input typeWakeup target(s)Logic implementationEXTI_RTSREXTI_FTSREXTI_SWIEREXTI_CPUIMREXTI_CPEUMREXTI_D3PMR
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 functionality is available.

2. Waking-up D3 domain for autonomous Run mode, and/or CPU.

20.3.1 EXTI configurable event input - CPU wakeup

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

Figure 92. Configurable event triggering logic CPU wakeup

Figure 92. Configurable event triggering logic CPU wakeup. This block diagram illustrates the internal logic of the EXTI (Extended Interrupt) controller. 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, 'Configurable Event input(x)' enters a block labeled 'EXTI'. Inside, an OR gate combines the input with the 'Software interrupt event register'. The output goes to an 'Asynchronous edge detection circuit' which has a 'rst' input. This circuit's output goes to a 'CPU Rising Edge detect Pulse generator' which has a 'Delay' block and is also connected to 'rcc_fclk_cpu'. The pulse generator's output goes to a series of AND gates. The first AND gate also takes inputs from the 'CPU Event mask register' and 'CPU Interrupt mask register'. The output of this AND gate is labeled 'CPU Event(x)'. This signal is ORed with 'Other CPU Events' to produce the 'cpu_event' output. Below this, another AND gate takes inputs from the 'CPU Pending request register' and the 'CPU Interrupt mask register'. Its output is labeled 'CPU Wakeup(x)'. This signal is ORed with 'Other CPU Wakeups' and 'D3 Wakeup(x)'. The 'D3 Wakeup(x)' signal is ORed with 'Other D3 Wakeups' to produce the 'd3_wakeup' output. The 'CPU Wakeup(x)' signal is also ORed with the 'd3_wakeup' output and passes through a 'Synch' block (connected to 'ck_sys') to produce the 'cpu_it_exti_per(x)' output. The diagram is labeled 'MSV41948V1' at the bottom right.
Figure 92. Configurable event triggering logic CPU wakeup. This block diagram illustrates the internal logic of the EXTI (Extended Interrupt) controller. 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, 'Configurable Event input(x)' enters a block labeled 'EXTI'. Inside, an OR gate combines the input with the 'Software interrupt event register'. The output goes to an 'Asynchronous edge detection circuit' which has a 'rst' input. This circuit's output goes to a 'CPU Rising Edge detect Pulse generator' which has a 'Delay' block and is also connected to 'rcc_fclk_cpu'. The pulse generator's output goes to a series of AND gates. The first AND gate also takes inputs from the 'CPU Event mask register' and 'CPU Interrupt mask register'. The output of this AND gate is labeled 'CPU Event(x)'. This signal is ORed with 'Other CPU Events' to produce the 'cpu_event' output. Below this, another AND gate takes inputs from the 'CPU Pending request register' and the 'CPU Interrupt mask register'. Its output is labeled 'CPU Wakeup(x)'. This signal is ORed with 'Other CPU Wakeups' and 'D3 Wakeup(x)'. The 'D3 Wakeup(x)' signal is ORed with 'Other D3 Wakeups' to produce the 'd3_wakeup' output. The 'CPU Wakeup(x)' signal is also ORed with the 'd3_wakeup' output and passes through a 'Synch' block (connected to 'ck_sys') to produce the 'cpu_it_exti_per(x)' output. The diagram is labeled 'MSV41948V1' 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 will only be set for an unmasks CPU interrupt. Each event provides a individual CPU interrupt to the CPU NVIC. The Configurable events 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_CPUEMR1) , EXTI event mask register (EXTI_CPUEMR2) , and EXTI event mask register (EXTI_CPUEMR3) . 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) will not be 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 93 is a detailed representation of the logic associated with Configurable Event inputs that can wakeup D3 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 D3 domain independently.

When all CPU interrupts and CPU 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 142. Configurable event input asynchronous edge detector reset

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

Figure 93. Configurable event triggering logic - any wakeup

Block diagram of the Configurable event triggering logic for 'any wakeup' target. The diagram shows the internal logic of the EXTI block, including registers, edge detection circuits, and logic gates for CPU and D3 events.

The diagram illustrates the internal architecture of the EXTI block for the 'any wakeup' target. At the top, a 'Peripheral interface' block is connected to an 'APB interface'. Below it, several registers are shown: 'Software interrupt event register', 'Falling trigger selection register', 'Rising trigger selection register', 'CPU Event mask register', 'CPU Interrupt mask register', 'CPU Pending request register', and 'D3 Pending mask register'. The 'CPU Pending request register' is connected to the 'D3 Pending mask register' via a signal labeled 'rcv_folk_cpu'. The 'Falling trigger selection register' and 'Rising trigger selection register' are connected to an 'Asynchronous edge detection circuit' which also receives 'Configurable Event input(x)'. The output of this circuit is connected to a 'Delay' block and a 'CPU Rising Edge detect Pulse generator'. The 'CPU Rising Edge detect Pulse generator' is connected to the 'CPU Event mask register' and the 'CPU Interrupt mask register'. The 'CPU Event mask register' and 'CPU Interrupt mask register' are connected to an AND gate. The output of this AND gate is connected to the 'CPU Pending request register' and the 'D3 Pending mask register'. The 'D3 Pending mask register' is connected to a 'D3 Pending request' block. The 'D3 Pending request' block is connected to the 'D3 Domain Rising Edge detect Pulse generator'. The 'D3 Domain Rising Edge detect Pulse generator' is connected to the 'CPU Pending request register' and the 'D3 Pending mask register'. The 'CPU Pending request register' and the 'D3 Pending request' block are connected to an OR gate labeled 'CPU Event(x)'. The output of this OR gate is connected to the 'cpu_event' output. The 'CPU Event(x)' output is connected to the 'cpu_it_exti_per(x)' output. The 'CPU Event(x)' output is also connected to an OR gate labeled 'CPU Wakeup(x)'. The output of this OR gate is connected to a 'Synch' block. The 'Synch' block is connected to the 'cpu_wakeup' output. The 'CPU Wakeup(x)' output is also connected to an OR gate labeled 'D3 Wakeup(x)'. The output of this OR gate is connected to the 'd3_wakeup' output. The 'D3 Wakeup(x)' output is also connected to an OR gate labeled 'Other D3 Wakeups'. The output of this OR gate is connected to the 'd3_it_aiec_per(x)' output. The 'd3_it_aiec_per(x)' output is also connected to the 'd3_pendclear(x)' output. The 'd3_pendclear(x)' output is connected to the 'D3 Pending request' block. The 'Synch' block is also connected to the 'ck_sys' clock signal. The 'CPU Rising Edge detect Pulse generator' is also connected to the 'rcv_folk_cpu' signal. The 'D3 Domain Rising Edge detect Pulse generator' is also connected to the 'ck_folk_d3' signal. The 'Synch' block is also connected to the 'ck_folk_d3' signal. The 'EXTI' label is at the bottom left of the diagram. The reference 'MSv41953V2' is at the bottom right.

Block diagram of the Configurable event triggering logic for 'any wakeup' target. The diagram shows the internal logic of the EXTI block, including registers, edge detection circuits, and logic gates for CPU and D3 events.

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.

20.3.3 EXTI direct event input - CPU wakeup

Figure 94 is a detailed representation of the logic associated with Direct Event inputs waking up the CPU.

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

Figure 94. Direct event triggering logic CPU wakeup

Figure 94. Direct event triggering logic CPU wakeup. This block diagram shows the internal logic of the EXTI for CPU wakeup. It includes a 'Peripheral interface' connected to an 'APB interface'. Below it are two 'CPU' registers: 'Event mask register' and 'Interrupt mask register'. 'Direct Event input(x)' signals enter an 'Asynchronous Rising edge detection circuit rst' and a 'Falling edge detect Pulse generator'. The rising edge detection output goes to a 'Synch' block (clocked by 'rcc_folk_cpu') and a 'CPU Rising Edge detect Pulse generator' (also clocked by 'rcc_folk_cpu'). The falling edge detection output goes to an OR gate. The 'Synch' block output goes to an AND gate along with the 'Event mask register' output. The 'CPU Rising Edge detect Pulse generator' output goes to another AND gate along with the 'Interrupt mask register' output. These two AND gate outputs are ORed together to produce 'CPU Wakeup(x)'. This signal is ORed with 'Other CPU Wakeups' and then passed through a 'Synch' block (clocked by 'ck_sys') to produce the 'cpu_wakeup' output. The 'CPU Rising Edge detect Pulse generator' output is also ORed with 'Other CPU Events' to produce the 'cpu_event' output. The 'cpu_event' output is ANDed with the 'Interrupt mask register' output to produce the 'cpu_it_exti_per(x)' output. The 'd3_wakeup' output is the OR of 'cpu_wakeup', 'D3 Wakeup(x)', and 'Other D3 Wakeups'. The entire logic block is labeled 'EXTI' and 'MSv41954V1'.
Figure 94. Direct event triggering logic CPU wakeup. This block diagram shows the internal logic of the EXTI for CPU wakeup. It includes a 'Peripheral interface' connected to an 'APB interface'. Below it are two 'CPU' registers: 'Event mask register' and 'Interrupt mask register'. 'Direct Event input(x)' signals enter an 'Asynchronous Rising edge detection circuit rst' and a 'Falling edge detect Pulse generator'. The rising edge detection output goes to a 'Synch' block (clocked by 'rcc_folk_cpu') and a 'CPU Rising Edge detect Pulse generator' (also clocked by 'rcc_folk_cpu'). The falling edge detection output goes to an OR gate. The 'Synch' block output goes to an AND gate along with the 'Event mask register' output. The 'CPU Rising Edge detect Pulse generator' output goes to another AND gate along with the 'Interrupt mask register' output. These two AND gate outputs are ORed together to produce 'CPU Wakeup(x)'. This signal is ORed with 'Other CPU Wakeups' and then passed through a 'Synch' block (clocked by 'ck_sys') to produce the 'cpu_wakeup' output. The 'CPU Rising Edge detect Pulse generator' output is also ORed with 'Other CPU Events' to produce the 'cpu_event' output. The 'cpu_event' output is ANDed with the 'Interrupt mask register' output to produce the 'cpu_it_exti_per(x)' output. The 'd3_wakeup' output is the OR of 'cpu_wakeup', 'D3 Wakeup(x)', and 'Other D3 Wakeups'. The entire logic block is labeled 'EXTI' and 'MSv41954V1'.
  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 95 is a detailed representation of the logic associated with Direct Event inputs waking up D3 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 D3 domain independently.

Figure 95. Direct event triggering logic - any wakeup

Figure 95. Direct event triggering logic - any 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 three registers: 'CPU Event mask register', 'CPU Interrupt mask register', and 'D3 Pending mask register'. The 'Direct Event input(x)' enters from the left and is split into two paths. One path goes through a 'Delay' block (clocked by 'ck_sys') and an AND gate. The other path goes through an 'Asynchronous Rising edge detection circuit' (with 'rst' input) and a 'Failing edge detect Pulse generator' (clocked by 'ck_sys'). These two paths are combined via an OR gate. The output of this OR gate is sent to a 'CPU Rising Edge detect Pulse generator' (clocked by 'rcc_fclk_cpu') and also to an OR gate for 'CPU Wakeup(x)'. The 'CPU Rising Edge detect Pulse generator' output is ANDed with the 'CPU Event mask register' output and sent to a 'CPU Event(x)' OR gate. The 'CPU Event(x)' OR gate also takes 'Other CPU Events' as input. The 'CPU Wakeup(x)' OR gate also takes 'Other CPU Wakeups' as input and is followed by a 'Synch' block (clocked by 'ck_sys'). The 'D3 Pending mask register' output is ANDed with the 'D3 Pending request' block (clocked by 'ck_fclk_d3(1)') and sent to a 'D3 Pending request' block. The 'D3 Pending request' block output is ANDed with the 'D3 Pending mask register' output and sent to a 'D3 Wakeup(x)' OR gate. The 'D3 Wakeup(x)' OR gate also takes 'Other D3 Wakeups' as input. The final outputs on the right are: 'd3_pendclear(x)', 'cpu_it_exti_per(x)', 'd3_it_exti_per(x)', 'cpu_event', 'cpu_wakeup', and 'd3_wakeup'. The entire logic block is labeled 'EXTI' at the bottom left and 'MSv41955V1' at the bottom right.
Figure 95. Direct event triggering logic - any 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 three registers: 'CPU Event mask register', 'CPU Interrupt mask register', and 'D3 Pending mask register'. The 'Direct Event input(x)' enters from the left and is split into two paths. One path goes through a 'Delay' block (clocked by 'ck_sys') and an AND gate. The other path goes through an 'Asynchronous Rising edge detection circuit' (with 'rst' input) and a 'Failing edge detect Pulse generator' (clocked by 'ck_sys'). These two paths are combined via an OR gate. The output of this OR gate is sent to a 'CPU Rising Edge detect Pulse generator' (clocked by 'rcc_fclk_cpu') and also to an OR gate for 'CPU Wakeup(x)'. The 'CPU Rising Edge detect Pulse generator' output is ANDed with the 'CPU Event mask register' output and sent to a 'CPU Event(x)' OR gate. The 'CPU Event(x)' OR gate also takes 'Other CPU Events' as input. The 'CPU Wakeup(x)' OR gate also takes 'Other CPU Wakeups' as input and is followed by a 'Synch' block (clocked by 'ck_sys'). The 'D3 Pending mask register' output is ANDed with the 'D3 Pending request' block (clocked by 'ck_fclk_d3(1)') and sent to a 'D3 Pending request' block. The 'D3 Pending request' block output is ANDed with the 'D3 Pending mask register' output and sent to a 'D3 Wakeup(x)' OR gate. The 'D3 Wakeup(x)' OR gate also takes 'Other D3 Wakeups' as input. The final outputs on the right are: 'd3_pendclear(x)', 'cpu_it_exti_per(x)', 'd3_it_exti_per(x)', 'cpu_event', 'cpu_wakeup', and 'd3_wakeup'. The entire logic block is labeled 'EXTI' at the bottom left and 'MSv41955V1' at the bottom right.
  1. 1. The CPU interrupt and D3 domain interrupt for asynchronous Direct Event inputs (peripheral Wakeup signals) are synchronized, respectively, with the CPU 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 interrupt and the D3 domain interrupt without resynchronization in the EXTI.

20.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 96 is a detailed representation of the logic selecting the D3 pendclear source.

Figure 96: D3 domain pending request clear logic diagram. The diagram shows an APB interface connected to a Peripheral interface. The Peripheral interface is connected to a D3 pending clear selection register. The register is connected to a multiplexer. The multiplexer has 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 output of the multiplexer is connected to a D3 pending request block. The D3 pending request block is connected to an Event(x) block. The Event(x) block is connected to the APB interface. The diagram is labeled MS40541V2.

Figure 96. D3 domain pending request clear logic

The diagram illustrates the logic for clearing a D3 pending request. An APB interface connects to a Peripheral interface, which in turn connects to a D3 pending clear selection register. This register controls a multiplexer that selects from four potential sources: 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 selected source is fed into a D3 pending request block, which is part of the EXTI logic and connected to Event(x) inputs. The entire logic block is labeled 'EXTI' and 'MS40541V2'.

Figure 96: D3 domain pending request clear logic diagram. The diagram shows an APB interface connected to a Peripheral interface. The Peripheral interface is connected to a D3 pending clear selection register. The register is connected to a multiplexer. The multiplexer has 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 output of the multiplexer is connected to a D3 pending request block. The D3 pending request block is connected to an Event(x) block. The Event(x) block is connected to the APB interface. 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_D3PCR2L) and EXTI D3 pending clear selection register high (EXTI_D3PCR3H) allow the system to select the source to reset the D3 Pending request.

20.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 143 . An Event input can either wake up the CPU, 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 143. 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 143. 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 wakeupDirectCPU onlyYes
55WKUP1DirectCPU onlyYes
56WKUP2DirectCPU onlyYes
57Reserved---
58WKUP4DirectCPU onlyYes
59Reserved---
60WKUP6DirectCPU onlyYes
61RCC interruptDirectCPU onlyNo (4)
62I2C4 Event interruptDirectCPU onlyNo (4)
63I2C4 Error interruptDirectCPU onlyNo (4)
64LPUART1 global InterruptDirectCPU onlyNo (4)
65SPI6 interruptDirectCPU onlyNo (4)
66BDMA CH0 interruptDirectCPU onlyNo (4)
67BDMA CH1 interruptDirectCPU onlyNo (4)
68BDMA CH2 interruptDirectCPU onlyNo (4)
69BDMA CH3 interruptDirectCPU onlyNo (4)
70BDMA CH4 interruptDirectCPU onlyNo (4)
71BDMA CH5 interruptDirectCPU onlyNo (4)
72BDMA CH6 interruptDirectCPU onlyNo (4)
73BDMA CH7 interruptDirectCPU onlyNo (4)
74DMAMUX2 interruptDirectCPU onlyNo (4)
75ADC3 interruptDirectCPU onlyNo (4)
76SAI4 interruptDirectCPU onlyNo (4)
77HSEM0 interruptDirectCPU onlyNo
78Reserved---
79Reserved---
80Reserved---
81Reserved---
82Reserved---
83Reserved---

Table 143. EXTI Event input mapping (continued)

Event inputSourceEvent input typeWakeup target(s)Connection to NVIC
84Reserved---
85HDMI-CEC wakeupConfigurableCPU onlyYes
86ETHERNET wakeupConfigurableCPU onlyYes
87HSECSS interruptDirectCPU onlyNo (4)
88TEMP wakeupDirectAnyYes
89UART9 wakeupDirectCPU onlyYes
90USART10 wakeupDirectCPU onlyYes
91I2C5 wakeupDirectCPU onlyYes
  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. Available on CPU NVIC directly from the peripheral

20.5 EXTI functional behavior

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

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 the CPU when the event associated CPU interrupt is unmasked and/or the CPU event is unmasked.

Table 144. Masking functionality

CPUConfigurable event inputs PRx bits of EXTI_CPUPRCPUD3 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 wakeup D3 domain for autonomous Run mode (Any target).
  2. 2. For Event inputs that will always wake up CPU.

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

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

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

Both a CPU interrupt and a CPU event may be enabled on the same Event input. They 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 interrupt and/or CPU event is unmasked, the Event input will also generate a D3 domain wakeup next to the CPU wakeup.

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

20.5.1 EXTI CPU interrupt procedure

20.5.2 EXTI CPU event procedure

20.5.3 EXTI CPU wakeup procedure

20.5.4 EXTI D3 domain wakeup for autonomous Run mode procedure

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

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.

20.6 EXTI registers

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

20.6.1 EXTI rising trigger selection register (EXTI_RTSR1)

Address offset: 0x00

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.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. (1)

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

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

  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.

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. (1)

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

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

  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.

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

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

20.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 MR25 : 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 MR[21:19] : 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 MR[15:0] : 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.

20.6.5 EXTI D3 pending clear selection register low (EXTI_D3PCR1L)

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] : 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

20.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.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] : D3 Pending request clear input signal selection on Event input 25 = truncate \( ((n+32)/2) \)

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

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

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. (1)

Bit 18 Reserved, must be kept at reset value.

Bit 17 TR49 : Rising 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 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.

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.
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. (1)

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

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

Bit 18 Reserved, must be kept at reset value.

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

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

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

Bits 16: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.

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.SWIER51Res.SWIER49Res.
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

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

Bit 17 SWIER49 : 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.

20.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 MR[53:48] : 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 MR41 : 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 MR[35:34] : 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.

20.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.PCS41[1:0]Res.Res.
rwrw
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.PCS35[1:0]PCS34[1:0]Res.Res.Res.Res.
rwrwrwrw

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

Bits 19:18 PCS41[1:0] : 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 PCS[35:34][1:0] : 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.

20.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.PCS53[1:0]PCS52[1:0]PCS51[1:0]PCS50[1:0]PCS49[1:0]PCS48[1:0]
rwrwrwrwrwrwrwrwrwrwrwrw

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

Bits 11:0 PCS[53:48][1:0] : D3 Pending request clear input signal selection on Event input x= truncate \( ((n+96)/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

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.TR86TR85Res.Res.Res.Res.Res.
rwrw
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:21 TR[86:85] : 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 20:0 Reserved, must be kept at reset value.

  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.

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.TR86TR85Res.Res.Res.Res.Res.
rwrw
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:21 TR[86:85] : 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 20: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.

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.SWIER
86
SWIER
85
Res.Res.Res.Res.Res.
rwrw
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:21 SWIER[86:85] : Software interrupt on line x+64

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

20.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 MR88 : 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.

20.6.17 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[1:0]
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] : D3 Pending request clear input signal selection on Event input x= truncate \( \text{((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.

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 (1)

0: Interrupt request from Line x is masked

1: Interrupt request from Line x is unmasked

Bits 21:0 MR[21:0] : CPU interrupt Mask on Configurable Event input x (2)

0: Interrupt request from Line x is masked

1: Interrupt request from Line x is unmasked

  1. 1. The reset value for Direct Event inputs is set to '1' in order to enable the interrupt by default.
  2. 2. The reset value for Configurable Event inputs is set to '0' in order to disable the interrupt by default.

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

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
rc_w1rc_w1rc_w1rc_w1rc_w1rc_w1

1514131211109876543210
PR15PR14PR13PR12PR11PR10PR9PR8PR7PR6PR5PR4PR3PR2PR1PR0
rc_w1rc_w1rc_w1rc_w1rc_w1rc_w1rc_w1rc_w1rc_w1rc_w1rc_w1rc_w1rc_w1rc_w1rc_w1rc_w1

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

Bits 21:0 PR[21:0] : Configurable event inputs x Pending bit

0: No trigger request occurred

1: selected trigger request occurred

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

20.6.21 EXTI interrupt mask register (EXTI_CPUIMR2)

Address offset: 0x90

Reset value: 0xFFF5 FFFF

31302928272625242322212019181716
MR63MR62MR61MR60Res.MR58Res.MR56MR55MR54MR53MR52MR51MR50MR49MR48
rwrwrwrwrw1rwrwrwrwrwrwrwrwrw
1514131211109876543210
MR47Res.Res.Res.MR43MR42MR41MR40MR39MR38MR37MR36MR35MR34MR33MR32
rw111rwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:28 MR[63:60] : CPU Interrupt Mask on Direct Event input x+32 (1) (x = 63 to 60)

0: Interrupt request from Line x is masked

1: Interrupt request from Line x is unmasked

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

Bit 26 MR58 : CPU Interrupt Mask on Direct Event input 58+32 (1)

0: Interrupt request from Line 58 is masked

1: Interrupt request from Line 58 is unmasked

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

Bits 24:20 MR[56:52] : CPU Interrupt Mask on Direct Event input x+32 (1) (x = 56 to 52)

0: Interrupt request from Line x is masked

1: Interrupt request from Line x is unmasked

Bit 19 MR51 : CPU interrupt Mask on Configurable Event input 51+32 (2)

0: Interrupt request from Line 51 is masked

1: Interrupt request from Line 51 is unmasked

Bit 18 MR50 : CPU Interrupt Mask on Direct Event input 50+32 (1)

0: Interrupt request from Line 50 is masked

1: Interrupt request from Line 50 is unmasked

Bit 17 MR49 : CPU interrupt Mask on Configurable Event input 49+32 (2)

0: Interrupt request from Line 49 is masked

1: Interrupt request from Line 49 is unmasked

Bits 16:15 MR[48:47] : CPU Interrupt Mask on Direct Event input x+32 (1) (x = 48 to 47)

0: Interrupt request from Line x is masked

1: Interrupt request from Line x is unmasked

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

Bits 11:0 MR[43:32] : CPU Interrupt Mask on Direct Event input x+32 (1) (x = 43 to 32)

0: Interrupt request from Line x is masked

1: Interrupt request from Line x is unmasked

  1. 1. The reset value for Direct Event inputs is set to '1' in order to enable the interrupt by default.
  2. 2. The reset value for Configurable Event inputs is set to '0' in order to disable the interrupt by default.

20.6.22 EXTI event mask register (EXTI_CPUEMR2)

Address offset: 0x94

Reset value: 0x0000 0000

31302928272625242322212019181716
MR63MR62MR61MR60Res.MR58Res.MR56MR55MR54MR53MR52MR51MR50MR49MR48
rwrwrwrwrw0rwrwrwrwrwrwrwrwrw
1514131211109876543210
MR47Res.Res.Res.MR43MR42MR41MR40MR39MR38MR37MR36MR35MR34MR33MR32
rw000rwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:28 MR[63:60] : CPU Event mask on Event input x+32 (x = 63 to 60)

0: Event request from Line x is masked

1: Event request from Line x is unmasked

Bit 27 Reserved, must be kept at reset value.

Bit 26 MR[58] : CPU Event mask on Event input 58+32

0: Event request from Line 58 is masked

1: Event request from Line 58 is unmasked

Bit 25 Reserved, must be kept at reset value.

Bits 24:14 MR[56:47] : CPU Event mask on Event input x+32 (x = 56 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:0] : CPU Event mask on Event input x+32 (x = 43 to 0)

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.
rc_w1rc_w1
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 PR51 : Configurable event inputs 51+32 Pending bit

0: No trigger request occurred

1: selected trigger request occurred

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

Bit 18 Reserved, must be kept at reset value.

Bit 17 PR49 : Configurable event inputs 49+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.

20.6.24 EXTI interrupt mask register (EXTI_CPUIMR3)

Address offset: 0xA0

Reset value: 0x0F8B FFFF

31302928272625242322212019181716
Res.Res.Res.Res.MR91MR90MR89MR88MR87MR86MR85Res.Res.Res.Res.MR80
rwrwrwrwrwrwrwrw
1514131211109876543210
Res.MR78MR77MR76MR75MR74MR73MR72MR71MR70MR69MR68MR67MR66MR65MR64
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

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

Bits 27:23 MR[91:87] : CPU Interrupt Mask on Direct Event input x+64 (1) (x = 91 to 87)

0: Interrupt request from Line x is masked

1: Interrupt request from Line x is unmasked

Bits 22:21 MR[86:85] : CPU interrupt Mask on Configurable Event input x+64 (2) (x = 86 to 85)

0: Interrupt request from Line x is masked

1: Interrupt request from Line x is unmasked

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

Bit 16 MR16 : CPU Interrupt Mask on Direct Event input 80+64 (1)

0: Interrupt request from Line 80 is masked

1: Interrupt request from Line 80 is unmasked

Bit 15 Reserved, must be kept at reset value.

Bits 14:0 MR[78: 64] : CPU Interrupt Mask on Direct Event input x+64 (1) (x = 78 to 64)

0: Interrupt request from Line x is masked

1: Interrupt request from Line x is unmasked

  1. 1. The reset value for Direct Event inputs is set to '1' in order to enable the interrupt by default.
  2. 2. The reset value for Configurable Event inputs is set to '0' in order to disable the interrupt by default.

20.6.25 EXTI event mask register (EXTI_CPUEMR3)

Address offset: 0xA4

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.MR91MR90MR89MR88MR87MR86MR85Res.Res.Res.Res.MR80
rwrwrwrwrwrwrwrw
1514131211109876543210
Res.MR78MR77MR76MR75MR74MR73MR72MR71MR70MR69MR68MR67MR66MR65MR64
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

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

Bits 27:21 MR[91:21] : CPU Event mask on Event input x+64 (x = 91 to 21)

0: Event request from Line x is masked

1: Event request from Line x is unmasked

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

Bit 16 MR80 : CPU Event mask on Event input 80+64

0: Event request from Line 80 is masked

1: Event request from Line 80 is unmasked

Bit 15 Reserved, must be kept at reset value.

Bits 14:0 MR[78:64] : CPU Event mask on Event input x+64 (x = 78 to 64)

0: Event request from Line x is masked

1: Event request from Line x is unmasked

20.6.26 EXTI pending register (EXTI_CPUPR3)

Address offset: 0xA8

Reset value: undefined

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.PR86PR85PR84Res.Res.Res.Res.
rc_w1rc_w1rc_w1
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:0 PR[86:84] : Configurable event inputs x+64 Pending bit (x = 86 to 84)

0: No trigger request occurred

1: selected trigger request occurred

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

20.6.27 EXTI register map

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

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

OffsetRegister name313029282726252423222120191817161514131211109876543210
0x00EXTI_RTSR1TR[21:0]
Reset value00000000000000000000000000000000
0x04EXTI_FTSR1TR[21:0]
Reset value00000000000000000000000000000000
0x08EXTI_SWIER1SWIER[21:0]
Reset value00000000000000000000000000000000
0x0CEXTI_D3PMR1MR[21:19]
Reset value00000000000000000000000000000000
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_D3PCR1HPCS[25]
Reset value0
0x20EXTI_RTSR2TR[51]
Reset value0
0x24EXTI_FTSR2TR[49]
Reset value0
0x28EXTI_SWIER2SWIER[51]
Reset value0
0x2CEXTI_D3PMR2MR[53:48]
Reset value0
0x30EXTI_D3PCR2LPCS[41]
Reset value0
0x34EXTI_D3PCR2HPCS[53]
Reset value0
0x40EXTI_RTSR3TR[85]
Reset value0

Table 145. 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]Res.Res.Res.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.SWIER[86]SWIER[85]Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
Reset value00
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.Res.
Reset value00
0x58-0x7CReserved
0x80EXTI_CPUIMR1MR[31:22]MR[21:0]
Reset value11111111110000000000000000000000
0x84EXTI_CPUCPUE MR1MR[31:0]
Reset value00000000000000000000000000000000
0x88EXTI_CPUPR1Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.PR[21:0]
Reset value0000000000000000000000
0x90EXTI_CPUIMR2MR[63:52]Res.MR[58]Res.MR[56:52]MR[51]MR[50]MR[49]MR[48:47]Res.Res.Res.MR[43:32]
Reset value111111111010111111111111111
0x94EXTI_CPUEMR2MR[63:60]Res.MR[58]Res.MR[56:47]Res.Res.Res.MR[43:32]
Reset value000000000000000000000000000
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.MR[91:85]Res.Res.Res.MR[80]Res.MR[78:64]
Reset value111111111111111111111111
0xA4EXTI_CPUEMR3Res.Res.Res.Res.MR[91:85]Res.Res.Res.MR[80]Res.MR[78:64]
Reset value000000000000000000000000

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

OffsetRegister name313029282726252423222120191817161514131211109876543210
0xA8EXTI_CPUPR3Res.Res.Res.Res.Res.Res.Res.Res.Res.PR[86]PR[85]PR[84]Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
Reset value000
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.