2020-01-16 05:33 PM
I have the following EXTI9_5 handler: (yes, with HAL)
void EXTI9_5_IRQHandler(void)
{
if (__HAL_GPIO_EXTI_GET_IT(GPIO_PIN_6) != 0)
{
__HAL_GPIO_EXTI_CLEAR_IT(GPIO_PIN_6);
return;
}
if (__HAL_GPIO_EXTI_GET_IT(GPIO_PIN_5) != 0)
{
__HAL_GPIO_EXTI_CLEAR_IT(GPIO_PIN_5);
return;
}
if (__HAL_GPIO_EXTI_GET_IT(GPIO_PIN_7) != 0)
{
__HAL_GPIO_EXTI_CLEAR_IT(GPIO_PIN_7);
return;
}
if (__HAL_GPIO_EXTI_GET_IT(GPIO_PIN_8) != 0)
{
__HAL_GPIO_EXTI_CLEAR_IT(GPIO_PIN_8);
return;
}
if (__HAL_GPIO_EXTI_GET_IT(GPIO_PIN_9) != 0)
{
__HAL_GPIO_EXTI_CLEAR_IT(GPIO_PIN_9);
return;
}
__BKPT(6); // unknown reason
__NOP();
__NOP();
}
After enabling EXTI9_5, it permanently hits the __BKPT(6) line.,
This means, all checks for pins 5,6,7,8,9 fail and the reason of the interrupt is not identified.
How this is possible? Can EXTI9_5 interrupt occur for other reasons besides of pins 5,6,7,8,9?
Puzzled...
-- pa
Solved! Go to Solution.
2020-01-20 11:27 AM
Thank you Clive, it was it! DSB before return.
-- pa
2020-01-20 01:13 PM