I am able to run the uart_echo sample project on my DK-TM4C129X dev kit board without any problems. When I connect a terminal emulator program to the USB debug port on the board, I see the "Enter text:" prompt, and any characters I type get echoed.
However, when I try to talk to the UART from my custom project I am not able to duplicate the functionality of the sample project. My code tries to write a string ("Testing") to UART0. When I single step through the code, I see that every time I call UARTCharPut() two bytes get received by the terminal emulator. The second byte is always 0xFF, and the first byte bears no resemblance to what I am trying to send.
For example, when I try to send "Testing" I get the following bytes received by the terminal emulator:
28 FF C9 FF E7 FF E8 FF D1 FF DE FF CF FF
Another odd thing is that if I run at full speed I do not see all the characters sent out. Instead, the terminal emulator receives
28 19 21 FF
Since UARTCharPut() is supposed to block until the tx is ready, this is very puzzling.
I compared my UART0 register settings against those in the uart_echo project, and they are identical:
Any idea what could cause this behavior? There must be something different, but I have checked stuff all day long and have come up with nothing.
Thanks,
Dave