lpcware

can't get uart tx fifo to work

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Feb 3, 2017 by Tobias Frauenrath
Content originally posted in LPCWare by ToBeFrank on Sat Jul 30 20:44:25 MST 2011
Hello,

I've got my uart code working fine, however, when measuring it with a scope, it appears the TX fifo is not working. I send a byte with the following code:

while ((LPC_UART->LSR & LSR_THRE) == 0);
LPC_UART->THR = ch;


I call this in a loop to send the message. I would expect the first 16 bytes to go fast, however I see the first byte take 830ns, the second 2.2us, and the remaining bytes take 84us each. I'm running at 115200 baud so the 84us is consistent with that, but I don't understand why I don't see the first 16 bytes going quick. What am I doing wrong?

Forgot to mention I'm using a LPC11C24.

Outcomes