关于中断号问题,可以这么看: TRM 是从 SGI 算起,BSP 是从 32 (platform exception) 算起 I2C1 101 – 32 = 69 I2C2 129 - 32 = 97 /* ------------------------- Interrupt Number Definition ------------------------ */ /** Device specific Interrupt IDs */ typedef enum IRQn { /****** SGI Interrupts Numbers ************************************************/ SGI0_IRQn = 0, /*!< Software Generated Interrupt 0 */ SGI1_IRQn = 1, /*!< Software Generated Interrupt 1 */ SGI2_IRQn = 2, /*!< Software Generated Interrupt 2 */ SGI3_IRQn = 3, /*!< Software Generated Interrupt 3 */ SGI4_IRQn = 4, /*!< Software Generated Interrupt 4 */ SGI5_IRQn = 5, /*!< Software Generated Interrupt 5 */ SGI6_IRQn = 6, /*!< Software Generated Interrupt 6 */ SGI7_IRQn = 7, /*!< Software Generated Interrupt 7 */ SGI8_IRQn = 8, /*!< Software Generated Interrupt 8 */ SGI9_IRQn = 9, /*!< Software Generated Interrupt 9 */ SGI10_IRQn = 10, /*!< Software Generated Interrupt 10 */ SGI11_IRQn = 11, /*!< Software Generated Interrupt 11 */ SGI12_IRQn = 12, /*!< Software Generated Interrupt 12 */ SGI13_IRQn = 13, /*!< Software Generated Interrupt 13 */ SGI14_IRQn = 14, /*!< Software Generated Interrupt 14 */ SGI15_IRQn = 15, /*!< Software Generated Interrupt 15 */ /****** Cortex-35 Processor Exceptions Numbers ****************************************/ GlobalTimer_IRQn = 27, /*!< Global Timer Interrupt */ PrivTimer_IRQn = 29, /*!< Private Timer Interrupt */ PrivWatchdog_IRQn = 30, /*!< Private Watchdog Interrupt */ /****** Platform Exceptions Numbers ***************************************************/ LVD_IRQn = 32, /*!< Low Voltage detection Interrupt */ ...... I2C1_IRQn = 101, /*!< I2C 1 Interrupt */ ....... } IRQn_Type;
|