cancel
Showing results for 
Search instead for 
Did you mean: 

What happens if an interrupt raised when interrupt is disabled through __disable_irq()? Is it pended or just missed?

Yang Yang
Associate II
 
1 ACCEPTED SOLUTION

Accepted Solutions
S.Ma
Principal

It will be pending until interrupts are enabled again.

View solution in original post

3 REPLIES 3
S.Ma
Principal

Disabling interrupt should intuitively just be a AND mask, because to clear any pending interrupt would require ti kling perupheral registers.

A side note: don t disable / enable interrupts only. If the interrupts were already disabled by higher level function, the code will enable them wrongly. Push the core register controlling interrupt enable in the stack, then disable, do the deeds and pop the register to restore previous setting. The easiest way to see the side effect would be to think recurse function.

Hello, ST experts

Thanks for your quick reply. Sorry I really do not quite understand what you mean? What is "ti kling"? And what is "perupheral"?

Back to my question, what happens if an interrupt is raised when interrupt is disabled?

Best Regards

Yang​

S.Ma
Principal

It will be pending until interrupts are enabled again.