Nested Vector Interrupt Controller (NVIC) support.
The same API is used on all targets, but the available interrupts are target-dependent. To manage this, each target series defines an nvic_irq_num enumerator for each available interrupt.
Contents
This target-dependent enum is used to identify an interrupt vector number. Interrupts which are common across series have the same token (though not necessarily the same value) for their nvic_irq_nums. The available values on each supported target series are as follows.
STM32F1 interrupt vector table interrupt numbers.
See: | <libmaple/scb.h> |
---|
Values:
Non-maskable interrupt.
Hard fault (all class of fault)
Memory management.
Bus fault: prefetch fault, memory access fault.
Usage fault: Undefined instruction or illegal state.
System service call via SWI insruction.
Debug monitor.
Pendable request for system service.
System tick timer.
Window watchdog interrupt.
PVD through EXTI line detection.
Tamper.
Real-time clock.
Flash.
Reset and clock control.
EXTI line 0.
EXTI line 1.
EXTI line 2.
EXTI line 3.
EXTI line 4.
DMA1 channel 1.
DMA1 channel 2.
DMA1 channel 3.
DMA1 channel 4.
DMA1 channel 5.
DMA1 channel 6.
DMA1 channel 7.
ADC1 and ADC2.
USB high priority or CAN TX.
USB low priority or CAN RX0.
CAN RX1.
CAN SCE.
EXTI line [9:5].
Timer 1 break, Timer 9.
Timer 1 update, Timer 10.
Timer 1 trigger and commutation, Timer 11.
Timer 1 capture/compare.
Timer 2.
Timer 3.
Timer 4.
I2C1 event.
I2C1 error.
I2C2 event.
I2C2 error.
SPI1.
SPI2.
USART1.
USART2.
USART3.
EXTI line [15:10].
RTC alarm through EXTI line.
USB wakeup from suspend through EXTI line.
Timer 8 break, timer 12.
Timer 8 update, timer 13.
Timer 8 trigger and commutation, Timer 14.
Timer 8 capture/compare.
ADC3.
FSMC.
SDIO.
Timer 5.
SPI3.
UART4.
UART5.
Timer 6.
Timer 7.
DMA2 channel 1.
DMA2 channel 2.
DMA2 channel 3.
DMA2 channels 4 and 5.
(Deprecated) Timer 1 break
For backwards compatibility only. Use NVIC_TIMER1_BRK_TIMER9 instead.
(Deprecated) Timer 1 update.
For backwards compatibility only. Use NVIC_TIMER1_UP_TIMER10 instead.
(deprecated) Timer 1 trigger and commutation.
For backwards compatibility only. Use NVIC_TIMER1_TRG_COM_TIMER11 instead.
(deprecated) Timer 8 break
For backwards compatibility only. Use NVIC_TIMER8_BRK_TIMER12 instead.
(deprecated) Timer 8 update For backwards compatibility only.
Use NVIC_TIMER8_UP_TIMER13 instead.
(deprecated) Timer 8 trigger and commutation.
For backwards compatibility only. Use NVIC_TIMER8_TRG_COM_TIMER14 instead.
STM32F2 interrupt vector table interrupt numbers.
Values:
Non-maskable interrupt.
Hard fault (all class of fault)
Memory management.
Bus fault: prefetch fault, memory access fault.
Usage fault: Undefined instruction or illegal state.
System service call via SWI instruction.
Debug monitor.
Pendable request for system service.
System tick timer.
Window watchdog interrupt.
PVD through EXTI line detection.
Tamper and TimeStamp.
Real-time clock wakeup.
Flash.
Reset and clock control.
EXTI line 0.
EXTI line 1.
EXTI line 2.
EXTI line 3.
EXTI line 4.
DMA1 stream 0.
DMA1 stream 1.
DMA1 stream 2.
DMA1 stream 3.
DMA1 stream 4.
DMA1 stream 5.
DMA1 stream 6.
ADC.
CAN1 TX.
CAN1 RX0.
CAN1 RX1.
CAN1 SCE.
EXTI lines [9:5].
Timer 1 break and timer 9.
Timer 1 update and timer 10.
Timer 1 trigger and commutation and timer 11.
Timer 1 capture and compare.
Timer 2.
Timer 3.
Timer 4.
I2C1 event.
I2C2 error.
I2C2 event.
I2C2 error.
SPI1.
SPI2.
USART1.
USART2.
USART3.
EXTI lines [15:10].
RTC alarms A and B through EXTI.
USB on-the-go full-speed wakeup through EXTI.
Timer 8 break and timer 12.
Timer 8 update and timer 13.
Timer 8 trigger and commutation and timer 14.
Timer 8 capture and compare.
DMA1 stream 7.
FSMC.
SDIO.
Timer 5.
SPI3.
UART4.
UART5.
Timer 6 and DAC underrun.
Timer 7.
DMA2 stream 0.
DMA2 stream 1.
DMA2 stream 2.
DMA2 stream 3.
DMA2 stream 4.
Ethernet.
Ethernet wakeup through EXTI.
CAN2 TX.
CAN2 RX0.
CAN2 RX1.
CAN2 SCE.
USB on-the-go full-speed.
DMA2 stream 5.
DMA2 stream 6.
DMA2 stream 7.
USART6.
I2C3 event.
I2C3 error.
USB on-the-go high-speed endpoint 1 OUT.
USB on-the-go high-speed endpoint 1 IN.
USB on-the-go high-speed wakeup through EXTI.
USB on-the-go high-speed.
DCMI.
Cryptographic processor.
Hash and random number generation.
For compatibility with STM32F1.
Initialize the NVIC, setting interrupts to a default priority.
Set the vector table base address.
For stand-alone products, the vector table base address is normally the start of Flash (0x08000000).
Parameters: |
|
---|
Set interrupt priority for an interrupt line.
Note: The STM32 only implements 4 bits of priority, ignoring the lower 4 bits. This means there are only 16 levels of priority. Bits[3:0] read as zero and ignore writes.
Parameters: |
|
---|
Enables interrupts and configurable fault handlers (clear PRIMASK).
Disable interrupts and configurable fault handlers (set PRIMASK).
Enable interrupt irq_num.
Parameters: |
|
---|
Disable interrupt irq_num.
Parameters: |
|
---|
Force a system reset.
Resets all major system components, excluding debug.
Since the NVIC is part of the ARM core, its registers and base pointer are common across all targes.
NVIC register map base pointer.
NVIC register map type.
Public Members
- __io uint32 ISER[8]
Interrupt Set Enable Registers.
- uint32 RESERVED0[24]
Reserved.
- __io uint32 ICER[8]
Interrupt Clear Enable Registers.
- uint32 RESERVED1[24]
Reserved.
- __io uint32 ISPR[8]
Interrupt Set Pending Registers.
- uint32 RESERVED2[24]
Reserved.
- __io uint32 ICPR[8]
Interrupt Clear Pending Registers.
- uint32 RESERVED3[24]
Reserved.
- __io uint32 IABR[8]
Interrupt Active bit Registers.
- uint32 RESERVED4[56]
Reserved.
- __io uint8 IP[240]
Interrupt Priority Registers.
- uint32 RESERVED5[644]
Reserved.
- __io uint32 STIR
Software Trigger Interrupt Registers.
None at this time.