12. Interrupts and events

This Section applies to the whole STM32F4xx family, unless otherwise specified.

12.1 Nested vectored interrupt controller (NVIC)

12.1.1 NVIC features

The nested vector interrupt controller NVIC includes the following features:

The NVIC and the processor core interface are closely coupled, which enables low latency interrupt processing and efficient processing of late arriving interrupts.

All interrupts including the core exceptions are managed by the NVIC. For more information on exceptions and NVIC programming, refer to programming manual PM0214.

12.1.2 SysTick calibration value register

The SysTick calibration value is fixed to 18750, which gives a reference time base of 1 ms with the SysTick clock set to 18.75 MHz (HCLK/8, with HCLK set to 150 MHz).

12.1.3 Interrupt and exception vectors

See Table 62 and Table 63 , for the vector table for the STM32F405xx/07xx and STM32F415xx/17xx and STM32F42xxx and STM32F43xxx devices.

12.2 External interrupt/event controller (EXTI)

The external interrupt/event controller consists of up to 23 edge detectors for generating event/interrupt requests. Each input line can be independently configured to select the type (interrupt or event) and the corresponding trigger event (rising or falling or both). Each line can also be masked independently. A pending register maintains the status line of the interrupt requests.

The grey rows in the following tables describe the vectors without specific position.

Table 62. Vector table for STM32F405xx/07xx and STM32F415xx/17xx

PositionPriorityType of priorityAcronymDescriptionAddress
----Reserved0x0000 0000
--3fixedResetReset0x0000 0004
--2fixedNMINon maskable interrupt. The RCC Clock Security System (CSS) is linked to the NMI vector.0x0000 0008
--1fixedHardFaultAll class of fault0x0000 000C
-0settableMemManageMemory management0x0000 0010
-1settableBusFaultPre-fetch fault, memory access fault0x0000 0014
-2settableUsageFaultUndefined instruction or illegal state0x0000 0018
----Reserved0x0000 001C - 0x0000 002B
-3settableSVCallSystem service call via SWI instruction0x0000 002C
-4settableDebug MonitorDebug Monitor0x0000 0030
----Reserved0x0000 0034
-5settablePendSVPendable request for system service0x0000 0038
-6settableSysTickSystem tick timer0x0000 003C
07settableWWDGWindow Watchdog interrupt0x0000 0040
18settablePVDPVD through EXTI line detection interrupt0x0000 0044
29settableTAMP_STAMPTamper and TimeStamp interrupts through the EXTI line0x0000 0048
310settableRTC_WKUPRTC Wake-up interrupt through the EXTI line0x0000 004C
411settableFLASHFlash global interrupt0x0000 0050
512settableRCCRCC global interrupt0x0000 0054
613settableEXTI0EXTI Line0 interrupt0x0000 0058
714settableEXTI1EXTI Line1 interrupt0x0000 005C
815settableEXTI2EXTI Line2 interrupt0x0000 0060
916settableEXTI3EXTI Line3 interrupt0x0000 0064
1017settableEXTI4EXTI Line4 interrupt0x0000 0068
1118settableDMA1_Stream0DMA1 Stream0 global interrupt0x0000 006C

Table 62. Vector table for STM32F405xx/07xx and STM32F415xx/17xx (continued)

