13. Nested vectored interrupt controller (NVIC)

13.1 NVIC main features

The CPU1 NVIC features:

The CPU2 NVIC features:

The NVICs and the processor cores interfaces are closely coupled, resulting in 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 STM32 Cortex ® -M4 MCUs and MPUs programming manual (PM0214) for Cortex ® -M4, and Cortex ® -M0+ programming manual for STM32L0, STM32G0, STM32WL and STM32WB Series (PM0223) for Cortex ® -M0+.

13.2 Interrupt block diagram

The different peripheral interrupts are connected in different ways, depending on the sharing between the two CPUs. To prevent a peripheral or EXTI interrupt to trigger both CPUs, they can be masked either in the NVIC, or, for the NVIC vector sharing multiple peripheral interrupts, by a pre-mask in the SYSCFG registers, see Section 10: System configuration controller (SYSCFG) .

The interrupt block diagram is shown in Figure 26 .

Figure 26. Interrupt block diagram

Figure 26. Interrupt block diagram

The diagram shows the interrupt signal routing for a dual-core system (CPU1 and CPU2). The components and connections are as follows:

Reference: MS45410V2

Figure 26. Interrupt block diagram

13.3 Interrupt and exception vectors

Each of the CPU1 and CPU2 has its own vector table, see, respectively, Table 53 and Table 54 , where shaded cells indicate the processor exceptions.

Table 53. CPU1 vector table

PositionPriorityType of priorityAcronymDescriptionAddress
----Reserved0x0000 0000
--3FixedResetReset0x0000 0004
--2FixedNMINon maskable interrupt HSE CSS, Flash ECC, and SRAM2 parity0x0000 0008
--1FixedHardFaultAll classes of fault0x0000 000C
-0SettableMemManagerMemory manager0x0000 0010
-1SettableBusFaultPre-fetch fault, memory access fault0x0000 0014
-2SettableUsageFaultUndefined instruction or illegal state0x0000 0018
----Reserved0x0000 001C
0x0000 0028
-3SettableSVCallSystem service call via SWI instruction0x0000 002C
-4SettableDebugDebug monitor0x0000 0030
----Reserved0x0000 0034
-5SettablePendSVPendable request for system service0x0000 0038
-6SettableSystickSystem tick timer0x0000 003C
07SettableWWDGWindow watchdog early wakeup0x0000 0040
18SettablePVDPVD through EXTI[16] (C1IMR2[20])0x0000 0044
29SettableTAMP, RTC_STAMP, LSE_CSSTamper, TimeStamp, LSECSS interrupt through EXTI[18]0x0000 0048
310SettableRTC_WKUPRTC wakeup interrupt through EXTI[19]0x0000 004C
411SettableFlashFlash memory global interrupt and Flash memory ECC single error interrupt0x0000 0050
512SettableRCCRCC global interrupt0x0000 0054
613SettableEXTI0EXTI line 0 interrupt through EXTI[0]0x0000 0058
714SettableEXTI1EXTI line 1 interrupt through EXTI[1]0x0000 005C
815SettableEXTI2EXTI line 2 interrupt through EXTI[2]0x0000 0060
916SettableEXTI3EXTI line 3 interrupt through EXTI[3]0x0000 0064
1017SettableEXTI4EXTI line 4 interrupt through EXTI[4]0x0000 0068
1118SettableDMA1_CH1DMA1 channel 1 interrupt0x0000 006C
1219SettableDMA1_CH2DMA1 channel 2 interrupt0x0000 0070
1320SettableDMA1_CH3DMA1 channel 3 interrupt0x0000 0074
1421SettableDMA1_CH4DMA1 channel 4 interrupt0x0000 0078
1522SettableDMA1_CH5DMA1 channel 5 interrupt0x0000 007C
1623SettableDMA1_CH6DMA1 channel 6 interrupt0x0000 0080
1724SettableDMA1_CH7DMA1 channel 7 interrupt0x0000 0084

Table 53. CPU1 vector table (continued)

