I looks like you may be turning off the 485 transmit enable before the UART has finished sending the last byte. Many UARTs give the TX interrupt when the have started sending the byte. You either need to wait for the "shift register empty" state or use a timer to give the byte time to finish.
|