PositionPriorityType of priorityAcronymDescriptionAddress
1219settableDMA1_Stream1DMA1 Stream1 global interrupt0x0000 0070
1320settableDMA1_Stream2DMA1 Stream2 global interrupt0x0000 0074
1421settableDMA1_Stream3DMA1 Stream3 global interrupt0x0000 0078
1522settableDMA1_Stream4DMA1 Stream4 global interrupt0x0000 007C
1623settableDMA1_Stream5DMA1 Stream5 global interrupt0x0000 0080
1724settableDMA1_Stream6DMA1 Stream6 global interrupt0x0000 0084
1825settableADCADC1, ADC2 and ADC3 global interrupts0x0000 0088
1926settableCAN1_TXCAN1 TX interrupts0x0000 008C
2027settableCAN1_RX0CAN1 RX0 interrupts0x0000 0090
2128settableCAN1_RX1CAN1 RX1 interrupt0x0000 0094
2229settableCAN1_SCECAN1 SCE interrupt0x0000 0098
2330settableEXTI9_5EXTI Line[9:5] interrupts0x0000 009C
2431settableTIM1_BRK_TIM9TIM1 Break interrupt and TIM9 global interrupt0x0000 00A0
2532settableTIM1_UP_TIM10TIM1 Update interrupt and TIM10 global interrupt0x0000 00A4
2633settableTIM1_TRG_COM_TIM11TIM1 Trigger and Commutation interrupts and TIM11 global interrupt0x0000 00A8
2734settableTIM1_CCTIM1 Capture Compare interrupt0x0000 00AC
2835settableTIM2TIM2 global interrupt0x0000 00B0
2936settableTIM3TIM3 global interrupt0x0000 00B4
3037settableTIM4TIM4 global interrupt0x0000 00B8
3138settableI2C1_EVI 2 C1 event interrupt0x0000 00BC
3239settableI2C1_ERI 2 C1 error interrupt0x0000 00C0
3340settableI2C2_EVI 2 C2 event interrupt0x0000 00C4
3441settableI2C2_ERI 2 C2 error interrupt0x0000 00C8
3542settableSPI1SPI1 global interrupt0x0000 00CC
3643settableSPI2SPI2 global interrupt0x0000 00D0
3744settableUSART1USART1 global interrupt0x0000 00D4
3845settableUSART2USART2 global interrupt0x0000 00D8
3946settableUSART3USART3 global interrupt0x0000 00DC

Table 62. Vector table for STM32F405xx/07xx and STM32F415xx/17xx (continued)

PositionPriorityType of priorityAcronymDescriptionAddress
4047settableEXTI15_10EXTI Line[15:10] interrupts0x0000 00E0
4148settableRTC_AlarmRTC Alarms (A and B) through EXTI line interrupt0x0000 00E4
4249settableOTG_FS_WKUPUSB On-The-Go FS Wake-up through EXTI line interrupt0x0000 00E8
4350settableTIM8_BRK_TIM12TIM8 Break interrupt and TIM12 global interrupt0x0000 00EC
4451settableTIM8_UP_TIM13TIM8 Update interrupt and TIM13 global interrupt0x0000 00F0
4552settableTIM8_TRG_COM_TIM14TIM8 Trigger and Commutation interrupts and TIM14 global interrupt0x0000 00F4
4653settableTIM8_CCTIM8 Capture Compare interrupt0x0000 00F8
4754settableDMA1_Stream7DMA1 Stream7 global interrupt0x0000 00FC
4855settableFSMCFSMC global interrupt0x0000 0100
4956settableSDIOSDIO global interrupt0x0000 0104
5057settableTIM5TIM5 global interrupt0x0000 0108
5158settableSPI3SPI3 global interrupt0x0000 010C
5259settableUART4UART4 global interrupt0x0000 0110
5360settableUART5UART5 global interrupt0x0000 0114
5461settableTIM6_DACTIM6 global interrupt, DAC1 and DAC2 underrun error interrupts0x0000 0118
5562settableTIM7TIM7 global interrupt0x0000 011C
5663settableDMA2_Stream0DMA2 Stream0 global interrupt0x0000 0120
5764settableDMA2_Stream1DMA2 Stream1 global interrupt0x0000 0124
5865settableDMA2_Stream2DMA2 Stream2 global interrupt0x0000 0128
5966settableDMA2_Stream3DMA2 Stream3 global interrupt0x0000 012C
6067settableDMA2_Stream4DMA2 Stream4 global interrupt0x0000 0130
6168settableETHEthernet global interrupt0x0000 0134
6269settableETH_WKUPEthernet Wake-up through EXTI line interrupt0x0000 0138
6370settableCAN2_TXCAN2 TX interrupts0x0000 013C
6471settableCAN2_RX0CAN2 RX0 interrupts0x0000 0140

Table 62. Vector table for STM32F405xx/07xx and STM32F415xx/17xx (continued)

