Implementing interrupt-driven serial output on an HCS12, I have to Do Things while the serial data is on its way so a simple wait loop waits too much time. On the HCS12 (may be typical of other CPUs), the serial interrupt flag is reset by:
(1) Reading the serial status register while the TDRE flag is set (Tx data reg empty). (2) Writing to the TXDR (ie. sending out another character).
How do I reset the interrupt flag without sending another character (which I defnitely don't want to happen here) if I have nothing more to send?