Tool/software: Code Composer Studio
I am using the transmit buffer empty flag in an ISR to signal when the transfer is done. This is in a system that is using 485 two wire so an additional IO is used to set the direction of the 485 driver chip. I find that if and do not insert a delay after detecting that the transmit buffer is empty the direction control gets set to receive before the last bit is actually done. In fact if I apply any UART control bits to turn the serial communications around to receive inside the msp such as putting the Uart in reset with SWRST or change the ME bits the data does not complete. I find I have to do a for loop for at least 10 counts before doing anything to turn around to the receive condition. The msp is running at 7.3MHz and the baud rate is 230400.
Is this typical for msp430, or is there something else I should be looking at inside the UART state machine to guaranty that all the data has cleared the port including the stop bit? (8N1).