AnsweredAssumed Answered

STM32F4 Interrupts: Clearing and related questions.

Question asked by CS on Apr 26, 2013
Latest reply on Apr 26, 2013 by Clive One
Hi 
Just some general questions on interrupts:

I assume that external interrupts need to be be cleared. There are some forum threads that are suggesting that this is done "automatically" and it does not need to be coded. I'm going with  something like this (assuming that they do need to be cleared)

extern "C" void EXTI4_IRQHandler()
    {
    if (EXTI_GetITStatus(EXTI_Line4 ) != RESET)
     {
     EXTI_ClearITPendingBit(EXTI_Line4 );
     NowDoSomethin();
     }
    }

Also tracing back the EXTI_ClearITPendingBit function into the ST lib I see that there is also a clear Flag call that can be made

void EXTI_ClearFlag(uint32_t EXTI_Line);
void EXTI_ClearITPendingBit(uint32_t EXTI_Line);

Is clearing the bit the right way to go and when would the ClearFlag be used??

Outcomes