Question
Stm32L0 Nucleo - EXTI 0_1 issue
Posted on October 16, 2014 at 15:25
Hi All,
I'm trying to work with the STM32L0 Nucleo board and I found a strange behavior:If I configure an EXTI interrupt on line 0-1 (no matter which pin but I tryed pins PA-B-C/0-1) the interrupt is triggered immediatelly after invoking the HAL_NVIC_EnableIRQ(EXTI0_1_IRQn) function and, after the first handling, it stops to work...If otherwise I use any other pin (2-15) there are no problems and the EXTI works correctly.The configuration I've used are: /*Configure GPIO pin : PB3 */ GPIO_InitStruct.Pin = GPIO_PIN_3; GPIO_InitStruct.Mode = GPIO_MODE_IT_RISING; GPIO_InitStruct.Pull = GPIO_NOPULL; HAL_GPIO_Init(GPIOB, &GPIO_InitStruct); /* Enable and set EXTI2_3 Interrupt to the lowest priority */ HAL_NVIC_SetPriority(EXTI2_3_IRQn, 3, 0); HAL_NVIC_EnableIRQ(EXTI2_3_IRQn);and /*Configure GPIO pin : PB0 */ GPIO_InitStruct.Pin = GPIO_PIN_0; GPIO_InitStruct.Mode = GPIO_MODE_IT_RISING; GPIO_InitStruct.Pull = GPIO_NOPULL; HAL_GPIO_Init(GPIOB, &GPIO_InitStruct); /* Enable and set EXTI0_1 Interrupt to the lowest priority */ HAL_NVIC_SetPriority(EXTI0_1_IRQn, 3, 0); HAL_NVIC_EnableIRQ(EXTI0_1_IRQn);generated using the CubeMXThe handler code is:void EXTI0_1_IRQHandler(void){ HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_0);}void EXTI2_3_IRQHandler(void){ HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_3);}void HAL_GPIO_EXTI_IRQHandler(uint16_t GPIO_Pin){ /* EXTI line interrupt detected */ if(__HAL_GPIO_EXTI_GET_IT(GPIO_Pin) != RESET) { __HAL_GPIO_EXTI_CLEAR_IT(GPIO_Pin); HAL_GPIO_EXTI_Callback(GPIO_Pin); }}__weak void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin){ // My code}Do somebody know if is there any known issue on EXTI0_1? I can't understand why the same code does not work with pin 0 and works correctly with pin 3Thanks for your answers!Mat #stm32l0-exti #stm32l0-nucleo