16. Extended interrupts and event controller (EXTI)

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

For each CPU, an additional event Generation block (EVG) is needed to generate the CPU event signal.

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

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

16.1 EXTI main features

The EXTI main features are the following:

The asynchronous event inputs are classified in the following two groups:

16.2 EXTI block diagram

The EXTI consists of a register block accessed via an AHB interface, the event input trigger block and the masking block as shown in Figure 54 .

The register block contains all the EXTI registers.

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

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

Figure 54. EXTI block diagram

Figure 54. EXTI block diagram. The diagram shows the internal structure of the EXTI block. It includes an AHB interface and hclk input to a Registers block. The Registers block is connected to an Event trigger block and a Masking block. The Event trigger block receives Wakeup, Direct event(x) or configurable event(y), and Interrupt signals from a Peripheral. The Masking block receives Events from the Event trigger and outputs sys_wakeup, c1_wakeup, c2_wakeup, and it_exti_per(y) to a PWR block. The Masking block also outputs c1_evt_exti, c1_evt_rst, c2_evt_exti, and c2_evt_rst to two CPU blocks (CPU1 and CPU2). Each CPU block contains a Pulse and EVG block. The Pulse block receives c1_evt_exti or c2_evt_exti and c1_evt_rst or c2_evt_rst, and outputs c1_event or c2_event to the CPU. The EVG block receives c1_fclk or c2_fclk and c1_event or c2_event, and outputs rxev, nvic(x), and nvic(y) to the CPU. A note at the bottom left indicates that it_exti_per(y) is only available for configurable events (y). The diagram is labeled MSv60758V1.
Figure 54. EXTI block diagram. The diagram shows the internal structure of the EXTI block. It includes an AHB interface and hclk input to a Registers block. The Registers block is connected to an Event trigger block and a Masking block. The Event trigger block receives Wakeup, Direct event(x) or configurable event(y), and Interrupt signals from a Peripheral. The Masking block receives Events from the Event trigger and outputs sys_wakeup, c1_wakeup, c2_wakeup, and it_exti_per(y) to a PWR block. The Masking block also outputs c1_evt_exti, c1_evt_rst, c2_evt_exti, and c2_evt_rst to two CPU blocks (CPU1 and CPU2). Each CPU block contains a Pulse and EVG block. The Pulse block receives c1_evt_exti or c2_evt_exti and c1_evt_rst or c2_evt_rst, and outputs c1_event or c2_event to the CPU. The EVG block receives c1_fclk or c2_fclk and c1_event or c2_event, and outputs rxev, nvic(x), and nvic(y) to the CPU. A note at the bottom left indicates that it_exti_per(y) is only available for configurable events (y). The diagram is labeled MSv60758V1.

Table 91. EXTI pin overview

Pin nameI/ODescription
AHB interfaceI/OEXTI register bus interface
hclkIAHB bus clock and EXTI system clock
Configurable event(y)IAsynchronous wake-up events from peripherals which do not have an associated interrupt and flag in the peripheral
Direct event(x)ISynchronous and asynchronous wake-up events from peripherals which have an associated interrupt and flag in the peripheral
it_exti_per (y)OInterrupts to the CPU associated with the configurable event (y)
cn_evt_extiOHigh-level sensitive event output for the CPU n , synchronous to hclk
cn_evt_rstIAsynchronous reset input to clear cn_evt_exti
sys_wakeupOAsynchronous system wake-up request to PWR for ck_sys and hclk
cn_wakeupOWake-up request to PWR for the CPU n , synchronous to hclk

Table 92. EVG pin overview

Pin nameI/ODescription
cn_fclkICPU n free running clock
cn_evt_inIHigh-level sensitive events input from EXTI, asynchronous to the CPU n clock
cn_eventOEvent pulse, synchronous to the CPU n clock
cn_evt_rstOEvent reset signal, synchronous to the CPU n clock

16.3 EXTI connections between peripherals and CPU

The peripherals able to generate wake-up or interrupt events when the system is in Stop mode, are connected to the EXTI.

Peripheral wake-up signals that generate a pulse or that do not have an interrupt status bits in the peripheral, are connected to an EXTI configurable event input. For these events, the EXTI provides a status pending bit which requires to be cleared. It is the EXTI interrupt associated with the status bit that interrupts the CPU.

Peripheral interrupt and wake-up signals that have a status bit in the peripheral which requires to be cleared in the peripheral, are connected to an EXTI direct event input. There is no status pending bit within the EXTI. The interrupt or wake-up is cleared by the CPU in the peripheral. It is the peripheral interrupt that interrupts the CPU directly.

The EXTI configurable event interrupts are connected to the NVIC of the CPU.

The dedicated EXTI/EVG CPU event is connected to the CPU rxev input.

The EXTI CPU wake-up signals are connected to the PWR block and are used to wake up the system and CPU sub-system bus clocks.

16.3.1 EXTI wake-up interrupt list

The wake-up sources are listed in Table 93: Wake-up interrupts .

