Skip to main content
Yang Yang
Associate III
January 2, 2020
Solved

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

  • January 2, 2020
  • 2 replies
  • 2839 views

..

This topic has been closed for replies.
Best answer by S.Ma

It will be pending until interrupts are enabled again.

2 replies

S.Ma
Principal
January 2, 2020

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.

Yang Yang
Yang YangAuthor
Associate III
January 2, 2020

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
S.MaBest answer
Principal
January 2, 2020

It will be pending until interrupts are enabled again.