void EXTI_Configuration(void) { RCC_AHBPeriphClockCmd(RCC_AHBPeriph_GPIOA | RCC_AHBPeriph_GPIOB | RCC_AHBPeriph_GPIOC | RCC_AHBPeriph_GPIOD | RCC_AHBPeriph_GPIOE,ENABLE); EXTI_InitTypeDef EXTI_InitStructure; NVIC_InitTypeDef NVIC_InitStructure; GPIO_InitTypeDef GPIO_InitStructure; GPIO_InitStructure.GPIO_Pin = GPIO_Pin_9 | GPIO_Pin_10 | GPIO_Pin_11 | GPIO_Pin_12; GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN; GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_UP; GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; GPIO_Init(GPIOA,&GPIO_InitStructure); SYSCFG_EXTILineConfig(EXTI_PortSourceGPIOA,EXTI_PinSource9); EXTI_DeInit(); EXTI_InitStructure.EXTI_Line = EXTI_Line9; EXTI_InitStructure.EXTI_Mode = EXTI_Mode_Interrupt; EXTI_InitStructure.EXTI_Trigger = EXTI_Trigger_Falling; EXTI_InitStructure.EXTI_LineCmd = ENABLE; EXTI_Init(&EXTI_InitStructure); NVIC_PriorityGroupConfig(NVIC_PriorityGroup_2); NVIC_InitStructure.NVIC_IRQChannel = EXTI9_5_IRQn; NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 3; NVIC_InitStructure.NVIC_IRQChannelSubPriority = 1; NVIC_InitStructure.NVIC_IRQChannel = ENABLE; NVIC_Init(&NVIC_InitStructure); } 上面是STM32F3 PA.9下降沿外部中断初始化代码,只要一打开中断,外部没有触发程序就一直进入中断,求大神帮我看看配置有问题没有?注意,这是STM32F3, |
STM32F303使用定时器触发双ADC常规同步采样模式
哪位大哥传下STM32F334 Nucleo的工程模板给我下
STM32F334 不能串口下载
关于STM32F334的HRTIM分辨率问题
STM32F303+LCD1602程序问题,不只为什么点不亮?
STM32F334的ADC使用问题
STM32F334 HRTIM形成移相全桥波形问题
有用过STM32F373VC的板子么 iic 例程不好使
STM32F3 ADC外部触发采样达不到7.2MSPS
STM32F103C8T6替换STM32F301C8T6
看来是没清中断