不能进入外部中断

feiyun   2012-4-1 22:20 楼主
 RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOC |RCC_APB2Periph_GPIOB|RCC_APB2Periph_GPIOA|RCC_APB2Periph_AFIO,ENABLE);
 NVIC_InitTypeDef NVIC_InitStructure;
 EXTI_InitTypeDef EXTI_InitStructure;
 NVIC_InitStructure.NVIC_IRQChannel = EXTI9_5_IRQChannel;
 NVIC_PriorityGroupConfig(NVIC_PriorityGroup_0);
 NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0;
 NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0; 
 NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
 NVIC_Init(&NVIC_InitStructure);
 GPIO_EXTILineConfig(GPIO_PortSourceGPIOB,GPIO_PinSource7);
 EXTI_InitStructure.EXTI_Line=EXTI_Line7;
 EXTI_InitStructure.EXTI_Mode=EXTI_Mode_Interrupt;
 EXTI_InitStructure.EXTI_Line=EXTI_Trigger_Falling;
 EXTI_InitStructure.EXTI_LineCmd=ENABLE; 
 EXTI_Init(&EXTI_InitStructure);
 EXTI_GenerateSWInterrupt(EXTI_Line7);

回复评论 (1)

自己在顶一下,用的103CB不行,103RB就行,这2款芯片有什么不同吗
点赞  2012-4-2 21:15
电子工程世界版权所有 京B2-20211791 京ICP备10001474号-1 京公网安备 11010802033920号
    写回复