Electronic – MSP430 USCI – Are the interrupt flags still active when interrupts are explicitly disabled

msp430spi

I am using an MSP430 USCI in SPI mode. I would like to confirm my understanding of this:

If UCTXIE and UCRXIE are explicitly disabled when the interface is initialized after UCSWRST is cleared the UCTXIFG and UCRXIFG should still operate as expected even though the interrupts are disabled, right?

From SLAU208M 35.3.8.1

The UCTXIFG interrupt flag is set by the transmitter to indicate that UCxTXBUF is ready to accept another character. An interrupt request is generated if UCTXIE and GIE are also set.

Best Answer

Yes. That is how polled data transmissions are implemented.

Interrupt flags are independent from interrupt enables. IFG bits are set when specific hardware conditions are met and may trigger interrupt when associated IE bit is also set. Procedure for clearing the flag is the same for both cases.

There might be an exception when the flag triggers a DMA transfer, in that case the flag is cleared automatically.