外设中断ID:
标号 中断ID 描述 标号 中断ID 描述
WDT_IRQn 0 看门狗 EINT3_IRQn 21 外中断3
TIMER0_IRQn 1 定时器0 ADC_IRQn 22 AD转换
TIMER1_IRQn 2 定时器1 BOD_IRQn 23 欠压检测
TIMER2_IRQn 3 定时器2 USB_IRQn 24 USB
TIMER3_IRQn 4 定时器3 CAN_IRQn 25 CAN
UART0_IRQn 5 UART0 DMA_IRQn 26 通用DMA
UART1_IRQn 6 UART1 I2S_IRQn 27 I2S
UART2_IRQn 7 UART2 ENET_IRQn 28 以太网
UART3_IRQn 8 UART3 MCI_IRQn 29 SD/MMC卡I/F
PWM1_IRQn 9 PWM1 MCPWM_IRQn 30 电机控制PWM
I2C0_IRQn 10 I2C0 QEI_IRQn 31 正交编码接口
I2C1_IRQn 11 I2C1 PLL1_IRQn 32 PLL1锁存
I2C2_IRQn 12 I2C2 USBActivity_IRQn 33 USB活动
Reserved0_IRQn 13 保留 CANActivity_IRQn 34 CAN活动
SSP0_IRQn 14 SSP0 UART4_IRQn 35 UART4
SSP1_IRQn 15 SSP1 SSP2_IRQn 36 SSP2
PLL0_IRQn 16 PLL0锁存 LCD_IRQn 37 LCD
RTC_IRQn 17 RTC GPIO_IRQn 38 GPIO
EINT0_IRQn 18 外中断0 PWM0_IRQn 39 PWM0
EINT1_IRQn 19 外中断1 EEPROM_IRQn 40 EEPROM
EINT2_IRQn 20 外中断2
#ifdef STM32F10X_HD 這是我們前面講過的不同的芯片型號,對應 著不同的中斷級別。請大家自行研究!
ADC1_2_IRQn = 18, /*!< ADC1 and ADC2 global Interrupt /
USB_HP_CAN1_TX_IRQn = 19, /!< USB Device High Priority or CAN1 TX Interrupts /
USB_LP_CAN1_RX0_IRQn = 20, /!< USB Device Low Priority or CAN1 RX0 Interrupts /
CAN1_RX1_IRQn = 21, /!< CAN1 RX1 Interrupt /
CAN1_SCE_IRQn = 22, /!< CAN1 SCE Interrupt /
EXTI9_5_IRQn = 23, /!< External Line[9:5] Interrupts /
TIM1_BRK_IRQn = 24, /!< TIM1 Break Interrupt /
TIM1_UP_IRQn = 25, /!< TIM1 Update Interrupt /
TIM1_TRG_COM_IRQn = 26, /!< TIM1 Trigger and Commutation Interrupt /
TIM1_CC_IRQn = 27, /!< TIM1 Capture Compare Interrupt /
TIM2_IRQn = 28, /!< TIM2 global Interrupt /
TIM3_IRQn = 29, /!< TIM3 global Interrupt /
TIM4_IRQn = 30, /!< TIM4 global Interrupt /
I2C1_EV_IRQn = 31, /!< I2C1 Event Interrupt /
I2C1_ER_IRQn = 32, /!< I2C1 Error Interrupt /
I2C2_EV_IRQn = 33, /!< I2C2 Event Interrupt /
I2C2_ER_IRQn = 34, /!< I2C2 Error Interrupt /
SPI1_IRQn = 35, /!< SPI1 global Interrupt /
SPI2_IRQn = 36, /!< SPI2 global Interrupt /
USART1_IRQn = 37, /!< USART1 global Interrupt /
USART2_IRQn = 38, /!< USART2 global Interrupt /
USART3_IRQn = 39, /!< USART3 global Interrupt /
EXTI15_10_IRQn = 40, /!< External Line[15:10] Interrupts /
RTCAlarm_IRQn = 41, /!< RTC Alarm through EXTI Line Interrupt /
USBWakeUp_IRQn = 42, /!< USB Device WakeUp from suspend through EXTI Line Interrupt /
TIM8_BRK_IRQn = 43, /!< TIM8 Break Interrupt /
TIM8_UP_IRQn = 44, /!< TIM8 Update Interrupt /
TIM8_TRG_COM_IRQn = 45, /!< TIM8 Trigger and Commutation Interrupt /
TIM8_CC_IRQn = 46, /!< TIM8 Capture Compare Interrupt /
ADC3_IRQn = 47, /!< ADC3 global Interrupt /
FSMC_IRQn = 48, /!< FSMC global Interrupt /
SDIO_IRQn = 49, /!< SDIO global Interrupt /
TIM5_IRQn = 50, /!< TIM5 global Interrupt /
SPI3_IRQn = 51, /!< SPI3 global Interrupt /
UART4_IRQn = 52, /!< UART4 global Interrupt /
UART5_IRQn = 53, /!< UART5 global Interrupt /
TIM6_IRQn = 54, /!< TIM6 global Interrupt /
TIM7_IRQn = 55, /!< TIM7 global Interrupt /
DMA2_Channel1_IRQn = 56, /!< DMA2 Channel 1 global Interrupt /
DMA2_Channel2_IRQn = 57, /!< DMA2 Channel 2 global Interrupt /
DMA2_Channel3_IRQn = 58, /!< DMA2 Channel 3 global Interrupt /
DMA2_Channel4_5_IRQn = 59 /!< DMA2 Channel 4 and Channel 5 global Interrupt /
#endif / STM32F10X_HD */ |