10. Interrupts and events

This section applies to the whole STM32L1xxxx family, unless otherwise specified.

10.1 Nested vectored interrupt controller (NVIC)

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 the PM0056 programming manual.

10.1.1 SysTick calibration value register

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

10.1.2 Interrupt and exception vectors

Table 49 is the vector table for STM32L1xxxx devices.

Table 49. Vector table (Cat.1 and Cat.2 devices)

PositionPriorityType of priorityAcronymDescriptionAddress
----Reserved0x0000_0000
--3fixedResetReset0x0000_0004
--2fixedNMI_HandlerNon maskable interrupt. The RCC Clock Security System (CSS) is linked to the NMI vector.0x0000_0008
--1fixedHardFault_HandlerAll class of fault0x0000_000C
-0settableMemManage_HandlerMemory management0x0000_0010
-1settableBusFault_HandlerPre-fetch fault, memory access fault0x0000_0014
-2settableUsageFault_HandlerUndefined instruction or illegal state0x0000_0018
----Reserved0x0000_001C - 0x0000_002B

Table 49. Vector table (Cat.1 and Cat.2 devices) (continued)

PositionPriorityType of priorityAcronymDescriptionAddress
-3settableSVC_HandlerSystem service call via SWI instruction0x0000_002C
-4settableDebugMon_HandlerDebug Monitor0x0000_0030
----Reserved0x0000_0034
-5settablePendSV_HandlerPendable request for system service0x0000_0038
-6settableSysTick_HandlerSystem tick timer0x0000_003C
07settableWWDGWindow Watchdog interrupt0x0000_0040
18settablePVDPVD through EXTI Line detection interrupt0x0000_0044
29settableTAMPER_STAMPTamper and TimeStamp through EXTI line interrupts0x0000_0048
310settableRTC_WKUPRTC Wakeup through EXTI line interrupt0x0000_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_Channel1DMA1 Channel1 global interrupt0x0000_006C
1219settableDMA1_Channel2DMA1 Channel2 global interrupt0x0000_0070
1320settableDMA1_Channel3DMA1 Channel3 global interrupt0x0000_0074
1421settableDMA1_Channel4DMA1 Channel4 global interrupt0x0000_0078
1522settableDMA1_Channel5DMA1 Channel5 global interrupt0x0000_007C
1623settableDMA1_Channel6DMA1 Channel6 global interrupt0x0000_0080
1724settableDMA1_Channel7DMA1 Channel7 global interrupt0x0000_0084
1825settableADC1ADC1 global interrupt0x0000_0088
1926settableUSB_HPUSB High priority interrupt0x0000_008C
2027settableUSB_LPUSB Low priority interrupt0x0000_0090
2128settableDACDAC interrupt0x0000_0094
2229settableCOMP, TSC (1)Comparator wakeup through EXTI line (21 and 22) interrupt, touch sense interrupt (1)0x0000_0098
2330settableEXTI9_5EXTI Line[9:5] interrupts0x0000_009C
2431settableLCDLCD global interrupt0x0000_00A0

Table 49. Vector table (Cat.1 and Cat.2 devices) (continued)

PositionPriorityType of priorityAcronymDescriptionAddress
2532settableTIM9TIM9 global interrupt0x0000_00A4
2633settableTIM10TIM10 global interrupt0x0000_00A8
2734settableTIM11TIM11 global 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
4249settableUSB_FS_WKUPUSB Device FS Wakeup through EXTI line interrupt0x0000_00E8
4350settableTIM6TIM6 global interrupt0x0000_00EC
4451settableTIM7TIM7 global interrupt0x0000_00F0

1. Touch sense interrupt is only in Cat.2 devices.

Table 50. Vector table (Cat.3 devices)

PositionPriorityType of priorityAcronymDescriptionAddress
----Reserved0x0000_0000
--3fixedResetReset0x0000_0004
--2fixedNMI_HandlerNon maskable interrupt. The RCC Clock Security System (CSS) is linked to the NMI vector.0x0000_0008
--1fixedHardFault_HandlerAll class of fault0x0000_000C
-0settableMemManage_HandlerMemory management0x0000_0010

Table 50. Vector table (Cat.3 devices) (continued)

