During initialization, my application configures the TMS320F28034's SCI to operate in FIFO enhanced mode with interrupts. Even before any data is transmitted by the SCI, the SCI's TX interrupt is generated whenever the TX FIFO enhancements are enabled.
The following instruction seems to be causing the problem:
SciaRegs.SCIFFTX.bit.SCIFFENA = 1;
Resetting the SCI channels (see instructions below) momentarily remedies the situation
SciaRegs.SCIFFTX.bit.SCIRST = 0;
SciaRegs.SCIFFTX.bit.SCIRST = 1;
Resetting the SCI's TX FIFOs (see instructions below) momentarily remedies the situation
SciaRegs.SCIFFTX.bit.TXFIFOXRESET = 0;
SciaRegs.SCIFFTX.bit.TXFIFOXRESET = 1;
But the following instruction, the one that clears the FIFO TX interrupt flag
SciaRegs.SCIFFTX.bit.TXFFINTCLR = 1;
Does NOT do anything to clear the unwanted interrupt flag.
Does anyone have any suggestions? I've seen where people use some state machine logic, but this seems like a very cumbersome solution.