PositionPriorityType of priorityAcronymDescriptionAddress
6572settableCAN2_RX1CAN2 RX1 interrupt0x0000 0144
6673settableCAN2_SCECAN2 SCE interrupt0x0000 0148
6774settableOTG_FSUSB On The Go FS global interrupt0x0000 014C
6875settableDMA2_Stream5DMA2 Stream5 global interrupt0x0000 0150
6976settableDMA2_Stream6DMA2 Stream6 global interrupt0x0000 0154
7077settableDMA2_Stream7DMA2 Stream7 global interrupt0x0000 0158
7178settableUSART6USART6 global interrupt0x0000 015C
7279settableI2C3_EVI 2 C3 event interrupt0x0000 0160
7380settableI2C3_ERI 2 C3 error interrupt0x0000 0164
7481settableOTG_HS_EP1_OUTUSB On The Go HS End Point 1 Out global interrupt0x0000 0168
7582settableOTG_HS_EP1_INUSB On The Go HS End Point 1 In global interrupt0x0000 016C
7683settableOTG_HS_WKUPUSB On The Go HS Wake-up through EXTI interrupt0x0000 0170
7784settableOTG_HSUSB On The Go HS global interrupt0x0000 0174
7885settableDCMIDCMI global interrupt0x0000 0178
7986settableCRYPCRYP crypto global interrupt0x0000 017C
8087settableHASH_RNGHash and Rng global interrupt0x0000 0180
8188settableFPUFPU global interrupt0x0000 0184

Table 63. Vector table for STM32F42xxx and STM32F43xxx

PositionPriorityType of priorityAcronymDescriptionAddress
----Reserved0x0000 0000
--3fixedResetReset0x0000 0004
--2fixedNMINon maskable interrupt, Clock Security System0x0000 0008

Table 63. Vector table for STM32F42xxx and STM32F43xxx (continued)

PositionPriorityType of priorityAcronymDescriptionAddress
--1fixedHardFaultAll class of fault0x0000 000C
-0settableMemManageMemory management0x0000 0010
-1settableBusFaultPre-fetch fault, memory access fault0x0000 0014
-2settableUsageFaultUndefined instruction or illegal state0x0000 0018
----Reserved0x0000 001C -
0x0000 002B
-3settableSVCallSystem Service call via SWI instruction0x0000 002C
-4settableDebug MonitorDebug Monitor0x0000 0030
----Reserved0x0000 0034
-5settablePendSVPendable request for system service0x0000 0038
-6settableSystickSystem tick timer0x0000 003C
07settableWWDGWindow Watchdog interrupt0x0000 0040
18settablePVDPVD through EXTI line detection interrupt0x0000 0044
29settableTAMP_STAMPTamper and TimeStamp interrupts through the EXTI line0x0000 0048
310settableRTC_WKUPRTC Wake-up interrupt through the EXTI line0x0000 004C
411settableFLASHFlash global interrupt0x0000 0050
512settableRCCRCC global interrupt0x0000 0054
613settableEXTI0EXTI Line0 interrupt0x0000 0058
714settableEXTI1EXTI Line1 interrupt0x0000 005C
815settableEXTI2EXTI Line2 interrupt0x0000 0060
916settableEXTI3EXTI Line3 interrupt0x0000 0064
1017settableEXTI4EXTI Line4 interrupt0x0000 0068
1118settableDMA1_Stream0DMA1 Stream0 global interrupt0x0000 006C
1219settableDMA1_Stream1DMA1 Stream1 global interrupt0x0000 0070
1320settableDMA1_Stream2DMA1 Stream2 global interrupt0x0000 0074
1421settableDMA1_Stream3DMA1 Stream3 global interrupt0x0000 0078
1522settableDMA1_Stream4DMA1 Stream4 global interrupt0x0000 007C
1623settableDMA1_Stream5DMA1 Stream5 global interrupt0x0000 0080
1724settableDMA1_Stream6DMA1 Stream6 global interrupt0x0000 0084

Table 63. Vector table for STM32F42xxx and STM32F43xxx (continued)