Some wake-up sources are able to generate an event to the CPU (see 'Event' column).

The wake-up source capability to wake up a CPU is noted in wake-up column.

For CPU interrupt handling, see Section 15: Nested vectored interrupt controller (NVIC) .

Table 93. Wake-up interrupts

EXTI n°AcronymDescriptionEXTI typeEventWake-up
0EXTI[0]EXTI line 0 from SYSCFGConfigurableYesCPU1 and CPU2
1EXTI[1]EXTI line 1 from SYSCFGConfigurableYesCPU1 and CPU2
2EXTI[2]EXTI line 2 from SYSCFGConfigurableYesCPU1 and CPU2
3EXTI[3]EXTI line 3 from SYSCFGConfigurableYesCPU1 and CPU2
4EXTI[4]EXTI line 4 from SYSCFGConfigurableYesCPU1 and CPU2
5EXTI[5]EXTI line 5 from SYSCFGConfigurableYesCPU1 and CPU2
6EXTI[6]EXTI line 6 from SYSCFGConfigurableYesCPU1 and CPU2
7EXTI[7]EXTI line 7 from SYSCFGConfigurableYesCPU1 and CPU2
8EXTI[8]EXTI line 8 from SYSCFGConfigurableYesCPU1 and CPU2
9EXTI[8]EXTI line 9 from SYSCFGConfigurableYesCPU1 and CPU2
10EXTI[10]EXTI line 10 from SYSCFGConfigurableYesCPU1 and CPU2
11EXTI[11]EXTI line 11 from SYSCFGConfigurableYesCPU1 and CPU2
12EXTI[12]EXTI line 12 from SYSCFGConfigurableYesCPU1 and CPU2
13EXTI[13]EXTI line 13 from SYSCFGConfigurableYesCPU1 and CPU2

Table 93. Wake-up interrupts (continued)

EXTI n°AcronymDescriptionEXTI typeEventWake-up
14EXTI[14]EXTI line 14 from SYSCFGConfigurableYesCPU1 and CPU2
15EXTI[15]EXTI line 15 from SYSCFGConfigurableYesCPU1 and CPU2
16PVDPVD lineConfigurableNoCPU1 and CPU2
17RTC_ALARMRTC alarms A and B interruptDirectYesCPU1 and CPU2
18SSRURTC SSR underflow interruptDirectYesCPU1 and CPU2
19TAMP,
RTC_STAMP,
LSE_CSS
TAMP tamper interrupt
RTC timestamp interrupt
RCC LSECSS interrupt
DirectYesCPU1 and CPU2
20RTC_WKUPRTC wake-up interruptDirectYesCPU1 and CPU2
21COMP1COMP1 lineConfigurableYesCPU1 and CPU2
22COMP2COMP2 lineConfigurableYesCPU1 and CPU2
23I2C1 wake-upI2C1 wake-upDirectNoCPU1 and CPU2
24I2C2 wake-upI2C2 wake-upDirectNoCPU1 and CPU2
25I2C3 wake-upI2C3 wake-upDirectNoCPU1 and CPU2
26USART1USART1 wake-upDirectNoCPU1 and CPU2
27USART2USART2 wake-upDirectNoCPU1 and CPU2
28LPUART1LPUART1 wake-upDirectNoCPU1 and CPU2
29LPTIM1 wake-upLPTimer 1 wake-upDirectNoCPU1 and CPU2
30LPTIM2 wake-upLPTimer 2 wake-upDirectNoCPU1 and CPU2
31LPTIM3 wake-upLPTimer 3 wake-upDirectNoCPU1 and CPU2
32Reserved-DirectNo-
33Reserved-DirectNo-
34PVM[3]PVM[3] lineConfigurableNoCPU1 and CPU2
35Reserved-DirectNo-
36IPCC CPU1IPCC CPU1 RX occupied and TX free interruptsDirectNoCPU1 (1)
37IPCC CPU2IPCC CPU2 RX occupied and TX free interruptsDirectNoCPU2 (2)
38HSEM interrupt 0Semaphore interrupt 0 with CPU1DirectNoCPU1 (1)
39HSEM interrupt 1Semaphore interrupt 1 with CPU2DirectNoCPU2 (2)
40C2SEVCPU2 SEV lineConfigurableYesCPU1 (3)
41C1SEVCPU1 SEV lineConfigurableYesCPU2 (4)
42FlashFlash ECC and global interruptsDirectNoCPU1 and CPU2
43HSE32 CSS interruptRCC HSE32 CSS interruptDirectNoCPU1 and CPU2
44Radio IRQsRadio IRQs interruptsDirectNoCPU1 and CPU2

Table 93. Wake-up interrupts (continued)