PositionPriorityType of priorityAcronymDescriptionAddress
1825SettableADC1ADC1 global interrupt0x0000 0088
1926--Reserved0x0000 008C
2027--Reserved0x0000 0090
2128SettableC2SEV
PWR_C2H
CPU2 SEV through EXTI[40]
PWR CPU2 HOLD wakeup interrupt
0x0000 0094
2229--Reserved0x0000 0098
2330SettableEXTI[9:5]EXTI line [9:5] interrupt through EXTI[9:5]
(C1IMR1[25:21])
0x0000 009C
2431SettableTIM1_BRKTimer 1 break interrupt0x0000 00A0
2532SettableTIM1_UPTimer 1 update (C1IMR1[13])0x0000 00A4
2633SettableTIM1_TRG_COMTimer 1 trigger and communication (C1IMR1[13])0x0000 00A8
2734SettableTIM1_CCTimer 1 capture compare interrupt0x0000 00AC
2835SettableTIM2Timer 2 global interrupt0x0000 00B0
2936SettablePKAPrivate key accelerator interrupt0x0000 00B4
3037SettableI2C1_EVI2C1 event interrupt0x0000 00B8
3138SettableI2C1_ERI2C1 error interrupt0x0000 00BC
3239--Reserved0x0000 00C0
3340--Reserved0x0000 00C4
3441SettableSPI1SPI 1 global interrupt0x0000 00C8
3542--Reserved0x0000 00CC
3643SettableUSART1USART1 global interrupt0x0000 00D0
3744--Reserved0x0000 00D4
3845--Reserved0x0000 00D8
3946SettableTSCTSC global interrupt0x0000 00DC
4047SettableEXTI[15:10]EXTI line [15:10] interrupt through EXTI[15:10]
(C1IMR1[31:26])
0x0000 00E0
4148SettableRTC_ALARMRTC alarms (A and B) interrupt through EXTI[17]0x0000 00E4
4249--Reserved0x0000 00E8
4350SettablePWR_SOTF
PWR_BLEACT
PWR_RFPHASE
PWR switching on the fly interrupt
PWR end of BLE activity interrupt
PWR end of critical radio phase interrupt
0x0000 00EC
4451SettableIPCC_C1_RX_ITIPCC CPU1 RX occupied interrupt0x0000 00F0
4552SettableIPCC_C1_TX_ITIPCC CPU1 TX free interrupt0x0000 00F4
4653SettableHSEMSemaphore interrupt 0 to CPU10x0000 00F8
4754SettableLPTIM1LPtimer 1 global interrupt0x0000 00FC

Table 53. CPU1 vector table (continued)

PositionPriorityType of priorityAcronymDescriptionAddress
4855SettableLPTIM2LPtimer 2 global interrupt0x0000 0100
4956--Reserved0x0000 0104
5057--Reserved0x0000 0108
5158--Reserved0x0000 010C
5259SettableAES2AES2 global interrupt0x0000 0110
5360SettableTrue RNGTrue random number generator interrupt0x0000 0114
5461SettableFPUFloating point unit interrupt0x0000 0118
5562--Reserved0x0000 011C
5663--Reserved0x0000 0120
5764--Reserved0x0000 0124
5865--Reserved0x0000 0128
5966--Reserved0x0000 012C
6067--Reserved0x0000 0130
6168--Reserved0x0000 0134
6269SettableDMAMUX1_OVRDMAMUX1 overrun interrupt0x0000 0138

Table 54. CPU2 vector table

