Please correct if I am wrong.
If TXFE=0---FIFO is not empty(full)
and TXFF=1--FIFO is full (not empty)
then what is the need of two separate bits(TXFF,TXFE) ?
Same for RX also .
Please explain!
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Please correct if I am wrong.
If TXFE=0---FIFO is not empty(full)
and TXFF=1--FIFO is full (not empty)
then what is the need of two separate bits(TXFF,TXFE) ?
Same for RX also .
Please explain!
From the User Manual
TxFE
UART Transmit FIFO Empty
The meaning of this bit depends on the state of the FEN bit in the
UARTLCRH register.
Value Description
0 The transmitter has data to transmit.
1 If the FIFO is disabled (FEN is 0), the transmit holding register
is empty.
If the FIFO is enabled (FEN is 1), the transmit FIFO is empty
TxFF
UART Transmit FIFO Full
The meaning of this bit depends on the state of the FEN bit in the
UARTLCRH register.
Value Description
0 The transmitter is not full.
1 If the FIFO is disabled (FEN is 0), the transmit holding register
is full.
If the FIFO is enabled (FEN is 1), the transmit FIFO is full.
Obviously quite different meanings
Four distinct possibilities
TxFE, TxFF both 0 Not empty, not full
TxFE 1, TxFF 0 Empty, not full
TxFE 0, TxFF 1 not Empty, Full
TxFE, TxFF both 1. This would indicate both full and empty and thus is not a legal state. The others all have obvious distinct meanings though
Robert
Thanks Robert !
Yeah I got now.TXFE=1 mean no data in fifo but it does not mean whenever TXFF=0 ,the fifo is completely Empty.
thanks