cancel
Showing results for 
Search instead for 
Did you mean: 

__HAL_GPIO_EXTI_CLEAR_FLAG VS __HAL_GPIO_EXTI_CLEAR_IT

Daniel Hassanian
Associate III
Posted on December 02, 2017 at 13:48

in the HAL manual both implement the same

&sharpdefine __HAL_GPIO_EXTI_CLEAR_IT (__EXT_LINE__)     (EXTI->PR=(__EXTI_LINE__))

&sharpdefine __HAL_GPIO_EXTI_CLEAR_FLAG (__EXT_LINE__)     (EXTI->PR=(__EXTI_LINE__))

what's the difference?

Also when using any of them the pending bit in the NVIC debug window in keil is not cleared, however it seems using Clear_IT actually works but still the pending bit in NVIC is not cleared.

0690X000006093XQAQ.png

what i'm trying to do is to wait for a pin to remain low for a specific time and then if the interrupt bit is not set during the time enable the EXTI interrupt.

I also tried using HAL_NVIC_ClearPendingIRQ but that didn't cleat the bit as well,

my board is the F1 Dicovery and using on board St link v1 .

can someone Please clarify on this , i'm very confused.

#irq-handler #nvic
0 REPLIES 0