Solved
Nucleo-U545 user button falling EXTI response time very slow
I'm using Nucleo-U545 for my project and set the external interrupt for user button as follow.
void HAL_GPIO_EXTI_Rising_Callback(uint16_t GPIO_Pin)
{
if(GPIO_Pin == USER_BUTTON_Pin) {
HAL_GPIO_TogglePin(LED_GREEN_GPIO_Port, LED_GREEN_Pin);
printf("*button pressed\n");
}
}
void HAL_GPIO_EXTI_Falling_Callback(uint16_t GPIO_Pin)
{
if(GPIO_Pin == USER_BUTTON_Pin) {
HAL_GPIO_TogglePin(LED_GREEN_GPIO_Port, LED_GREEN_Pin);
printf("*button released\n");
}
}
When I press the button, the rising interrupt reacts relatively fast. But when I release the button, the falling interrupt responds very slowly. It takes almost a second.
No matter how hard I look at it, I can't tell why this phenomenon occurs. When I look at the falling wave using an oscilloscope, it falls quickly without being as slow as the falling interrupt reaction rate.
