AnsweredAssumed Answered

[Interrupt] Clear Interrupt Flag timing

Question asked by Pogo Lin on Oct 24, 2013
Latest reply on Oct 24, 2013 by Edward Karpicz

Hi All,

If I have one interrupt function

 

Type1 : Do something then clear interrupt flag

void interrupt ISR_XXX(void)

{

     do something;

     clear interrupt flag;

}

 

Type2: Clear interrupt flag and do something

void Interrupt ISR_XXX(void)

{

     clear interrupt flag;

     do something;

}

 

Which one is best? And could anyone help me to explain what difference between them?

 

Thanks

 

Regards,

Pogo Lin

Outcomes