EXTI n oAcronymDescriptionEXTI typeEventWake-up
45Radio BusyRFBUSY wake-upConfigurableNoCPU1 and CPU2
46CDBGPWRUPREQDebug power-up request wake-upDirectNoCPU1 and CPU2
  1. 1. For correct operation, the EXTI direct event EXTI_C2IMRm.IMb bit must be set to 0 before CPU1 uses this direct event.
  2. 2. For correct operation, the EXTI direct event EXTI_C1IMRm.IMb bit must be set to 0 before CPU2 uses this direct event.
  3. 3. For correct operation, the EXTI configurable event EXTI_C2IMRm.IMb and EXTI_C2EMRm.EMb bits must both be set to 0 before CPU1 uses this configurable event.
  4. 4. For correct operation, the EXTI configurable event EXTI_C1IMRm.IMb and EXTI_C1EMRm.EMb bits must both be set to 0 before CPU2 uses this configurable event.

16.4 EXTI functional description

Depending on the EXTI event input type and wake-up targets, different logic implementations are used. The applicable features are controlled from register bits as detailed below:

Table 94. EXTI event input configurations and register control

Event input typeLogic implementationEXTI_RTSREXTI_FTSREXTI_SWIEREXTI_PREXTI_CnIMREXTI_CnEMR (1)
ConfigurableConfigurable event input wake-up logicxxxxxx
DirectDirect event input wake-up logic----xx

1. Only for input events with configuration "rxev generation" enabled.

16.4.1 EXTI configurable event input wake-up

The extended interrupt/event block diagram for configurable events is shown in Figure 55 . The configurable events allow the system and CPU wake-up from Sleep and Stop modes, and provide a pending flag in the EXTI.

Figure 55. Configurable event trigger logic CPU wake-up

Figure 55: Configurable event trigger logic CPU wake-up block diagram. The diagram shows the internal logic of the EXTI for configurable events. It includes an AHB interface, a peripheral interface with registers (Falling trigger selection, Rising trigger selection, Software interrupt event, CPU event mask, CPU interrupt mask, Pending request), an asynchronous edge detection circuit, a delay block, a rising edge detect pulse generator, and logic gates for CPU events and wake-ups. The diagram is labeled with signals like hclk, Configurable event input(y), it_exti_per(y), cn_evt_rst, cn_evt_exti, cn_event, cn_wakeup, and sys_wakeup. A legend indicates that logic is duplicated for each CPU and that the CPU event signal is only generated for input events supporting the CPU rxev generation.

□ Logic duplicated for each CPU      1) Only for the input events supporting the CPU rxev generation cn_event.      MSV60760V1

Figure 55: Configurable event trigger logic CPU wake-up block diagram. The diagram shows the internal logic of the EXTI for configurable events. It includes an AHB interface, a peripheral interface with registers (Falling trigger selection, Rising trigger selection, Software interrupt event, CPU event mask, CPU interrupt mask, Pending request), an asynchronous edge detection circuit, a delay block, a rising edge detect pulse generator, and logic gates for CPU events and wake-ups. The diagram is labeled with signals like hclk, Configurable event input(y), it_exti_per(y), cn_evt_rst, cn_evt_exti, cn_event, cn_wakeup, and sys_wakeup. A legend indicates that logic is duplicated for each CPU and that the CPU event signal is only generated for input events supporting the CPU rxev generation.

The software interrupt event register allows configurable events to be triggered by software, writing the corresponding register bit, irrespective of the edge selection setting.

The rising and falling edges selection registers allow the configurable event active trigger edge (or both edges) to be enabled.

The CPU has its dedicated interrupt mask and event mask registers. The enabled event allows the generation of an event on the CPU. All events for a CPU are ORed together into a single CPU event signal. The event pending register (EXTI_PR) is not set for an unmasked CPU event.

The configurable events have unique interrupt pending request registers, shared by the CPU. The pending register is only set for an unmasked interrupt. Each configurable event provides a common interrupt to the CPU. The configurable event interrupts need to be acknowledged by software in the EXTI_PR register.

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 EXTI hclk clock is woken up before the asynchronous edge detection circuit is reset.

Note: A detected configurable event interrupt pending request may be cleared by the CPU. The system is not able to enter into low-power modes as long as an interrupt pending request is active.

16.4.2 EXTI direct event input wake-up

The extended interrupt/event block diagram for direct events is shown in Figure 56. The direct events allow the wake-up of the system and of the CPU from Sleep and Stop modes.

The direct events do not have an associated EXTI interrupt. The EXTI only wakes up the system and CPU sub-system clocks and may generate a CPU wake-up event. The peripheral synchronous interrupt associated with the direct wake-up event, wake up the CPU. The EXTI direct event is able to generate a CPU event. This CPU event wakes up the CPU.

The CPU event may occur before the associated peripheral interrupt flag is set.

Figure 56. Direct event trigger logic CPU wake-up

