注意一下具体的中断线是否对应了IO,由于IO和中断线不是顺序对应的容易忽略。
#define EXTI_LINE0 ((uint32_t)0x00001) /*!< External interrupt line 0 Connected to the PA0 PA1 PB0 */
#define EXTI_LINE1 ((uint32_t)0x00002) /*!< External interrupt line 1 Connected to the PA2 PA3 PB1 */
#define EXTI_LINE2 ((uint32_t)0x00004) /*!< External interrupt line 2 Connected to the PA6 PB2 */
#define EXTI_LINE3 ((uint32_t)0x00008) /*!< External interrupt line 3 Connected to the PA5 PB3 */
#define EXTI_LINE4 ((uint32_t)0x00010) /*!< External interrupt line 4 Connected to the PB9 PB4 */
#define EXTI_LINE5 ((uint32_t)0x00020) /*!< External interrupt line 5 Connected to the PB10 PB11 PB5 */
#define EXTI_LINE6 ((uint32_t)0x00040) /*!< External interrupt line 6 Connected to the PB12 PB6 PA4 */
#define EXTI_LINE7 ((uint32_t)0x00080) /*!< External interrupt line 7 Connected to the PB13 PB7 PB8 */
|