Sleeping or blocking in interrupt handler

205 views Asked by At

Why sleeping or blocking not allowed in interrupt handler.

Assume i have following setup.

  1. Single core system.
  2. Developing a bare-metal application using FreeRTOS.

There are many FreeRTOS APIs which cannot be called from ISR context as they may block waiting for events to occur. So this means we cannot put the ISR in blocked state.

1

There are 1 answers

0
the busybee On

If you block in an interrupt handler, it can commonly not be triggered again. And all other interrupts of same and lower priority, and the non-interrupt part of your program are blocked, too.

Final line: don't do it.