Figure 56. Direct event trigger logic CPU wake-up. This block diagram shows the logic for generating CPU events and wake-ups from direct event inputs. On the left, an 'AHB interface' and 'hclk' signal are connected to a 'Peripheral interface' block containing 'CPU interrupt mask register' and 'CPU event mask register'. Below this, a 'Delay' block takes 'hclk' as input. 'Direct event input(x)' signals enter an 'Asynchronous rising edge detect circuit' and a 'Falling edge detect pulse generator', both of which are also connected to 'hclk'. The outputs of these circuits are ANDed with signals from the mask registers. The rising edge path leads to a 'Rising edge detect' block (part of a 'Same circuit for configurable and direct events'), which generates 'CPU event(x)' and 'CPU other events(x,y)'. These are ANDed with the 'CPU event mask register' output to produce 'CPU event(x)'. The falling edge path leads to a 'Synch' block, which generates 'CPU wakeup(x)' and 'CPU other wakeups'. These are ANDed with the 'CPU interrupt mask register' output to produce 'sys_wakeup'. Both 'CPU event(x)' and 'sys_wakeup' are fed into an 'EVG' (Event Vector Generator) block containing a 'CPU rising edge detect pulse generator', which outputs 'cn_event'. A legend at the bottom left indicates that logic is duplicated for each CPU. A note at the bottom center states that 'CPU event(x)' is only generated for input events supporting the CPU rxrev generation 'cn_event'. The diagram is labeled MSv60762V1.
Figure 56. Direct event trigger logic CPU wake-up. This block diagram shows the logic for generating CPU events and wake-ups from direct event inputs. On the left, an 'AHB interface' and 'hclk' signal are connected to a 'Peripheral interface' block containing 'CPU interrupt mask register' and 'CPU event mask register'. Below this, a 'Delay' block takes 'hclk' as input. 'Direct event input(x)' signals enter an 'Asynchronous rising edge detect circuit' and a 'Falling edge detect pulse generator', both of which are also connected to 'hclk'. The outputs of these circuits are ANDed with signals from the mask registers. The rising edge path leads to a 'Rising edge detect' block (part of a 'Same circuit for configurable and direct events'), which generates 'CPU event(x)' and 'CPU other events(x,y)'. These are ANDed with the 'CPU event mask register' output to produce 'CPU event(x)'. The falling edge path leads to a 'Synch' block, which generates 'CPU wakeup(x)' and 'CPU other wakeups'. These are ANDed with the 'CPU interrupt mask register' output to produce 'sys_wakeup'. Both 'CPU event(x)' and 'sys_wakeup' are fed into an 'EVG' (Event Vector Generator) block containing a 'CPU rising edge detect pulse generator', which outputs 'cn_event'. A legend at the bottom left indicates that logic is duplicated for each CPU. A note at the bottom center states that 'CPU event(x)' is only generated for input events supporting the CPU rxrev generation 'cn_event'. The diagram is labeled MSv60762V1.

16.5 EXTI functional behavior

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

Once an event input is enabled, the generation of a CPU wake-up is conditioned by the CPU interrupt mask and the CPU event mask.

Table 95. Masking functionality

CPU interrupt enable
EXTI_CnIMRm.IMb
CPU event enable
EXTI_CnEMRm.EMb
Configurable
event inputs
EXTI_PRm.PIFb
it_exti_per(y) (1)CPU eventCPU wake-up
00NoMaskedMaskedMasked
1NoMaskedYesYes

Table 95. Masking functionality (continued)

CPU interrupt enable
EXTI_CnIMRm.IMb
CPU event enable
EXTI_CnEMRm.EMb
Configurable
event inputs
EXTI_PRm.PIFb
it_exti_per(y) (1)CPU n eventCPU n
wake-up
10Status latchedYesMaskedYes (2)
1Status latchedYesYesYes
  1. 1. The single it_exti_per(y) interrupt goes to both CPUs. If no interrupt is required for the CPU n, the it_exti_per(y) interrupt must be masked in the CPU n NVIC.
  2. 2. Only if the CPU interrupt is enabled in EXTI_CnIMRm.IMb.

For configurable event inputs, when the enabled edges occur on the event input, an event request is generated. When the associated it_exti_per(y) interrupt is unmasked, the corresponding pending bit in EXTI_PR is set, the CPU sub-system wakes up and the CPU interrupt signal is activated. The EXTI_PR pending bit must be set to 1 by software. This clears the it_exti_per(y) 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 in the EXTI. When the associated direct event is unmasked in EXTI_IM, the corresponding CPU sub-system wakes up. The CPU is woken up (interrupted) by the peripheral synchronous interrupt.

The CPU event must be unmasked in EXTI_EMR to generate an event. When the enabled edges occur on the event input, a CPU event pulse is generated. There is no event pending bit.

For the configurable event inputs, an event request can be generated by software, setting to 1 the corresponding bit in the interrupt/event register EXTI_SWIER. This allows the generation of a rising edge on the event. The edge event pending bit must be set in EXTI_PR, irrespective of the setting in EXTI_RTSR.

16.6 EXTI registers

The EXTI register map is divided in sections listed in the table below.

Table 96. EXTI register map sections

AddressDescription
0x000 - 0x01CGeneral configurable event [31:0] configuration
0x020 - 0x03CGeneral configurable event [63:32] configuration
0x080 - 0x0BCCPU1 input event configuration
0x0C0 - 0x0FCCPU2 input event configuration

