15. Nested vectored interrupt controller (NVIC)

15.1 NVIC main features

CPU1 NVIC features:

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 the PM0214 programming manual for Cortex ® -M4 (PM0214), and programming manual for Cortex ® -M0+ (PM0223).

15.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 11: System configuration controller (SYSCFG) ).

The interrupt block diagram is shown in the figure below.

Figure 53. Interrupt block diagram

Interrupt block diagram showing connections between Peripherals, AIEC, SYSCFG (C1IMRn, C2IMRn), and CPUs (CPU1, CPU2) via NVIC blocks. The diagram shows various interrupt sources connected to the NVIC for two CPUs. Peripherals and AIEC are connected directly to the NVIC. Some peripherals are also connected to the SYSCFG block, which contains C1IMRn and C2IMRn registers that then connect to the NVIC for CPU1 and CPU2 respectively.
Interrupt block diagram showing connections between Peripherals, AIEC, SYSCFG (C1IMRn, C2IMRn), and CPUs (CPU1, CPU2) via NVIC blocks. The diagram shows various interrupt sources connected to the NVIC for two CPUs. Peripherals and AIEC are connected directly to the NVIC. Some peripherals are also connected to the SYSCFG block, which contains C1IMRn and C2IMRn registers that then connect to the NVIC for CPU1 and CPU2 respectively.

15.3 Interrupt and exception vectors

The CPU1 and CPU2 vector tables are given respectively in Table 89 and Table 90 (shaded cells indicate the processor exceptions).

Table 89. CPU1 vector table

PositionPriorityType of priorityAcronymDescription (1)(2)Address
----Reserved0x0000 0000
--3FixedResetReset0x0000 0004
--2FixedNMINon maskable interrupt HSE32 CSS, flash ECC and SRAM2 parity0x0000 0008
--1FixedHardFaultAll classes of fault0x0000 000C
-0SettableMemManagerMemory manager0x0000 0010
-1SettableBusFaultPrefetch 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

Table 89. CPU1 vector table (continued)

PositionPriorityType of priorityAcronymDescription (1)(2)Address
-5SettablePendSVPendable request for system service0x0000 0038
-6SettableSysTickSysTick timer0x0000 003C
07SettableWWDGWindow watchdog early wake-up0x0000 0040
18SettablePVD,
PWM[3]
PVD through EXTI[16] (IMR2[20])
PWM[3] through EXTI[34] (IMR2[18])
0x0000 0044
29SettableTAMP,
RTC_STAMP,
LSE_CSS,
RTC_SSRU
TAMP tamper
RTC timestamp
LSE CSS interrupt (IMR1[0])
RTC SSR underflow interrupt (IMR1[2])
0x0000 0048
310SettableRTC_WKUPRTC wake-up interrupt0x0000 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 non-secure interrupt0x0000 006C
1219SettableDMA1_CH2DMA1 channel 2 non-secure interrupt0x0000 0070
1320SettableDMA1_CH3DMA1 channel 3 non-secure interrupt0x0000 0074
1421SettableDMA1_CH4DMA1 channel 4 non-secure interrupt0x0000 0078
1522SettableDMA1_CH5DMA1 channel 5 non-secure interrupt0x0000 007C
1623SettableDMA1_CH6DMA1 channel 6 non-secure interrupt0x0000 0080
1724SettableDMA1_CH7DMA1 channel 7 non-secure interrupt0x0000 0084
1825SettableADCADC global interrupt0x0000 0088
1926SettableDACDAC global interrupt0x0000 008C
2027SettableC2SEV,
PWR_C2H
CPU2 SEV through EXTI[40]
PWR CPU2 HOLD wake-up interrupt
0x0000 0090
2128SettableCOMPCOMP2 and COMP1 interrupt through EXTI[22:21]0x0000 0094
2229SettableEXTI[9:5]EXTI line [9:5] interrupt through EXTI[9:5] (IMR1[25:21])0x0000 0098
2330SettableTIM1_BRKTimer 1 break interrupt0x0000 009C
2431SettableTIM1_UPTimer 1 Update0x0000 00A0
2532SettableTIM1_TRG_COMTimer 1 trigger and communication0x0000 00A4
2633SettableTIM1_CCTimer 1 capture compare interrupt0x0000 00A8

