This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

interrupt queue

Hello,

Can we put lower priority interrupts into a queue.

Thanks.

  • They are put into a queue by hardware automatically - when hi priority interrupt service routine ends, then lower priority ISR is called. Why you ask?

  • Ilmars said:
    They are put into a queue by hardware automatically

    Not exactly a queue.

    All pending interrupts are flagged to a priority encoder. When the CPU is ready to serve an interrupt, the one with the highest priority is served. However, each interrupt has only one input to the priority encoder, so multiple interrupts aren't 'queued'. Interrupt handling is just a matter of 'pending' or 'not pending' (means: xxxIE and xxxIFG and GIE bit being all set or not).

    The flagging is level-dependent, So if an IFG or IE bit is cleared before the interrupt was handled, it will simply disappear without a trace.

    Note that a higher priority interrupt won't interrupt a lower-priority ISR once it has started.

**Attention** This is a public forum