You are here

UART Rx Status Byte/s | Cypress Semiconductor

UART Rx Status Byte/s

Summary: 2 Replies, Latest post by hli on 11 Sep 2012 07:50 AM PDT
Verified Answers: 0
Last post
Log in to post new comments.
RodneyE's picture
6 posts

Hi All.

Is there a corresponding RX status byte for each byte of data that the UART recieves, or is there a single status byte that contains information about the last data byte that was received?

Lets say have an ISR whose source is the "RX - On Byte Received" signal. If the target is busy doing "something else", and by the time the ISR is called there are two bytes of data in the UART RX FIFO, do I need to check the RX status byte once, or once for each byte of data in the FIFO?

From the component datasheet, it appears that there is only one status byte, but I would like to be sure.

- R

user_460349's picture
1362 posts

The status should be just the last byte received. If you need to check the RX status, the best is to check this inside a RX interrupt.

user_78878863's picture
2551 posts

Typically in your RX-ISR you should check, after each byte, if there is anything left in the receive fifo:

if (0!=(UART_RX_STS_FIFO_NOTEMPTY & UART_ReadRxStatus()))

Log in to post new comments.