Table 89. CPU1 vector table (continued)

PositionPriorityType of priorityAcronymDescription (1)(2)Address
2734SettableTIM2Timer 2 global interrupt0x0000 00AC
2835SettableTIM16Timer 16 global interrupt0x0000 00B0
2936SettableTIM17Timer 17 global interrupt0x0000 00B4
3037SettableI2C1_EVI2C1 event interrupt0x0000 00B8
3138SettableI2C1_ERI2C1 error interrupt0x0000 00BC
3239SettableI2C2_EVI2C2 event interrupt0x0000 00C0
3340SettableI2C2_ERI2C2 error interrupt0x0000 00C4
3441SettableSPI1SPI1 global interrupt0x0000 00C8
3542SettableSPI2S2SPI2S2 global interrupt0x0000 00CC
3643SettableUSART1USART1 global interrupt0x0000 00D0
3744SettableUSART2USART2 global interrupt0x0000 00D4
3845SettableLPUART1LPUART1 global interrupt0x0000 00D8
3946SettableLPTIM1LP timer 1 global interrupt0x0000 00DC
4047SettableLPTIM2LP timer 2 global interrupt0x0000 00E0
4148SettableEXTI[15:10]EXTI line [15:10] interrupt through EXTI[15:10] (IMR1[31:26])0x0000 00E4
4249SettableRTC_ALARMRTC alarms A and B interrupt0x0000 00E8
4350SettableLPTIM3LP timer 3 global interrupt0x0000 00EC
4451SettableReservedReserved0x0000 00F0
4552SettableIPCC_C1_RX_ITIPCC CPU1 RX occupied interrupt0x0000 00F4
4653SettableIPCC_C1_TX_ITIPCC CPU1 TX free interrupt0x0000 00F8
4754SettableHSEMSemaphore interrupt 0 to CPU10x0000 00FC
4855SettableI2C3_EVI2C3 event interrupt0x0000 0100
4956SettableI2C3_ERI2C3 error interrupt0x0000 0104
5057SettableRadio IRQ, BusyRadio IRQs
RFBUSY interrupt through EXTI[45]
0x0000 0108
5158SettableAESAES global interrupt0x0000 010C
5259SettableTrue RNGTrue random number generator interrupt0x0000 0110
5360SettablePKAPrivate key accelerator interrupt0x0000 0114
5461SettableDMA2_CH1DMA2 channel 1 non-secure interrupt0x0000 0118
5562SettableDMA2_CH2DMA2 channel 2 non-secure interrupt0x0000 011C
5663SettableDMA2_CH3DMA2 channel 3 non-secure interrupt0x0000 0120
5764SettableDMA2_CH4DMA2 channel 4 non-secure interrupt0x0000 0124
5865SettableDMA2_CH5DMA2 channel 5 non-secure interrupt0x0000 0128

Table 89. CPU1 vector table (continued)

PositionPriorityType of priorityAcronymDescription (1)(2)Address
5966SettableDMA2_CH6DMA2 channel 6 non-secure interrupt0x0000 012C
6067SettableDMA2_CH7DMA2 channel 7 non-secure interrupt0x0000 0130
6168SettableDMAMUX1_OVRDMAMUX1 overrun interrupt0x0000 0134

1. IMRx[n] refer to the pre-mask bit[n] in SYSCFG_IMRx register.

2. EXTI[n] refer to the input event number [n] of the EXTI.

Table 90. CPU2 vector table