All these registers can be accessed with word (32-bit), half-word (16-bit) and byte (8-bit) access.

16.6.1 EXTI rising trigger selection register (EXTI_RTSR1)

Address offset: 0x000

Reset value: 0x0000 0000

Contains only register bits for configurable events.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.RT22RT21Res.Res.Res.Res.RT16
1514131211109876543210
RT15RT14RT13RT12RT11RT10RT9RT8RT7RT6RT5RT4RT3RT2RT1RT0
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

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

Bit 22 RT22 : rising trigger event configuration bit of configurable event input 22

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

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

Note: The configurable event inputs are edge triggered. No glitch must be generated on these inputs. If a rising edge on the configurable event input occurs while writing to the register, the associated pending bit is not set.

Rising and falling edge triggers can be set for the same configurable event input. In this case, both edges generate a trigger.

Bit 21 RT21 : rising trigger event configuration bit of configurable event input 21

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

Bit 16 RT16 : rising trigger event configuration bit of configurable event input 16

Bit 15 RT15 : rising trigger event configuration bit of configurable event input 15

Bit 14 RT14 : rising trigger event configuration bit of configurable event input 14

Bit 13 RT13 : rising trigger event configuration bit of configurable event input 13

Bit 12 RT12 : rising trigger event configuration bit of configurable event input 12

Bit 11 RT11 : rising trigger event configuration bit of configurable event input 11

Bit 10 RT10 : rising trigger event configuration bit of configurable event input 10

Bit 9 RT9 : rising trigger event configuration bit of configurable event input 9

Bit 8 RT8 : rising trigger event configuration bit of configurable event input 8

Bit 7 RT7 : rising trigger event configuration bit of configurable event input 7

Bit 6 RT6 : rising trigger event configuration bit of configurable event input 6

Bit 5 RT5 : rising trigger event configuration bit of configurable event input 5

Bit 4 RT4 : rising trigger event configuration bit of configurable event input 4

Bit 3 RT3 : rising trigger event configuration bit of configurable event input 3

Bit 2 RT2 : rising trigger event configuration bit of configurable event input 2

Bit 1 RT1 : rising trigger event configuration bit of configurable event input 1

Bit 0 RT0 : rising trigger event configuration bit of configurable event input 0

16.6.2 EXTI falling trigger selection register (EXTI_FTSR1)

Address offset: 0x004

Reset value: 0x0000 0000

Contains only register bits for configurable events.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.FT22FT21Res.Res.Res.Res.FT16
1514131211109876543210
FT15FT14FT13FT12FT11FT10FT9FT8FT7FT6FT5FT4FT3FT2FT1FT0
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

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

Bit 22 FT22 : falling trigger event configuration bit of configurable event input 22

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

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

Note: The configurable event inputs are edge triggered. No glitch must be generated on these inputs. If a falling edge on the configurable event input occurs while writing to the register, the associated pending bit is not set.

Rising and falling edge triggers can be set for the same configurable event input. In this case, both edges generate a trigger.

Bit 21 FT21 : falling trigger event configuration bit of configurable event input 21

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

Bit 16 FT16 : falling trigger event configuration bit of configurable event input 16

Bit 15 FT15 : falling trigger event configuration bit of configurable event input 15

Bit 14 FT14 : falling trigger event configuration bit of configurable event input 14

Bit 13 FT13 : falling trigger event configuration bit of configurable event input 13

Bit 12 FT12 : falling trigger event configuration bit of configurable event input 12

Bit 11 FT11 : falling trigger event configuration bit of configurable event input 11

Bit 10 FT10 : falling trigger event configuration bit of configurable event input 10

Bit 9 FT9 : falling trigger event configuration bit of configurable event input 9

Bit 8 FT8 : falling trigger event configuration bit of configurable event input 8

Bit 7 FT7 : falling trigger event configuration bit of configurable event input 7

Bit 6 FT6 : falling trigger event configuration bit of configurable event input 6

Bit 5 FT5 : falling trigger event configuration bit of configurable event input 5

Bit 4 FT4 : falling trigger event configuration bit of configurable event input 4

Bit 3 FT3 : falling trigger event configuration bit of configurable event input 3

Bit 2 FT2 : falling trigger event configuration bit of configurable event input 2

Bit 1 FT1 : falling trigger event configuration bit of configurable event input 1

Bit 0 FT0 : falling trigger event configuration bit of configurable event input 0

16.6.3 EXTI software interrupt event register (EXTI_SWIER1)

Address offset: 0x008

Reset value: 0x0000 0000

Contains only register bits for configurable events.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.SWI22SWI21Res.Res.Res.Res.SWI16
1514131211109876543210
SWI15SWI14SWI13SWI12SWI11SWI10SWI9SWI8SWI7SWI6SWI5SWI4SWI3SWI2SWI1SWI0
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

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

Bit 22 SWI22 : Software interrupt on line 22

A software interrupt is generated independently from the setting in EXTI_RTSR and EXTI_FTSR. This bit always returns 0 when read.