PositionPriorityType of priorityAcronymDescriptionAddress
1825settableADCADC1, ADC2 and ADC3 global interrupts0x0000 0088
1926settableCAN1_TXCAN1 TX interrupts0x0000 008C
2027settableCAN1_RX0CAN1 RX0 interrupts0x0000 0090
2128settableCAN1_RX1CAN1 RX1 interrupt0x0000 0094
2229settableCAN1_SCECAN1 SCE interrupt0x0000 0098
2330settableEXTI9_5EXTI Line[9:5] interrupts0x0000 009C
2431settableTIM1_BRK_TIM9TIM1 Break interrupt and TIM9 global interrupt0x0000 00A0
2532settableTIM1_UP_TIM10TIM1 Update interrupt and TIM10 global interrupt0x0000 00A4
2633settableTIM1_TRG_COM_TIM11TIM1 Trigger and Commutation interrupts and TIM11 global interrupt0x0000 00A8
2734settableTIM1_CCTIM1 Capture Compare interrupt0x0000 00AC
2835settableTIM2TIM2 global interrupt0x0000 00B0
2936settableTIM3TIM3 global interrupt0x0000 00B4
3037settableTIM4TIM4 global interrupt0x0000 00B8
3138settableI2C1_EVI 2 C1 event interrupt0x0000 00BC
3239settableI2C1_ERI 2 C1 error interrupt0x0000 00C0
3340settableI2C2_EVI 2 C2 event interrupt0x0000 00C4
3441settableI2C2_ERI 2 C2 error interrupt0x0000 00C8
3542settableSPI1SPI1 global interrupt0x0000 00CC
3643settableSPI2SPI2 global interrupt0x0000 00D0
3744settableUSART1USART1 global interrupt0x0000 00D4
3845settableUSART2USART2 global interrupt0x0000 00D8
3946settableUSART3USART3 global interrupt0x0000 00DC
4047settableEXTI15_10EXTI Line[15:10] interrupts0x0000 00E0
4148settableRTC_AlarmRTC Alarms (A and B) through EXTI line interrupt0x0000 00E4
4249settableOTG_FS_WKUPUSB On-The-Go FS Wake-up through EXTI line interrupt0x0000 00E8
4350settableTIM8_BRK_TIM12TIM8 Break interrupt and TIM12 global interrupt0x0000 00EC

Table 63. Vector table for STM32F42xxx and STM32F43xxx (continued)

PositionPriorityType of priorityAcronymDescriptionAddress
4451settableTIM8_UP_TIM13TIM8 Update interrupt and TIM13 global interrupt0x0000 00F0
4552settableTIM8_TRG_COM_TIM14TIM8 Trigger and Commutation interrupts and TIM14 global interrupt0x0000 00F4
4653settableTIM8_CCTIM8 Capture Compare interrupt0x0000 00F8
4754settableDMA1_Stream7DMA1 Stream7 global interrupt0x0000 00FC
4855settableFSMCFSMC global interrupt0x0000 0100
4956settableSDIOSDIO global interrupt0x0000 0104
5057settableTIM5TIM5 global interrupt0x0000 0108
5158settableSPI3SPI3 global interrupt0x0000 010C
5259settableUART4UART4 global interrupt0x0000 0110
5360settableUART5UART5 global interrupt0x0000 0114
5461settableTIM6_DACTIM6 global interrupt, DAC1 and DAC2 underrun error interrupts0x0000 0118
5562settableTIM7TIM7 global interrupt0x0000 011C
5663settableDMA2_Stream0DMA2 Stream0 global interrupt0x0000 0120
5764settableDMA2_Stream1DMA2 Stream1 global interrupt0x0000 0124
5865settableDMA2_Stream2DMA2 Stream2 global interrupt0x0000 0128
5966settableDMA2_Stream3DMA2 Stream3 global interrupt0x0000 012C
6067settableDMA2_Stream4DMA2 Stream4 global interrupt0x0000 0130
6168settableETHEthernet global interrupt0x0000 0134
6269settableETH_WKUPEthernet Wake-up through EXTI line interrupt0x0000 0138
6370settableCAN2_TXCAN2 TX interrupts0x0000 013C
6471settableCAN2_RX0CAN2 RX0 interrupts0x0000 0140
6572settableCAN2_RX1CAN2 RX1 interrupt0x0000 0144
6673settableCAN2_SCECAN2 SCE interrupt0x0000 0148
6774settableOTG_FSUSB On The Go FS global interrupt0x0000 014C
6875settableDMA2_Stream5DMA2 Stream5 global interrupt0x0000 0150
6976settableDMA2_Stream6DMA2 Stream6 global interrupt0x0000 0154
7077settableDMA2_Stream7DMA2 Stream7 global interrupt0x0000 0158
7178settableUSART6USART6 global interrupt0x0000 015C

Table 63. Vector table for STM32F42xxx and STM32F43xxx (continued)