PositionPriorityType of priorityAcronymDescriptionAddress
-1settableBusFault_HandlerPre-fetch fault, memory access fault0x0000_0014
-2settableUsageFault_HandlerUndefined instruction or illegal state0x0000_0018
----Reserved0x0000_001C -
0x0000_002B
-3settableSVC_HandlerSystem service call via SWI instruction0x0000_002C
-4settableDebugMon_HandlerDebug Monitor0x0000_0030
----Reserved0x0000_0034
-5settablePendSV_HandlerPendable request for system service0x0000_0038
-6settableSysTick_HandlerSystem tick timer0x0000_003C
07settableWWDGWindow Watchdog interrupt0x0000_0040
18settablePVDPVD through EXTI Line16 detection interrupt0x0000_0044
29settableTAMPER_STAMPTamper, LSECSS and TimeStamp through EXTI line19 interrupts0x0000_0048
310settableRTC_WKUPRTC Wakeup through EXTI line20 interrupt0x0000_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_Channel1DMA1 Channel1 global interrupt0x0000_006C
1219settableDMA1_Channel2DMA1 Channel2 global interrupt0x0000_0070
1320settableDMA1_Channel3DMA1 Channel3 global interrupt0x0000_0074
1421settableDMA1_Channel4DMA1 Channel4 global interrupt0x0000_0078
1522settableDMA1_Channel5DMA1 Channel5 global interrupt0x0000_007C
1623settableDMA1_Channel6DMA1 Channel6 global interrupt0x0000_0080
1724settableDMA1_Channel7DMA1 Channel7 global interrupt0x0000_0084
1825settableADC1ADC1 global interrupt0x0000_0088
1926settableUSB_HPUSB High priority interrupt0x0000_008C
2027settableUSB_LPUSB Low priority interrupt0x0000_0090
2128settableDACDAC interrupt0x0000_0094

Table 50. Vector table (Cat.3 devices) (continued)

PositionPriorityType of priorityAcronymDescriptionAddress
2229settableCOMP/CAComparator wakeup through EXTI line (21 and 22) interrupt/Channel acquisition interrupt0x0000_0098
2330settableEXTI9_5EXTI Line[9:5] interrupts0x0000_009C
2431settableLCDLCD global interrupt0x0000_00A0
2532settableTIM9TIM10 global interrupt0x0000_00A4
2633settableTIM10TIM10 global interrupt0x0000_00A8
2734settableTIM11TIM11 global 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 line17 interrupt0x0000_00E4
4249settableUSB_FS_WKUPUSB Device FS Wakeup through EXTI line18 interrupt0x0000_00E8
4350settableTIM6TIM6 global interrupt0x0000_00EC
4451settableTIM7TIM7 global interrupt0x0000_00F0
4553settableTIM5TIM5 Global interrupt0x0000_00F8
4654settableSPI3SPI3 Global interrupt0x0000_00FC
4757settableDMA2_CH1DMA2 Channel 1 interrupt0x0000_0108
4858settableDMA2_CH2DMA2 Channel 2 interrupt0x0000_010C
4959settableDMA2_CH3DMA2 Channel 3 interrupt0x0000_0110
5060settableDMA2_CH4DMA2 Channel 4 interrupt0x0000_0114
5161settableDMA2_CH5DMA2 Channel 5 interrupt0x0000_0118

Table 50. Vector table (Cat.3 devices) (continued)

PositionPriorityType of priorityAcronymDescriptionAddress
5262settableAESAES global interrupt0x0000_011C
5363settableCOMP_ACQComparator Channel Acquisition Interrupt0x0000_0120

Table 51. Vector table (Cat.4, Cat.5 and Cat.6 devices)