0: Writing 0 has no effect.

1: Writing 1 to this bit triggers an event on line 22.

This bit is automatically cleared by hardware.

Bit 21 SWI21 : Software interrupt on line 21

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

Bit 16 SWI16 : Software interrupt on line 16

Bit 15 SWI15 : Software interrupt on line 15

Bit 14 SWI14 : Software interrupt on line 14

Bit 13 SWI13 : Software interrupt on line 13

Bit 12 SWI12 : Software interrupt on line 12

Bit 11 SWI11 : Software interrupt on line 11

Bit 10 SWI10 : Software interrupt on line 10

Bit 9 SWI9 : Software interrupt on line 9

Bit 8 SWI8 : Software interrupt on line 8

Bit 7 SWI7 : Software interrupt on line 7

Bit 6 SWI6 : Software interrupt on line 6

Bit 5 SWI5 : Software interrupt on line 5

Bit 4 SWI4 : Software interrupt on line 4

Bit 3 SWI3 : Software interrupt on line 3

Bit 2 SWI2 : Software interrupt on line 2

Bit 1 SWI1 : Software interrupt on line 1

Bit 0 SWI0 : Software interrupt on line 0

16.6.4 EXTI pending register (EXTI_PR1)

Address offset: 0x00C

Reset value: 0x0000 0000

Contains only register bits for configurable events.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.PIF22PIF21Res.Res.Res.Res.PIF16
1514131211109876543210
PIF15PIF14PIF13PIF12PIF11PIF10PIF9PIF8PIF7PIF6PIF5PIF4PIF3PIF2PIF1PIF0
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

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

Bit 22 PIF22 : pending bit on event input 22

These bits are set when the selected edge event or an EXTI_SWIER software trigger arrives on the configurable event line. This bit is cleared by writing 1 to it.

0: No trigger request occurred.

1: Trigger request occurred.

Bit 21 PIF21 : pending bit on event input 21

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

Bit 16 PIF16 : pending bit on event input 16

Bit 15 PIF15 : pending bit on event input 15

Bit 14 PIF14 : pending bit on event input 14

Bit 13 PIF13 : pending bit on event input 13

Bit 12 PIF12 : pending bit on event input 12

Bit 11 PIF11 : pending bit on event input 11

Bit 10 PIF10 : pending bit on event input 10

Bit 9 PIF9 : pending bit on event input 9

Bit 8 PIF8 : pending bit on event input 8

Bit 7 PIF7 : pending bit on event input 7

Bit 6 PIF6 : pending bit on event input 6

Bit 5 PIF5 : pending bit on event input 5

Bit 4 PIF4 : pending bit on event input 4

Bit 3 PIF3 : pending bit on event input 3

Bit 2 PIF2 : pending bit on event input 2

Bit 1 PIF1 : pending bit on event input 1

Bit 0 PIF0 : pending bit on event input 0

16.6.5 EXTI rising trigger selection register (EXTI_RTSR2)

Address offset: 0x020

Reset value: 0x0000 0000

Contains only register bits for configurable events.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.RT45Res.Res.Res.RT41RT40Res.Res.Res.Res.Res.RT34Res.Res.
rwrwrwrw

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

Bit 13 RT45 : rising trigger event configuration bit of configurable event input 45

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

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

Note: The configurable event inputs are edge triggered. No glitch must be generated on these inputs. If a rising edge on the configurable event input occurs while writing to the register, the associated pending bit is not set.

Rising and falling edge triggers can be set for the same configurable event input. In this case, both edges generate a trigger.

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

Bit 9 RT41 : rising trigger event configuration bit of configurable event input 41

Bit 8 RT40 : rising trigger event configuration bit of configurable event input 40

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

Bit 2 RT34 : rising trigger event configuration bit of configurable event input 34

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

16.6.6 EXTI falling trigger selection register (EXTI_FTSR2)

Address offset: 0x024

Reset value: 0x0000 0000

Contains only register bits for configurable events.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.FT45Res.Res.Res.FT41FT40Res.Res.Res.Res.Res.FT34Res.Res.
rwrwrwrw

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

Bit 13 FT45 : falling trigger event configuration bit of configurable event input 45

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

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

Note: The configurable event inputs are edge triggered. No glitch must be generated on these inputs. If a falling edge on the configurable event input occurs while writing to the register, the associated pending bit is not set.

Rising and falling edge triggers can be set for the same configurable event input. In this case, both edges generate a trigger.

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

Bit 9 FT41 : falling trigger event configuration bit of configurable event input 41

Bit 8 FT40 : falling trigger event configuration bit of configurable event input 40

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

Bit 2 FT34 : falling trigger event configuration bit of configurable event input 34

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

16.6.7 EXTI software interrupt event register (EXTI_SWIER2)

Address offset: 0x028

Reset value: 0x0000 0000

Contains only register bits for configurable events.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.SWI45Res.Res.Res.SWI41SWI40Res.Res.Res.Res.Res.SWI34Res.Res.
rwrwrwrw

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

