Hello,
If THRIT in IER and and TXEMPTYCTLIT in SCR are set, according to the TRM table 19-58 the following should happen: "THR interrupt is generated when TX FIFO and TX shift register are empty", i.e. there is no more bit to be transferred, correct?
If a test for "(lsr & UART_LSR_THRE) && (iir & UART_IIR_THRI)" in the interrupt routine is true, then there is no more bit to be transferred, i.e. the last bit has left the shift register, correct?
In a test application I send 5 bytes through an RS-485 transceiver with 9600 bps. When the condition described above is met in the interrupt handler I disable the RS-485 transceiver so no more bits can leave it. From the 5 bytes I send I can only receive 3 on the other side of the transceiver. It looks like I am disabling the transceiver too early, but what I am doing is in accordance with the TRM, I think.
What am I missing in the configuration of the interrupts?
Many thanks and kind regards, Felix