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.

msp430: interrupt delayed by atomic section?

Hi all,

I was not able to find in the manual nor in the forum the answer to the following simple question:

Does an interrupt occurring inside an atomic section will be serviced after EINT?

Here what i mean:

...

DINT

NOP

instruction 1

instruction 2 <- an interrupt occur here and IFG is set by hardware (IE is obviously 1)

instruction 3 

EINT

instruction 4 ->does ISR fires here? Or the interrupt event is lost?

...

Thank you,

PL

  • The event is not lost as long as there weren't two consecutive interrupts from the same source during that time, of course. If the flag is set during disabled interrupts, they will be serviced immediately after interrupts are enabled again. But interrupt priority comes into place here - if there are several pending interrupts from different sources, the one with the highest priority will be serviced first. Of course servicing higher priority interrupts mustn't take too long so that another interrupt from the same source occurs while there is a pending one already.

    Dennis
  • Thank you Dennis for your answer.

**Attention** This is a public forum