Bit 13 SWI45 : software interrupt on event 45

A software interrupt is generated independently from the setting in EXTI_RTSR and EXTI_FTSR. This bit always returns 0 when read.

0: Writing 0 has no effect.

1: Writing 1 to this bit triggers an event on line 45.

This bit is automatically cleared by hardware.

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

Bit 9 SWI41 : software interrupt on event 41

Bit 8 SWI40 : software interrupt on event 40

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

Bit 2 SWI34 : software interrupt on event 34

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

16.6.8 EXTI pending register (EXTI_PR2)

Address offset: 0x02C

Reset value: 0x0000 0000

Contains only register bits for configurable events.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.PIF45Res.Res.Res.PIF41PIF40Res.Res.Res.Res.Res.PIF34Res.Res.
rwrwrwrw

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

Bit 13 PIF45 : pending bit on event input 45

These bits are set when the selected edge event or an EXTI_SWIER software trigger arrives on the configurable event line. This bit is cleared by writing 1 to it.

0: No trigger request occurred.

1: Trigger request occurred.

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

Bit 9 PIF41 : pending bit on event input 41

Bit 8 PIF40 : pending bit on event input 40

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

Bit 2 PIF34 : pending bit on event input 34

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

16.6.9 EXTI interrupt mask register (EXTI_CnIMR1)

Address offset: Block 1: 0x080

Address offset: Block 2: 0x0C0

Reset value: 0x0000 0000