PositionPriorityType of priorityAcronymDescriptionAddress
7279settableI2C3_EVI 2 C3 event interrupt0x0000 0160
7380settableI2C3_ERI 2 C3 error interrupt0x0000 0164
7481settableOTG_HS_EP1_OUTUSB On The Go HS End Point 1 Out global interrupt0x0000 0168
7582settableOTG_HS_EP1_INUSB On The Go HS End Point 1 In global interrupt0x0000 016C
7683settableOTG_HS_WKUPUSB On The Go HS Wake-up through EXTI interrupt0x0000 0170
7784settableOTG_HSUSB On The Go HS global interrupt0x0000 0174
7885settableDCMIDCMI global interrupt0x0000 0178
7986settableCRYPCRYP crypto global interrupt0x0000 017C
8087settableHASH_RNGHash and Rng global interrupt0x0000 0180
8188SettableFPUFPU global interrupt0x0000 0184
8289settableUART7UART 7 global interrupt0x0000 0188
8390settableUART8UART 8 global interrupt0x0000 018C
8491settableSPI4SPI 4 global interrupt0x0000 0190
8592settableSPI5SPI 5 global interrupt0x0000 0194
8693settableSPI6SPI 6 global interrupt0x0000 0198
8794settableSAI1SAI1 global interrupt0x0000 019C
8895settableLCD-TFTLTDC global interrupt0x0000 01A0
8996settableLCD-TFTLTDC global Error interrupt0x0000 01A4
9097settableDMA2DDMA2D global interrupt0x0000 01A8

12.2.1 EXTI main features

The main features of the EXTI controller are the following:

12.2.2 EXTI block diagram

Figure 41 shows the block diagram.

Block diagram of the External Interrupt/Event Controller (EXTI). The diagram shows the internal architecture of the EXTI. At the top, an AMBA APB bus is connected to a Peripheral interface. The Peripheral interface is also connected to PCLK2. Below the interface, there are five 23-bit wide registers: Pending request register, Interrupt mask register, Software interrupt event register, Rising trigger selection register, and Falling trigger selection register. The Pending request register is connected to the NVIC interrupt controller. The Interrupt mask register, Software interrupt event register, Rising trigger selection register, and Falling trigger selection register are connected to an Edge detect circuit. The Edge detect circuit is connected to an Input line. The Output of the Edge detect circuit is connected to a Pulse generator and an Event mask register. The Output of the Pulse generator is connected to the Pending request register. The Output of the Event mask register is connected to the Pending request register. The code MS32662V1 is shown in the bottom right corner.

Figure 41. External interrupt/event controller block diagram

Block diagram of the External Interrupt/Event Controller (EXTI). The diagram shows the internal architecture of the EXTI. At the top, an AMBA APB bus is connected to a Peripheral interface. The Peripheral interface is also connected to PCLK2. Below the interface, there are five 23-bit wide registers: Pending request register, Interrupt mask register, Software interrupt event register, Rising trigger selection register, and Falling trigger selection register. The Pending request register is connected to the NVIC interrupt controller. The Interrupt mask register, Software interrupt event register, Rising trigger selection register, and Falling trigger selection register are connected to an Edge detect circuit. The Edge detect circuit is connected to an Input line. The Output of the Edge detect circuit is connected to a Pulse generator and an Event mask register. The Output of the Pulse generator is connected to the Pending request register. The Output of the Event mask register is connected to the Pending request register. The code MS32662V1 is shown in the bottom right corner.

12.2.3 Wake-up event management

The STM32F4xx are able to handle external or internal events in order to wake up the core (WFE). The wake-up event can be generated either by:

To use an external line as a wake-up event, refer to Section 12.2.4: Functional description .

12.2.4 Functional description

To generate the interrupt, the interrupt line should be configured and enabled. This is done by programming the two trigger registers with the desired edge detection and by enabling the interrupt request by writing a '1' to the corresponding bit in the interrupt mask register. When the selected edge occurs on the external interrupt line, an interrupt request is

generated. The pending bit corresponding to the interrupt line is also set. This request is reset by writing a '1' in the pending register.

To generate the event, the event line should be configured and enabled. This is done by programming the two trigger registers with the desired edge detection and by enabling the event request by writing a '1' to the corresponding bit in the event mask register. When the selected edge occurs on the event line, an event pulse is generated. The pending bit corresponding to the event line is not set.

An interrupt/event request can also be generated by software by writing a '1' in the software interrupt/event register.

Hardware interrupt selection

To configure the 23 lines as interrupt sources, use the following procedure:

Hardware event selection

To configure the 23 lines as event sources, use the following procedure:

Software interrupt/event selection

The 23 lines can be configured as software interrupt/event lines. The following is the procedure to generate a software interrupt.

12.2.5 External interrupt/event line mapping