PositionPriorityType of priorityAcronymDescription (1)(2)Address
----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
03SettableTZIC_ILASecurity Interrupt controller illegal access interrupt0x0000 0040
14SettablePVD, PVM[3]PVD through EXTI[16] (C2IMR2[20])
PVM[3] through EXTI[34] (C2IMR2[18])
0x0000 0044
25SettableTAMP,
RTC_STAMP,
LSE_CSS,
RTC_ALARM,
RTC_SSRU,
RTC_WKUP
TAMP tamper
RTC timestamp
LSE CSS interrupt (C2IMR1[0])
RTC alarms A and B interrupt (C2IMR1[1])
RTC SSR underflow interrupt (C2IMR1[2])
RTC wake-up interrupt (C2IMR1[3])
0x0000 0048
36SettableRCC,
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 004C
47SettableEXTI[1:0]EXTI line 1:0 interrupt through EXTI[1:0] (C2IMR1[17:16])0x0000 0050
58SettableEXTI[3:2]EXTI line 3:2 interrupt through EXTI[3:2] (C2IMR1[19:18])0x0000 0054

Table 90. CPU2 vector table (continued)

PositionPriorityType of priorityAcronymDescription (1)(2)Address
69SettableEXTI[15:4]EXTI line 15:4 interrupt through EXTI[15:4] (C2IMR1[31:20])0x0000 0058
710SettableCOMP,
ADC,
DAC
COMP1 and COMP2 interrupt through EXTI[22:21] (C2IMR1[11])
ADC global interrupt (C2IMR1[12])
DAC global interrupt (C2IMR1[13])
0x0000 005C
811SettableDMA1_CH[3:1]DMA1 channel 3:1 secure and non-secure interrupt (C2IMR2[2:0])0x0000 0060
912SettableDMA1_CH[7:4]DMA1 channel 7:4 secure and non-secure interrupt (C2IMR2[6:3])0x0000 0064
1013SettableDMA2_CH[7:1],
DMAMUX1_OVR
DMA2 channel 7:1 secure and non-secure interrupt (C2IMR2[14:8])
DMAMUX1 overrun interrupt (C2IMR2[15])
0x0000 0068
1114SettableLPTIM1LPTimer 1 global interrupt0x0000 006C
1215SettableLPTIM2LPTimer 2 global interrupt0x0000 0070
1316SettableLPTIM3LPTimer 3 global interrupt0x0000 0074
1417SettableTIM1_BRK,
TIM1_UP,
TIM1_TRG_COM,
TIM1_CC
Timer 1 break
Timer 1 update
Timer 1 trigger and communication
Timer 1 capture compare interrupt
0x0000 0078
1518SettableTIM2Timer 2 global interrupt0x0000 007C
1619SettableTIM16Timer 16 global interrupt0x0000 0080
1720SettableTIM17Timer 17 global interrupt0x0000 0084
1821SettableIPCC_C2_RX_IT
IPCC_C2_TX_IT
IPCC CPU2 RX occupied interrupt
IPCC CPU2 TX free interrupt
0x0000 0088
1922SettableHSEMSemaphore interrupt to CPU20x0000 008C
2023SettableTrue RNGTrue random number generator interrupt0x0000 0090
2124SettableAES
PKA
AES global interrupt (C2IMR1[10])
Private key accelerator interrupt (C2IMR1[8])
0x0000 0094
2225SettableI2C1_EV
I2C1_ER
I2C1 event interrupt
I2C1 error interrupt
0x0000 0098
2326SettableI2C2_EV
I2C2_ER
I2C2 event interrupt
I2C2 error interrupt
0x0000 009C
2427SettableI2C3_EV
I2C3_ER
I2C3 event interrupt
I2C3 error interrupt
0x0000 00A0
2528SettableSPI1SPI1 global interrupt0x0000 00A4
2629SettableSPI2S2SPI2S2 global interrupt0x0000 00A8
2730SettableUSART1USART1 global interrupt0x0000 00AC

Table 90. CPU2 vector table (continued)

PositionPriorityType of priorityAcronymDescription (1)(2)Address
2831SettableUSART2USART2 global interrupt0x0000 00B0
2932SettableLPUART1LPUART1 global interrupt0x0000 00B4
3033SettableSUBGHZSPISub-GHz radio SPI global interrupt0x0000 00B8
3134SettableRadio IRQ
Busy
Radio IRQs
RFBUSY interrupt through EXTI[45]
0x0000 00BC

1. C2IMRx[n] refer to the pre-mask bit[n] in SYSCFG_C2IMRx register.

2. EXTI[n] refer to the input event number [n] of the EXTI.