31302928272625242322212019181716
IM[31:16]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
IM[15:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:0 IM[31:0] : Wake-up with interrupt mask on event input x (x= 31 to 0)

For each bit of this field:

0: Wake-up with interrupt request from line x is masked.

1: Wake-up with Interrupt request from line x is unmasked.

16.6.10 EXTI event mask register (EXTI_CnEMR1)

Address offset: Block 1: 0x084

Address offset: Block 2: 0x0C4

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.EM22EM21EM20EM19EM18EM17Res.
1514131211109876543210
EM15EM14EM13EM12EM11EM10EM9EM8EM7EM6EM5EM4EM3EM2EM1EM0
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

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

Bit 22 EM22 : Wake-up with event generation mask on event input 22

0: Event request from line 22 is masked.

1: Event request from line 22 is unmasked.

Bit 21 EM21 : Wake-up with event generation mask on event input 21

Bit 20 EM20 : Wake-up with event generation mask on event input 20

Bit 19 EM19 : Wake-up with event generation mask on event input 19

Bit 18 EM18 : Wake-up with event generation mask on event input 18

Bit 17 EM17 : Wake-up with event generation mask on event input 17

Bit 16 Reserved, must be kept at reset value.

Bit 15 EM15 : Wake-up with event generation mask on event input 15

Bit 14 EM14 : Wake-up with event generation mask on event input 14

Bit 13 EM13 : Wake-up with event generation mask on event input 13

Bit 12 EM12 : Wake-up with event generation mask on event input 12

Bit 11 EM11 : Wake-up with event generation mask on event input 11

Bit 10 EM10 : Wake-up with event generation mask on event input 10

Bit 9 EM9 : Wake-up with event generation mask on event input 9

Bit 8 EM8 : Wake-up with event generation mask on event input 8

Bit 7 EM7 : Wake-up with event generation mask on event input 7

Bit 6 EM6 : Wake-up with event generation mask on event input 6

Bit 5 EM5 : Wake-up with event generation mask on event input 5

Bit 4 EM4 : Wake-up with event generation mask on event input 4

Bit 3 EM3 : Wake-up with event generation mask on event input 3

Bit 2 EM2 : Wake-up with event generation mask on event input 2

Bit 1 EM1 : Wake-up with event generation mask on event input 1

Bit 0 EM0 : Wake-up with event generation mask on event input 0

16.6.11 EXTI interrupt mask register (EXTI_CnIMR2)

Address offset: Block 1: 0x090

Address offset: Block 2: 0x0D0

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.IM46IM45IM44IM43IM42IM41IM40IM39IM38IM37IM36Res.IM34Res.Res.
rwrwrwrwrwrwrwrwrwrwrwrw

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

Bit 14 IM46 : Wake-up with interrupt mask on event input 46

0: Wake-up with interrupt request from line 46 is masked.

1: Wake-up with interrupt request from line 46 is unmasked.

Bit 13 IM45 : Wake-up with interrupt mask on event input 45

Bit 12 IM44 : Wake-up with interrupt mask on event input 44

Bit 11 IM43 : Wake-up with interrupt mask on event input 43

Bit 10 IM42 : Wake-up with interrupt mask on event input 42

Bit 9 IM41 : Wake-up with interrupt mask on event input 41

Bit 8 IM40 : Wake-up with interrupt mask on event input 40

Bit 7 IM39 : Wake-up with interrupt mask on event input 39

Bit 6 IM38 : Wake-up with interrupt mask on event input 38

Bit 5 IM37 : Wake-up with interrupt mask on event input 37

Bit 4 IM36 : Wake-up with interrupt mask on event input 36

Bit 3 Reserved, must be kept at reset value.

Bit 2 IM34 : Wake-up with interrupt mask on event input 34

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

16.6.12 EXTI event mask register (EXTI_CnEMR2)

Address offset: Block 1: 0x094

Address offset: Block 2: 0x0D4

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

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

Bit 9 EM41 : Wake-up with event generation mask on event input 41

0: Event request from line 41 is masked.

1: Event request from line 41 is unmasked.

Bit 8 EM40 : Wake-up with event generation mask on event input 40

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

16.6.13 EXTI register map

Table 97. EXTI register map and reset values

OffsetRegister name313029282726252423222120191817161514131211109876543210
0x000EXTI_RTSR1Res.Res.Res.Res.Res.Res.Res.Res.Res.RT22RT21Res.Res.Res.Res.RT16RT15RT14RT13RT12RT11RT10RT9RT8RT7RT6RT5RT4RT3RT2RT1RT0
Reset value0000000000000000000
0x004EXTI_FTSR1Res.Res.Res.Res.Res.Res.Res.Res.Res.FT22FT21Res.Res.Res.Res.FT16FT15FT14FT13FT12FT11FT10FT9FT8FT7FT6FT5FT4FT3FT2FT1FT0
Reset value0000000000000000000
0x008EXTI_SWIER1Res.Res.Res.Res.Res.Res.Res.Res.Res.SWI22SWI21Res.Res.Res.Res.SWI16SWI15SWI14SWI13SWI12SWI11SWI10SWI9SWI8SWI7SWI6SWI5SWI4SWI3SWI2SWI1SWI0
Reset value0000000000000000000
0x00CEXTI_PR1Res.Res.Res.Res.Res.Res.Res.Res.Res.PIF22PIF21Res.Res.Res.Res.PIF16PIF15PIF14PIF13PIF12PIF11PIF10PIF9PIF8PIF7PIF6PIF5PIF4PIF3PIF2PIF1PIF0
Reset value0000000000000000000
0x010-
0x01C
ReservedReserved.
0x020EXTI_RTSR2Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.RT45Res.Res.Res.RT41RT40Res.Res.Res.Res.Res.Res.RT34Res.Res.
Reset value0000
0x024EXTI_FTSR2Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.FT45Res.Res.Res.FT41FT40Res.Res.Res.Res.Res.Res.FT34Res.Res.
Reset value0000
0x028EXTI_SWIER2Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.SWI45Res.Res.Res.SWI41SWI40Res.Res.Res.Res.Res.Res.SWI34Res.Res.
Reset value0000
0x02CEXTI_PR2Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.PIF45Res.Res.Res.PIF41PIF40Res.Res.Res.Res.Res.Res.PIF34Res.Res.
Reset value0000
0x030-
0x07C
ReservedReserved.
0x080EXTI_C1IMR1IM31IM30IM29IM28IM27IM26IM25IM24IM23IM22IM21IM20IM19IM18IM17IM16IM15IM14IM13IM12IM11IM10IM9IM8IM7IM6IM5IM4IM3IM2IM1IM0
Reset value00000000000000000000000000000000
0x084EXTI_C1EMR1Res.Res.Res.Res.Res.Res.Res.Res.Res.EM22EM21EM20EM19EM18EM17Res.EM15EM14EM13EM12EM11EM10EM9EM8EM7EM6EM5EM4EM3EM2EM1EM0
Reset value0000000000000000000000
0x08CReservedReserved.
0x090EXTI_C1IMR2Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.IM46IM45IM44IM43IM42IM41IM40IM39IM38IM37IM36Res.IM34Res.Res.
Reset value000000000000
0x094EXTI_C1EMR2Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.EM41EM40Res.Res.Res.Res.Res.Res.Res.Res.Res.
Reset value00
0x098-
0x0BF
ReservedReserved.

Table 97. EXTI register map and reset values (continued)

OffsetRegister name313029282726252423222120191817161514131211109876543210
0x0C0EXTI_C2IMR1IM31IM30IM29IM28IM27IM26IM25IM24IM23IM22IM21IM20IM19IM18IM17IM16IM15IM14IM13IM12IM11IM10IM9IM8IM7IM6IM5IM4IM3IM2IM1IM0
Reset value00000000000000000000000000000000
0x0C4EXTI_C2EMR1Res.Res.Res.Res.Res.Res.Res.Res.Res.EM22EM21EM20EM19EM18EM17Res.EM15EM14EM13EM12EM11EM10EM9EM8EM7EM6EM5EM4EM3EM2EM1EM0
Reset value0000000000000000000000
0x0C8ReservedReserved
0x0D0EXTI_C2IMR2Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.IM46IM45IM44IM46IM42IM41IM40IM39IM38IM37IM36Res.Res.Res.Res.
Reset value00000000000
0x0D4EXTI_C2EMR2Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.EM41EM40Res.Res.Res.Res.Res.Res.Res.Res.
Reset value00

Refer to Section 2.6 for the register boundary addresses.