PositionPriorityType of priorityAcronymDescriptionAddress
----Reserved0x0000 0000
--3FixedResetReset0x0000 0004
-14-2FixedNMINon maskable interrupt HSE CSS, Flash ECC, and SRAM2 parity0x0000 0008
-13-1FixedHardFaultAll classes of fault0x0000 000C
----Reserved0x0000 0010
0x0000 0028
-50SettableSVCallSystem service call via SWI instruction0x0000 002C
----Reserved0x0000 0030
0x0000 0034
-21SettablePendSVPendable request for system service0x0000 0038
-12SettableSystickSystem tick timer0x0000 003C
03Settable-Reserved0x0000 0040
14SettablePVDPVD through EXTI[16] (C2IMR2[20])0x0000 0044
25SettableRTC_WKUP, TAMP,
RTC_STAMP
LSE_CSS,
RTC_ALARM
RTC wakeup interrupt through EXTI[19] (C2IMR1[3])
Tamper, TimeStamp
LSECSS interrupt through EXTI[18] (C2IMR1[0])
RTC alarms (A and B) interrupt through EXTI[17] (C2IMR1[4])
0x0000 0048
36--Reserved0x0000 004C
47SettableRCC
FLASH
C1SEV
RCC global interrupt (C2IMR1[5])
Flash memory global interrupt and Flash memory ECC single error interrupt (C2IMR1[6])
CPU1 SEV through EXTI[41]
0x0000 0050
58SettableEXTI[1:0]EXTI line 1:0 interrupt through EXTI[1:0] (C2IMR1[17:16])0x0000 0054
69SettableEXTI[3:2]EXTI line 3:2 interrupt through EXTI[3:2] (C2IMR1[19:18])0x0000 0058
710SettableEXTI[15:4]EXTI line 15:4 interrupt through EXTI[15:4] (C2IMR1[31:20])0x0000 005C
811SettableTSCTSC global interrupt (C2IMR2[21])0x0000 0060
912SettableDMA1_CH[3:1]DMA1 channel 3:1 interrupt (C2IMR2[2:0])0x0000 0064
1013SettableDMA1_CH[7:4]DMA1 channel 7:4 interrupt (C2IMR2[6:3])0x0000 0068
1114SettableDMAMUX1_OVRDMAMUX1 overrun interrupt (C2IMR2[15])0x0000 006C
1215SettableADC1ADC1 global interrupt (C2IMR1[12])0x0000 0070
1316SettableLPTIM1LP timer 1 global interrupt0x0000 0074
1417SettableLPTIM2LP timer 2 global interrupt0x0000 0078

Table 54. CPU2 vector table (continued)

PositionPriorityType of priorityAcronymDescriptionAddress
1518SettableTIM1_BRK,
TIM1_UP,
TIM1_TRG_COM,
TIM1_CC
Timer 1 break, update, trigger and communication, capture compare interrupt0x0000 007C
1619SettableTIM2Timer 2 global interrupt0x0000 0080
1720--Reserved0x0000 0084
1821--Reserved0x0000 0088
1922SettableIPCC_C2_RX_IT
IPCC_C2_TX_IT
HSEM
IPCC CPU2 RX occupied interrupt
IPCC CPU2 TX free interrupt
Semaphore interrupt 1 o CPU2
0x0000 008C
2023SettablePKA
True RNG
Private key accelerator interrupt (C2IMR1[8])
True random number generator interrupt (C2IMR1[9])
0x0000 0090
2124SettableAES2AES2 global interrupt0x0000 0094
2225--Reserved0x0000 0098
2326SettableI2C1_EV
I2C1_ER
I2C1 event interrupt
I2C1 error interrupt
0x0000 009C
2427--Reserved0x0000 00A0
2528SettableSPI1SPI1 global interrupt0x0000 00A4
2629--Reserved0x0000 00A8
2730SettableUSART1USART1 global interrupt0x0000 00AC
2831--Reserved0x0000 00B0
2932--Reserved0x0000 00B4
3033SettableBLE_BLUE_IT
BLE_RFC_IT
BLE_RFFMS_IT
BLE_HOST_WKUP
BLE blue controller interrupt
BLE radio control interrupt
BLE radio states interrupt
BLE host wakeup interrupt
0x0000 00B8
3134--Reserved0x0000 00BC

13.4 Interrupt list

The device wakeup sources are listed in Table 55 . Depending on its origin, the wakeup is handled according to different types, see Section 14.4: EXTI functional behavior for more information.

Some wakeup sources are able to generate an event to the CPUs. see Event column.

The wakeup source capability to wakeup CPU1 and or CPU2 is listed in Wakeup column.

For CPUs interrupt handling see Section 13: Nested vectored interrupt controller (NVIC) .

For Wakeup handling see Section 14: Extended interrupt and event controller (EXTI) .

Table 55. Wakeup interrupt table

