Flag uart THRE e TEMT

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Flag uart THRE e TEMT

467 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by iig3998 on Sat Feb 08 10:22:37 MST 2014
Hi all,

i am a beginner and i use the lpc1114. I want send with uart the chars. I don't want use the interrupt to send the chars. I don't use the FIFO TX. With the software polling 2 flag of register U0LSR: THRE e TEMT.
I read the user manual but I don't understand what indicate.

What are?

What differences are there between the two?

Thanks.
Labels (1)
0 Kudos
1 Reply

404 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by embd02161991 on Thu Feb 13 03:42:08 MST 2014
Hi,

The THR indicates the Transmitter Holding Register. It contains the next character to be transmitted. The TSR is a Transmitter Shift Register, which is a shadow register and reads from THR  and is assembled to be transmitted via the physical interface. The THRE bit is set, when the THR register is empty. The TEMT bit is set when both the THR and TSR is empty. There could be a situation where the THR is empty but the TSR isn't . In which case , data is present in the shift register to be transmitted . This helps to identify the status of the UART interface.

Thanks,
NXP Technical Support
0 Kudos