Up to 140 GPIOs (STM32F405xx/07xx and STM32F415xx/17xx), 168 GPIOs (STM32F42xxx and STM32F43xxx) are connected to the 16 external interrupt/event lines in the following manner:

Figure 42. External interrupt/event GPIO mapping (STM32F405xx/07xx and STM32F415xx/17xx)

Diagram showing the mapping of GPIOs to external interrupt lines (EXTI0, EXTI1, ..., EXTI15) via multiplexers controlled by SYSCFG_EXTICR registers.

The diagram illustrates the mapping of GPIOs to external interrupt lines (EXTI0 through EXTI15) using multiplexers. Each multiplexer is controlled by a specific register: EXTI0[3:0] bits in the SYSCFG_EXTICR1 register for EXTI0, EXTI1[3:0] bits in the SYSCFG_EXTICR1 register for EXTI1, and EXTI15[3:0] bits in the SYSCFG_EXTICR4 register for EXTI15. The inputs to each multiplexer are GPIOs from different ports (A, B, C, D, E, F, G, H, I) at the same pin number. For example, EXTI0 can be connected to PA0, PB0, PC0, PD0, PE0, PF0, PG0, PH0, or PI0. The output of each multiplexer is the corresponding EXTI line. Vertical ellipses between EXTI1 and EXTI15 indicate that the same pattern repeats for all 16 lines.

ai15897

Diagram showing the mapping of GPIOs to external interrupt lines (EXTI0, EXTI1, ..., EXTI15) via multiplexers controlled by SYSCFG_EXTICR registers.

Figure 43. External interrupt/event GPIO mapping (STM32F42xxx and STM32F43xxx)

Diagram showing external interrupt/event GPIO mapping for STM32F42xxx and STM32F43xxx. It illustrates three multiplexers: EXTI0, EXTI1, and EXTI15. EXTI0 is controlled by SYSCFG_EXTICR1 bits [3:0] and maps PA0, PB0, PC0, PD0, PE0, PF0, PG0, PH0, PI0, PJ0, and PK0. EXTI1 is controlled by SYSCFG_EXTICR1 bits [3:0] and maps PA1, PB1, PC1, PD1, PE1, PF1, PG1, PH1, PI1, PJ1, and PK1. EXTI15 is controlled by SYSCFG_EXTICR4 bits [3:0] and maps PA15, PB15, PC15, PD15, PE15, PF15, PG15, PH15, and PJ15.

EXTI0[3:0] bits in the SYSCFG_EXTICR1 register

PA0 □
PB0 □
PC0 □
PD0 □
PE0 □
PF0 □
PG0 □
PH0 □
PI0 □
PJ0 □
PK0 □

EXTI0

EXTI1[3:0] bits in the SYSCFG_EXTICR1 register

PA1 □
PB1 □
PC1 □
PD1 □
PE1 □
PF1 □
PG1 □
PH1 □
PI1 □
PJ1 □
PK1 □

EXTI1

EXTI15[3:0] bits in the SYSCFG_EXTICR4 register

PA15 □
PB15 □
PC15 □
PD15 □
PE15 □
PF15 □
PG15 □
PH15 □
PJ15 □

EXTI15

MS30440V1

Diagram showing external interrupt/event GPIO mapping for STM32F42xxx and STM32F43xxx. It illustrates three multiplexers: EXTI0, EXTI1, and EXTI15. EXTI0 is controlled by SYSCFG_EXTICR1 bits [3:0] and maps PA0, PB0, PC0, PD0, PE0, PF0, PG0, PH0, PI0, PJ0, and PK0. EXTI1 is controlled by SYSCFG_EXTICR1 bits [3:0] and maps PA1, PB1, PC1, PD1, PE1, PF1, PG1, PH1, PI1, PJ1, and PK1. EXTI15 is controlled by SYSCFG_EXTICR4 bits [3:0] and maps PA15, PB15, PC15, PD15, PE15, PF15, PG15, PH15, and PJ15.

The seven other EXTI lines are connected as follows:

12.3 EXTI registers

Refer to Section 1.1: List of abbreviations for registers for a list of abbreviations used in register descriptions.

12.3.1 Interrupt mask register (EXTI_IMR)

Address offset: 0x00

Reset value: 0x0000 0000

31302928272625242322212019181716
ReservedMR22MR21MR20MR19MR18MR17MR16
rwrwrwrwrwrwrw
1514131211109876543210
MR15MR14MR13MR12MR11MR10MR9MR8MR7MR6MR5MR4MR3MR2MR1MR0
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

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

