|
初始化的程序如下
NVIC_InitStructure.NVIC_IRQChannel = EXTI15_10_IRQChannel; NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 1; NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0; NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE; NVIC_Init(&NVIC_InitStructure);
GPIO_EXTILineConfig(GPIO_PortSourceGPIOB, GPIO_PinSource15); EXTI_InitStructure.EXTI_Line = EXTI_Line15; EXTI_InitStructure.EXTI_Mode = EXTI_Mode_Interrupt; EXTI_InitStructure.EXTI_Trigger = EXTI_Trigger_Rising; EXTI_InitStructure.EXTI_LineCmd = ENABLE; EXTI_Init(&EXTI_InitStructure); 我以前用逻辑分析仪看过波形,没有发现毛刺,明天准备按照版主的说法存储SR的内容看看,顺便问下EXTI的PR支持bit band操作吗?我看手册好像是支持的,可是用(PERIPH_BB_BASE+(EXTI_BASE-PERIPH_BASE+0x14)*32)+(15*4))访问却不正确
|
|