EXTI no.AcronymDescriptionEXTI typeEventWakeup
0EXTI[0]EXTI line 0 from SYSCFGConfigurable AYesCPU1 and CPU2
1EXTI[1]EXTI line 1 from SYSCFGConfigurable AYesCPU1 and CPU2
2EXTI[2]EXTI line 2 from SYSCFGConfigurable AYesCPU1 and CPU2
3EXTI[3]EXTI line 3 from SYSCFGConfigurable AYesCPU1 and CPU2
4EXTI[4]EXTI line 4 from SYSCFGConfigurable AYesCPU1 and CPU2
5EXTI[5]EXTI line 5 from SYSCFGConfigurable AYesCPU1 and CPU2
6EXTI[6]EXTI line 6 from SYSCFGConfigurable AYesCPU1 and CPU2
7EXTI[7]EXTI line 7 from SYSCFGConfigurable AYesCPU1 and CPU2
8EXTI[8]EXTI line 8 from SYSCFGConfigurable AYesCPU1 and CPU2
9EXTI[8]EXTI line 9 from SYSCFGConfigurable AYesCPU1 and CPU2
10EXTI[10]EXTI line 10 from SYSCFGConfigurable AYesCPU1 and CPU2
11EXTI[11]EXTI line 11 from SYSCFGConfigurable AYesCPU1 and CPU2
12EXTI[12]EXTI line 12 from SYSCFGConfigurable AYesCPU1 and CPU2
13EXTI[13]EXTI line 13 from SYSCFGConfigurable AYesCPU1 and CPU2
14EXTI[14]EXTI line 14 from SYSCFGConfigurable AYesCPU1 and CPU2
15EXTI[15]EXTI line 15 from SYSCFGConfigurable AYesCPU1 and CPU2
16PVDPVD lineConfigurable ANoCPU1 and CPU2
17RTC_ALARMRTC Alarms (A and B) interruptConfigurable AYesCPU1 and CPU2
18TAMP, RTC_STAMP,
LSE_CSS
RTC Tamper interrupt
RTC TimeStamp interrupt
RCC LSECSS interrupt
Configurable AYesCPU1 and CPU2
19RTC_WKUPRTC wakeup interruptConfigurable AYesCPU1 and CPU2
20Reserved----
21Reserved----
22I2C1 wakeupI2C1 wakeupDirect BNoCPU1 and CPU2
23Reserved----
24USART1USART1 wakeupDirect BNoCPU1 and CPU2
25Reserved----
26Reserved----
27Reserved----
28Reserved----
29LPTIM1 wakeupLP timer 1 wakeupDirect BNoCPU1 and CPU2
30LPTIM2 wakeupLP timer 2 wakeupDirect BNoCPU1 and CPU2
31Reserved----

Table 55. Wakeup interrupt table (continued)

EXTI no.AcronymDescriptionEXTI typeEventWakeup
32Reserved----
33Reserved----
34Reserved----
35Reserved----
36IPCC CPU1 interruptsIPCC CPU1 RX occupied and TX free interruptsDirect CNoCPU1 (1)
37IPCC CPU2 interruptsIPCC CPU2 RX occupied and TX free interruptsDirect CNoCPU2 (2)
38HSEM interrupt 0Semaphore interrupt 0 for CPU1Direct CNoCPU1 (1)
39HSEM interrupt 1Semaphore interrupt 1 for CPU2Direct CNoCPU2 (2)
40C2SEVCPU2 SEV lineConfigurable AYesCPU1 (3)
41C1SEVCPU1 SEV lineConfigurable AYesCPU2 (4)
42Flash interruptFlash ECC and global interruptsDirect CNoCPU1 and CPU2
43Reserved----
44HSE CSS interruptRCC HSE CSS interruptDirect CNoCPU1 and CPU2
45BLE interruptsBLE, RADIO, & RF_FSM interruptsDirect BNoCPU2 (2)
46Reserved----
47Reserved----
48CDBGPWRUPREQDebug power up request wakeupDirectNoCPU1 and CPU2
  1. 1. For correct operation the EXTI direct event C2IMRx.IMn bit must be set to 0 before CPU1 uses this direct event.
  2. 2. For correct operation the EXTI direct event C1IMRx.IMn bit must be set to 0 before CPU2 uses this direct event.
  3. 3. For correct operation the EXTI configurable event both C2IMRx.IMn and C2EMRx.EMn bits must be set to 0 before CPU1 uses this configurable event.
  4. 4. For correct operation the EXTI configurable event both C1IMRx.IMn and C1EMRx.EMn bits must be set to 0 before CPU2 uses this configurable event.