Dear all
I'm developing a project based on LPC5526 CPU. I have to implement RS-485 communication so I have to set an extarnal RS485 driver in RX or TX mode. To do that I'm using a GPIO output port bit.
But, before switching from TX to RX, I must be sure that the trasnsmitted data is phisically completely shifted out from the serial Tx pin of the CPU.
So I have to check if
Internal Tx FIFO is empty
and
data byte is phisically completely shifted out from the serial Px PIN of the CPU
...
if( TxFitoIsEmpty() } {
if( DataByteIsCompletelyShiftedOut() ) {
setDeviceToTxMode();
}
}
.....
What are the right status USART flags that I have to check ?
Thank you very much for your help and cooperation
regards