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.

MSP430FR2355: Interrupts occurring almost simultaneously on both Port 1 and Port 2

Part Number: MSP430FR2355


I'm using the MSP430FR2355 to receive pulses from twelve IR encoders, some are on, some are off.  Some or all arrive at the MSP430 almost simultaneously (within 10's of nanoseconds of each other).

I bring 8 of the signals into Port 1 and the other 4 into Port 2.

I enable the interrupts for each of the twelve signals. 

  I test the P1IFG register in my Port 1 ISR to see which IR encoder(s) was active and had caused an interrupt.

  I do a global interrupt disable when I enter the Port 1 ISR.  I enable the global interrupt when I leave and clear the P1IFG, setting it to 0x0000.

After the program leaves the Port 1 ISR, will the the Port 2 ISR be entered if there were interrupts on Port 2  and if Port 2 interrupts were enabled in the P2IE register?

  • 1) If you exit the P1 ISR with (P1IFG & P1IE) == 0, and (P2IFG & P2IE) != 0, then the P2 ISR will be called.

    2) If some of the P1IFG bits become set after you clear P1IFG but before you exit the P1 ISR, the P1ISR will be called again, since it is higher priority.. [Ref Data Sheet (SLASEC4D) Table 6-2]

    Unsolicited: Your description makes it sound as though you're explicitly disabling/enabling GIE in the ISR. The hardware does this for you; doing it yourself is hazardous.

**Attention** This is a public forum