PositionPriorityType of priorityAcronymDescriptionAddress
----Reserved0x0000_0000
--3fixedResetReset0x0000_0004
--2fixedNMI_HandlerNon maskable interrupt. The RCC Clock Security System (CSS) is linked to the NMI vector.0x0000_0008
--1fixedHardFault_HandlerAll class of fault0x0000_000C
-0settableMemManage_HandlerMemory management0x0000_0010
-1settableBusFault_HandlerPre-fetch fault, memory access fault0x0000_0014
-2settableUsageFault_HandlerUndefined instruction or illegal state0x0000_0018
----Reserved0x0000_001C - 0x0000_002B
-3settableSVC_HandlerSystem service call via SWI instruction0x0000_002C
-4settableDebugMon_HandlerDebug Monitor0x0000_0030
----Reserved0x0000_0034
-5settablePendSV_HandlerPendable request for system service0x0000_0038
-6settableSysTick_HandlerSystem tick timer0x0000_003C
07settableWWDGWindow Watchdog interrupt0x0000_0040
18settablePVDPVD through EXTI Line16 detection interrupt0x0000_0044
29settableTAMPER_STAMPTamper, LSECSS and TimeStamp through EXTI line19 interrupts0x0000_0048
310settableRTC_WKUPRTC Wakeup through EXTI line20 interrupt0x0000_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

Table 51. Vector table (Cat.4, Cat.5 and Cat.6 devices) (continued)

PositionPriorityType of priorityAcronymDescriptionAddress
1017settableEXTI4EXTI Line4 interrupt0x0000_0068
1118settableDMA1_Channel1DMA1 Channel1 global interrupt0x0000_006C
1219settableDMA1_Channel2DMA1 Channel2 global interrupt0x0000_0070
1320settableDMA1_Channel3DMA1 Channel3 global interrupt0x0000_0074
1421settableDMA1_Channel4DMA1 Channel4 global interrupt0x0000_0078
1522settableDMA1_Channel5DMA1 Channel5 global interrupt0x0000_007C
1623settableDMA1_Channel6DMA1 Channel6 global interrupt0x0000_0080
1724settableDMA1_Channel7DMA1 Channel7 global interrupt0x0000_0084
1825settableADC1ADC1 global interrupt0x0000_0088
1926settableUSB_HPUSB High priority interrupt0x0000_008C
2027settableUSB_LPUSB Low priority interrupt0x0000_0090
2128settableDACDAC interrupt0x0000_0094
2229settableCOMP/CAComparator wakeup through EXTI line (21 and 22) interrupt/Channel acquisition interrupt0x0000_0098
2330settableEXTI9_5EXTI Line[9:5] interrupts0x0000_009C
2431settableLCDLCD global interrupt0x0000_00A0
2532settableTIM9TIM10 global interrupt0x0000_00A4
2633settableTIM10TIM10 global interrupt0x0000_00A8
2734settableTIM11TIM11 global 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 line17 interrupt0x0000_00E4

Table 51. Vector table (Cat.4, Cat.5 and Cat.6 devices) (continued)

PositionPriorityType of priorityAcronymDescriptionAddress
4249settableUSB_FS_WKUPUSB Device FS Wakeup through EXTI line18 interrupt0x0000_00E8
4350settableTIM6TIM6 global interrupt0x0000_00EC
4451settableTIM7TIM7 global interrupt0x0000_00F0
4552settableSDIOSDIO Global interrupt0x0000_00F4
4653settableTIM5TIM5 Global interrupt0x0000_00F8
4754settableSPI3SPI3 Global interrupt0x0000_00FC
4855settableUART4UART4 Global interrupt0x0000_0100
4956settableUART5UART5 Global interrupt0x0000_0104
5057settableDMA2_CH1DMA2 Channel 1 interrupt0x0000_0108
5158settableDMA2_CH2DMA2 Channel 2 interrupt0x0000_010C
5259settableDMA2_CH3DMA2 Channel 3 interrupt0x0000_0110
5360settableDMA2_CH4DMA2 Channel 4 interrupt0x0000_0114
5461settableDMA2_CH5DMA2 Channel 5 interrupt0x0000_0118
5562settableAESAES global interrupt0x0000_011C
5663settableCOMP_ACQComparator Channel Acquisition Interrupt0x0000_0120

10.2 External interrupt/event controller (EXTI)

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

10.2.1 Main features

The main features of the EXTI controller are the following:

10.2.2 Block diagram

The block diagram is shown in Figure 32 .

Figure 32. External interrupt/event controller block diagram

