Hi Everyone;
I am trying to communicate with Uart. But I am encountering such an error. What could be the reason for this?
I see the same error when I activate FIFO Support. The difference between activating and not activating FIFO Support is that when FIFO Support is active, the error occurs after a while. What does FIFO Support do?
Thank you in advance.
Regards.guurii
Hi Dale,
Thank you for your attention to this issue.
My application receive one character at a time.
Even when I specify a length greater than 1, I continue to get the same error.
If I disable FIFO Support, I see an overflow error after receiving 1 character.If I enable FIFO Support, I can receive 16 characters, then I get the overflow error again.
at the same time, If I use 2 instead of 1 in Read, I get an overflow error when the buffer fills up to 8 instead of 16.
The FIFO has 16 stages which means it can store up to 16 bytes and their related status information. So when the FIFO is full and a new byte arrives, you will get an overflow error.
Thanks for your interest.
I know that FIFO stores 16 bytes, but how can I empty it after the FIFO is full?
I still have data to receive and I can't.
The bytes that are read from R_SCI_Read do not exist in FIFO anymore. If FIFO has 16 new bytes to be read and you read 16 bytes, the FIFO will be empty.
If you are processing one character at a time, then do not enable the FIFO and use the UART_EVENT_RX_CHAR interrupt, *not* the UART_EVENT_RX_COMPLETE interrupt. IN your interrupt handler, when you get the UART_EVENT_RX_CHAR interrupt, do another read to prepare for the next reception. If you do not do another read operation, then the buffer will overflow and you will get that error.