Bits 22:0 MRx : Interrupt mask on line x

0: Interrupt request from line x is masked

1: Interrupt request from line x is not masked

12.3.2 Event mask register (EXTI_EMR)

Address offset: 0x04

Reset value: 0x0000 0000

31302928272625242322212019181716
ReservedMR22MR21MR20MR19MR18MR17MR16
rwrwrwrwrwrwrw
1514131211109876543210
MR15MR14MR13MR12MR11MR10MR9MR8MR7MR6MR5MR4MR3MR2MR1MR0
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

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

Bits 22:0 MRx : Event mask on line x

0: Event request from line x is masked

1: Event request from line x is not masked

12.3.3 Rising trigger selection register (EXTI_RTSR)

Address offset: 0x08
Reset value: 0x0000 0000

31302928272625242322212019181716
ReservedTR22TR21TR20TR19TR18TR17TR16
rwrwrwrwrwrwrw
1514131211109876543210
TR15TR14TR13TR12TR11TR10TR9TR8TR7TR6TR5TR4TR3TR2TR1TR0
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

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

Bits 22:0 TRx : Rising trigger event configuration bit of line x

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

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

Note: The external wake-up lines are edge triggered, no glitch must be generated on these lines. If a rising edge occurs on the external interrupt line while writing to the EXTI_RTSR register, the pending bit is set.

Rising and falling edge triggers can be set for the same interrupt line. In this configuration, both generate a trigger condition.

12.3.4 Falling trigger selection register (EXTI_FTSR)

Address offset: 0x0C
Reset value: 0x0000 0000

31302928272625242322212019181716
ReservedTR22TR21TR20TR19TR18TR17TR16
rwrwrwrwrwrwrw
1514131211109876543210
TR15TR14TR13TR12TR11TR10TR9TR8TR7TR6TR5TR4TR3TR2TR1TR0
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

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

Bits 22:0 TRx : Falling trigger event configuration bit of line x

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

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

Note: The external wake-up lines are edge triggered, no glitch must be generated on these lines. If a falling edge occurs on the external interrupt line while writing to the EXTI_FTSR register, the pending bit is not set.

Rising and falling edge triggers can be set for the same interrupt line. In this configuration, both generate a trigger condition.

12.3.5 Software interrupt event register (EXTI_SWIER)

Address offset: 0x10

Reset value: 0x0000 0000

31302928272625242322212019181716
ReservedSWIER
22
SWIER
21
SWIER
20
SWIER
19
SWIER
18
SWIER
17
SWIER
16
rwrwrwrwrwrwrw
1514131211109876543210
SWIER
15
SWIER
14
SWIER
13
SWIER
12
SWIER
11
SWIER
10
SWIER
9
SWIER
8
SWIER
7
SWIER
6
SWIER
5
SWIER
4
SWIER
3
SWIER
2
SWIER
1
SWIER
0
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

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

Bits 22:0 SWIERx : Software Interrupt on line x

If interrupt are enabled on line x in the EXTI_IMR register, writing '1' to SWIERx bit when it is set at '0' sets the corresponding pending bit in the EXTI_PR register, thus resulting in an interrupt request generation.

This bit is cleared by clearing the corresponding bit in EXTI_PR (by writing a 1 to the bit).

12.3.6 Pending register (EXTI_PR)

Address offset: 0x14

Reset value: 0x0000 0000

31302928272625242322212019181716
ReservedPR22PR21PR20PR19PR18PR17PR16
rc_w1rc_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:23 Reserved, must be kept at reset value.

Bits 22:0 PRx : 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 programming it to '1'.

12.3.7 EXTI register map

Table 65 gives the EXTI register map and the reset values.

Table 64. External interrupt/event controller register map and reset values

OffsetRegister313029282726252423222120191817161514131211109876543210
0x00EXTI_IMRReservedMR[22:0]
Reset value
0x04EXTI_EMRReservedMR[22:0]
Reset value
0x08EXTI_RTSRReservedTR[22:0]
Reset value
0x0CEXTI_FTSRReservedTR[22:0]
Reset value
0x10EXTI_SWIERReservedSWIER[22:0]
Reset value
0x14EXTI_PRReservedPR[22:0]
Reset value

Refer to Section 2.3: Memory map for the register boundary addresses.