Question
STM32F4 Interrupts: Clearing and related questions.
Posted on April 26, 2013 at 11:49
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 madevoid 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?? #stm32f4-irq-interrupt