Hi @wasdqwerfzxcv
When the RX FIFO watermark (RXWATER) is set higher than 0, the RDRF flag becomes 1 before the FIFO is actually full. If the software does not read out the FIFO fast enough after RDRF=1, new incoming bytes can fill the FIFO completely, and once it’s full, the next received character causes the overrun error.
When you set RXWATER=0, the interrupt triggers earlier—after just one received byte—so your software has more time to read data, preventing FIFO full conditions and avoiding overrun.
Therefore, the overrun flag is not triggered just because RDRF=1, but only when the FIFO is full and another new character arrives. However, setting the watermark too high increases the risk that the FIFO becomes full before your software empties it.
So i think you can Keep RXWATER = 0 if you want earliest interrupt and minimal risk of overrun.
Or, if using RXWATER > 0, ensure:
UART RX interrupt has high priority.
BR
Harry