AnsweredAssumed Answered

Clearing SCI Transmit Interrupt Flag

Question asked by Shawn Lammers on Dec 12, 2006
Latest reply on Dec 12, 2006 by Mark Butcher
I am using a MC9S12C64 and am trying to use the transmit interrupt to send each charcter out the serial port. However, I can not seem to clear the Interrupt flags. When I get an Interrupt for TDRE or TC, I read SCISR1 and then write to SCIDRL as sugegsted in the datasheet but the interrupts just continue indefinitley even after I am not longer sending data.

From my understanding, TDRE is set one the transmit buffer is free. I write to the buffer for the next character. If no characters are to be sent I do not write to the data register.

This will cause TC interrupt since the TDRE flag is set and no data is being transmitted.

Now both TC and TDRE are set. The SCI interrupt will not continualy be called evern though no characters are being sent.

How can you clear these flags so no interrupts occur after I have sent all my information?

Thanks Shawn