GD32F307 CAN中断
时间: 2023-11-28 17:05:39 浏览: 135
根据提供的引用内容,没有找到关于GD32F307 CAN中断的相关信息。但是可以提供一些关于GD32F307 RTC的信息,希望对您有所帮助。
GD32F307是一款基于ARM Cortex-M4内核的微控制器,具有丰富的外设资源,包括RTC模块。RTC模块可以提供精确的时间计数和日期计数功能,同时还支持闹钟和定时器功能。在RTC模块中,可以通过中断的方式来实现时间和日期的更新,以及闹钟和定时器的触发。具体实现可以参考相关的硬件原理图和代码实现。
相关问题
GD32F307中断表
GD32F307的中断表可以在GD32F30x Standard Peripherals Library中找到。在库文件的文件夹中,可以找到一个名为"GD32F30x_StdPeriph_Examples\GD32F30x-EVAL\IAR-Keil\Project\GD32F30x_EVAL\Interrupt"的示例文件夹,其中包含了一个中断表的头文件"gd32f30x_it.h",其中包含了所有中断的宏定义和中断处理函数的原型。
以下是该头文件中的中断表:
```c
typedef enum
{
/* GD32F30x devices commonly used interrupts */
WWDGT_IRQn = 0, /*!< window watchdog interrupt */
LVD_IRQn = 1, /*!< LVD through EXTI line detect interrupt */
TAMPER_IRQn = 2, /*!< tamper through EXTI line detection interrupt */
RTC_IRQn = 3, /*!< RTC global interrupt */
FMC_IRQn = 4, /*!< FMC interrupt */
RCU_CTC_IRQn = 5, /*!< RCU and CTC interrupt */
EXTI0_IRQn = 6, /*!< EXTI line 0 interrupt */
EXTI1_IRQn = 7, /*!< EXTI line 1 interrupt */
EXTI2_IRQn = 8, /*!< EXTI line 2 interrupt */
EXTI3_IRQn = 9, /*!< EXTI line 3 interrupt */
EXTI4_IRQn = 10, /*!< EXTI line 4 interrupt */
DMA0_Channel0_IRQn = 11, /*!< DMA0 channel0 interrupt */
DMA0_Channel1_IRQn = 12, /*!< DMA0 channel1 interrupt */
DMA0_Channel2_IRQn = 13, /*!< DMA0 channel2 interrupt */
DMA0_Channel3_IRQn = 14, /*!< DMA0 channel3 interrupt */
DMA0_Channel4_IRQn = 15, /*!< DMA0 channel4 interrupt */
DMA0_Channel5_IRQn = 16, /*!< DMA0 channel5 interrupt */
DMA0_Channel6_IRQn = 17, /*!< DMA0 channel6 interrupt */
ADC1_2_IRQn = 18, /*!< ADC1 and ADC2 global interrupt */
CAN0_TX_IRQn = 19, /*!< CAN0 TX interrupts */
CAN0_RX0_IRQn = 20, /*!< CAN0 RX0 interrupts */
CAN0_RX1_IRQn = 21, /*!< CAN0 RX1 interrupt */
CAN0_EWMC_IRQn = 22, /*!< CAN0 EWMC interrupts */
EXTI5_9_IRQn = 23, /*!< EXTI[9:5] interrupts */
TIMER0_BRK_IRQn = 24, /*!< TIMER0 break interrupts */
TIMER0_UP_IRQn = 25, /*!< TIMER0 update interrupts */
TIMER0_TRG_CMT_IRQn = 26, /*!< TIMER0 trigger and commutation interrupts */
TIMER0_Channel_IRQn = 27, /*!< TIMER0 channel capture compare interrupts */
TIMER1_IRQn = 28, /*!< TIMER1 global interrupt */
TIMER2_IRQn = 29, /*!< TIMER2 global interrupt */
TIMER3_IRQn = 30, /*!< TIMER3 global interrupt */
I2C0_EV_IRQn = 31, /*!< I2C0 event interrupt */
I2C0_ER_IRQn = 32, /*!< I2C0 error interrupt */
I2C1_EV_IRQn = 33, /*!< I2C1 event interrupt */
I2C1_ER_IRQn = 34, /*!< I2C1 error interrupt */
SPI0_IRQn = 35, /*!< SPI0 global interrupt */
SPI1_IRQn = 36, /*!< SPI1 global interrupt */
USART0_IRQn = 37, /*!< USART0 global interrupt */
USART1_IRQn = 38, /*!< USART1 global interrupt */
USART2_IRQn = 39, /*!< USART2 global interrupt */
EXTI10_15_IRQn = 40, /*!< EXTI[15:10] interrupts */
RTC_ALARM_IRQn = 41, /*!< RTC alarm interrupt */
USBFS_WKUP_IRQn = 42, /*!< USBFS wakeup interrupt */
TIMER7_BRK_IRQn = 43, /*!< TIMER7 break interrupts */
TIMER7_UP_IRQn = 44, /*!< TIMER7 update interrupts */
TIMER7_TRG_CMT_IRQn = 45, /*!< TIMER7 trigger and commutation interrupts */
TIMER7_Channel_IRQn = 46, /*!< TIMER7 channel capture compare interrupts */
ADC2_COMP_IRQn = 47, /*!< ADC2 and comparator interrupts */
USBFS_IRQn = 48, /*!< USBFS global interrupt */
ENET_IRQn = 49, /*!< Ethernet global interrupt */
ENET_WKUP_IRQn = 50, /*!< Ethernet wakeup interrupt */
CAN1_TX_IRQn = 51, /*!< CAN1 TX interrupts */
CAN1_RX0_IRQn = 52, /*!< CAN1 RX0 interrupts */
CAN1_RX1_IRQn = 53, /*!< CAN1 RX1 interrupt */
CAN1_EWMC_IRQn = 54, /*!< CAN1 EWMC interrupts */
USBHS_WKUP_IRQn = 55, /*!< USBHS wakeup interrupt */
USBHS_IRQn = 56, /*!< USBHS global interrupt */
}IRQn_Type;
```
GD32F307中断优先级表
GD32F307中断优先级表如下:
| 中断类型 | 中断优先级 |
| -------- | ---------- |
| 外部中断 | 0 ~ 3 |
| DMA | 4 |
| 串口 | 5 |
| 定时器中断 | 6 ~ 7 |
| USB中断 | 8 |
| CAN中断 | 9 |
| I2C中断 | 10 |
| SPI中断 | 11 |
| ADC中断 | 12 |
| DAC中断 | 13 |
| CMP中断 | 14 |
| RTC中断 | 15 |
其中,数字越小的中断优先级越高,数字越大的中断优先级越低。当多个中断同时发生时,优先级高的中断会先被处理。在同一优先级内,按照中断请求的先后顺序进行处理。需要注意的是,外部中断的优先级需要通过NVIC_SetPriority函数进行设置。
阅读全文