Hallo.
SCI of TMS320x28xxx has a bug.
This program sends data to TXBUF untill FIFO will will become full. Then it checks TXEMPTY flag. The logic say that we can't see "1" in TXEMPTY but there is a small interval of time when data left SCITXBUF and TXSHF but new data doesn't come from FIFO yet so we can see "1" in TXEMPTY.
The best thing you can do is to check TXEMPTY twice. Will it help us in any situation?
Try this code to reproduce this bug: