This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

UART FIFO

Hi,
i got a problem with the UARTn FIFO .
Can someone explain me how i get the data from this register?
The manual says that, if i enable the Rx trigger level
for example level3 (8 character) the RxFIFO get the data and after the 8th char is arrived interrupt is set.that works so far.
but where are the data?

thx

Parents
  • Oops. You kind of forgot to mention what processor you are using. All ARM are not the same!

    Anyway - you normally read the data from the receive register just as if no FIFO has been enabled. It's just that you can read multiple times. There is a flag to tell you if the Rx FIFO is empty or not. As long as it isn't empty, you can continue to read.

    The same thing with transmit. There is a flag that tells you if the Tx FIFO is full. As long as it isn't full, you can continue to stuff data into the transmit FIFO.

    Just a note about reception. If you set the FIFO to interrupt after 8 characters, you also have a Rx timeout, i.e. if there are less than 8 characters received, the UART will after a little while timeout and issue an interrupt anyway.

Reply
  • Oops. You kind of forgot to mention what processor you are using. All ARM are not the same!

    Anyway - you normally read the data from the receive register just as if no FIFO has been enabled. It's just that you can read multiple times. There is a flag to tell you if the Rx FIFO is empty or not. As long as it isn't empty, you can continue to read.

    The same thing with transmit. There is a flag that tells you if the Tx FIFO is full. As long as it isn't full, you can continue to stuff data into the transmit FIFO.

    Just a note about reception. If you set the FIFO to interrupt after 8 characters, you also have a Rx timeout, i.e. if there are less than 8 characters received, the UART will after a little while timeout and issue an interrupt anyway.

Children