Figure 32. External interrupt/event controller block diagram. The diagram shows the internal architecture of the external interrupt/event controller. At the top, an 'AMBA APBbus' is connected to a 'Peripheral interface'. The 'Peripheral interface' is also connected to 'PCLK2'. Below the interface are five 24-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' output is connected to the 'NVIC interrupt controller' and also to one input of an AND gate. The 'Interrupt mask register' output is connected to the other input of the same AND gate. The output of this AND gate is connected to one input of an OR gate. The 'Software interrupt event register' output is connected to the other input of the OR gate. The output of the OR gate is connected to a 'Pulse generator' and an 'Edge detect circuit'. The 'Pulse generator' output is connected to the 'NVIC interrupt controller'. The 'Edge detect circuit' is connected to an 'Input Line' and its output is also connected to the 'NVIC interrupt controller'. An 'Event mask register' is connected to the 'Pulse generator' and the 'Edge detect circuit'. The diagram is labeled 'MS19818V1' in the bottom right corner.
Figure 32. External interrupt/event controller block diagram. The diagram shows the internal architecture of the external interrupt/event controller. At the top, an 'AMBA APBbus' is connected to a 'Peripheral interface'. The 'Peripheral interface' is also connected to 'PCLK2'. Below the interface are five 24-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' output is connected to the 'NVIC interrupt controller' and also to one input of an AND gate. The 'Interrupt mask register' output is connected to the other input of the same AND gate. The output of this AND gate is connected to one input of an OR gate. The 'Software interrupt event register' output is connected to the other input of the OR gate. The output of the OR gate is connected to a 'Pulse generator' and an 'Edge detect circuit'. The 'Pulse generator' output is connected to the 'NVIC interrupt controller'. The 'Edge detect circuit' is connected to an 'Input Line' and its output is also connected to the 'NVIC interrupt controller'. An 'Event mask register' is connected to the 'Pulse generator' and the 'Edge detect circuit'. The diagram is labeled 'MS19818V1' in the bottom right corner.

10.2.3 Wakeup event management

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

To use an external line as a wakeup event, refer to Section 10.2.4: Functional description .

10.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' into 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 into the software interrupt/event register.

Hardware interrupt selection

To configure the 24 (or 23 for Cat.1 and Cat.2 devices) lines as interrupt sources, use the following procedure:

Hardware event selection

To configure the 24 (or 23 for Cat.1 and Cat.2 devices) lines as event sources, use the following procedure:

Software interrupt/event selection

The 24 (or 23 for Cat.1 and Cat.2 devices) lines can be configured as software interrupt/event lines. The following is the procedure to generate a software interrupt.

10.2.5 External interrupt/event line mapping

Up to 116 GPIOs are connected to the 16 external interrupt/event lines in the following manner:

Figure 33. External interrupt/event GPIO mapping

Diagram showing external interrupt/event GPIO mapping for EXTI0 through EXTI15. Each EXTI line is shown with its corresponding GPIO pins (e.g., PA0, PB0, etc.) connected to a multiplexer, which is controlled by bits in the SYSCFG_EXTICR registers. The output of each multiplexer is the EXTI line signal.

The diagram illustrates the mapping of various GPIO pins to external interrupt (EXTI) lines through multiplexers. Each multiplexer is controlled by a 4-bit configuration in the SYSCFG_EXTICR registers.

ai17142b

Diagram showing external interrupt/event GPIO mapping for EXTI0 through EXTI15. Each EXTI line is shown with its corresponding GPIO pins (e.g., PA0, PB0, etc.) connected to a multiplexer, which is controlled by bits in the SYSCFG_EXTICR registers. The output of each multiplexer is the EXTI line signal.

The other EXTI lines are connected as follows:

10.3 EXTI registers

Refer to Section 1.2 for a list of abbreviations used in register descriptions.

The peripheral registers have to be accessed by words (32-bit).

10.3.1 EXTI interrupt mask register (EXTI_IMR)

Address offset: 0x00

Reset value: 0x0000 0000

31302928272625242322212019181716
ReservedMR23 (1)MR22MR21MR20MR19MR18MR17MR16
rwrwrwrwrwrwrwrw
1514131211109876543210
MR15MR14MR13MR12MR11MR10MR9MR8MR7MR6MR5MR4MR3MR2MR1MR0
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

1. Only in Cat.3, Cat.4, Cat.5 and Cat.6 devices

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

