Question
EXTI occures after disabling it in SYSCFG->EXTICR
Posted on July 01, 2015 at 12:44
Hello everybody,
I am developing an application with external interrupts on a falling edge of Pin PB3 on an STM32l151VB. With reuse of code I initialize the EXTI line twice using the function ''SYSCFG_EXTILineConfig''. While the second initialization the interrupt suddenly arises without the pin going down (checked with oscilloscope). The exact location is after removing the PORTB from the EXTICR1[3] field. From stm32l1xx_syscfg.c: tmp = ((uint32_t)0x0F) << (0x04 * (EXTI_PinSourcex & (uint8_t)0x03)); SYSCFG->EXTICR[EXTI_PinSourcex >> 0x02] &= ~tmp; No interrupt is pending right before I call the routine. The workaround is to simply not initialize the exti twice. I'd like to know why the interrupt occures nonetheless in order to understand what's going wrong. Thanks for your answers Alexander #exti #interrupts #stm32l151