Bits 23:0 MRx : Interrupt mask on line x

0: Interrupt request from Line x is masked

1: Interrupt request from Line x is not masked

10.3.2 EXTI event mask register (EXTI_EMR)

Address offset: 0x04

Reset value: 0x0000 0000

31302928272625242322212019181716
ReservedMR23 (1)MR22MR21MR20MR19MR18MR17MR16
rwrwrwrwrwrwrwrw
1514131211109876543210
MR15MR14MR13MR12MR11MR10MR9MR8MR7MR6MR5MR4MR3MR2MR1MR0
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

1. Only in Cat.3, Cat.4, Cat.5 and Cat.6 devices

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

Bits 23:0 MRx : Event mask on line x

10.3.3 EXTI rising edge trigger selection register (EXTI_RTSR)

Address offset: 0x08

Reset value: 0x0000 0000

31302928272625242322212019181716
ReservedTR23 (1)TR22TR21TR20TR19TR18TR17TR16
rwrwrwrwrwrwrwrw
1514131211109876543210
TR15TR14TR13TR12TR11TR10TR9TR8TR7TR6TR5TR4TR3TR2TR1TR0
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

1. Only in Cat.3, Cat.4, Cat.5 and Cat.6 devices

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

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

Note: The external wakeup lines are edge triggered, no glitch must be generated on these lines. If a rising edge on the external interrupt line occurs while writing to the EXTI_RTSR 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.

10.3.4 Falling edge trigger selection register (EXTI_FTSR)

Address offset: 0x0C

Reset value: 0x0000 0000

31302928272625242322212019181716
ReservedTR23 (1)TR22TR21TR20TR19TR18TR17TR16
rwrwrwrwrwrwrwrw
1514131211109876543210
TR15TR14TR13TR12TR11TR10TR9TR8TR7TR6TR5TR4TR3TR2TR1TR0
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

1. Only in Cat.3, Cat.4, Cat.5 and Cat.6 devices

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

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

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

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

Note: The external wakeup lines are edge triggered, no glitch must be generated on these lines. If a falling edge on the external interrupt line occurs 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.

10.3.5 EXTI software interrupt event register (EXTI_SWIER)

Address offset: 0x10

Reset value: 0x0000 0000

31302928272625242322212019181716
ReservedSWIER
23 (1)
SWIER
22
SWIER
21
SWIER
20
SWIER
19
SWIER
18
SWIER
17
SWIER
16
rwrwrwrwrwrwrwrw
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

1. Only in Cat.3, Cat.4, Cat.5 and Cat.6 devices

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

Bits 22:0 SWIERx : Software interrupt on line x

If the interrupt is enabled on this line in the EXTI_IMR, writing a '1' to this bit when it is at '0' sets the corresponding pending bit in EXTI_PR resulting in an interrupt request generation.

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

10.3.6 EXTI pending register (EXTI_PR)

Address offset: 0x14
Reset value: undefined

31302928272625242322212019181716
ReservedPR23 (1)PR22PR21PR20PR19PR18PR17PR16
rwrwrc_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

1. Only in Cat.3, Cat.4, Cat.5 and Cat.6 devices

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

Bits 23:0 PRx : Pending bit
0: No trigger request occurred
1: The 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' to the bit.

10.3.7 EXTI register map

The following table gives the EXTI register map and the reset values. The reserved memory areas are highlighted in gray in the table.

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

OffsetRegister313029282726252423222120191817161514131211109876543210
0x00EXTI_IMRReservedMR[23:0]
Reset value000000000000000000000000
0x04EXTI_EMRReservedMR[23:0]
Reset value000000000000000000000000
0x08EXTI_RTSRReservedTR[23:0]
Reset value000000000000000000000000
0x0CEXTI_FTSRReservedTR[23:0]
Reset value000000000000000000000000
0x10EXTI_SWIERReservedSWIER[23:0]
Reset value000000000000000000000000

Table 52. External interrupt/event controller register map and reset values (continued)

OffsetRegister313029282726252423222120191817161514131211109876543210
0x14EXTI_PRReserved
Reset value00000000000000000000000000000000

Refer to Table 5 on page 47 for the register boundary addresses.