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.

TIVA C UART Echo Example Troubles



Hello,

I have just opened a new Tiva C LaunchPad Evaluation Kit (EK-TMC123GXL) and having trouble with the uart_echo.c example that is provided.

I have gotten the blinky example to work so I believe the divers are installed correctly. I am using Code Composer 5.4 (I have installed everything from the support page, the EK-TM4C123GXL-CCS package).

The problem is I cannot get the micro to echo back. I assume I connect using the CCS terminal (View>Other...>Terminal>Terminal).

The comments in the code indicate '115,200, 8-N-1' as the settings, so that is what I have; additionally I set encoding to UTF-8 no flow control. Same settings for the actual COM port under Device Manager in Windows.

Now what is strange is that if I set the baud to 9600, I get some functionality: if I push the reset button, I get trash at the terminal window; if I type in the terminal window, what I type becomes trash but the led blinks (expected from the comments in the code); if I type in the terminal command line (Command Input Field) and hit return, trash is sent and displayed, led blinks.

Now if I use putty/kitty with the required settings, I get closer to what I think is the expected behavior. Pushing the reset button displays the expected prompt 'Enter Text:'. Entering text blinks the led as characters are typed, expected behavior. However, hitting return simply returns the cursor to the beginning of the line, 'Enter Text:' + Text Input remains; so in other words the input is not echoed.

So in summary, what is the proper way to evaluate uart_echo.c? Why does the terminal in CCS not behave correctly; am I missing using it somehow?

Any help is appreciated, thanks in advance.

  • Hi,

    First, it would be wise to upgrade to CCSv6, since the project wizard is really improved and there are some other good things implemented, not obvious at first sight.

    As for your echo program, please use an oscilloscope to monitor first the line UART Rx on Launchpad and see if you get  characters from PC. Then move the probe to UART Tx pin and see if the micro sends characters to PC. Next step is to use two probes and see if what get from PC is same as you send to - well, it will be a little bit harder to see, but with a DSO you may succeed. 

    This way you will be  see that the PC send characters and PUTTY just display what it receives. 

    (Seems to me that terminal in version 5.x was incomplete, so use only putty). 

    Petrei

  • Hi,

    So to test the echo example without modifiyng anytigh should be by,

    setting up the serial monitor of your choise to 115200 baudrate

    8 bit packets, no parity, 1 stop bit.

    So after you program your launchpad open your monitor with those options, and write data, it should write it back. To see the  UARTSend((uint8_t *)"\033[2JEnter text: ", 16); you need to press the reset while the monitor is open.

    To check if the drivers are all right just check the dispositive manager (i think that's the name in english) and see if there aren't any devices that have the exclamation mark that they are not instaled

    Edit: while i was writting Petrei ahah

  • HI TI Guy from TX,

         I guess your alias means you work for Texas Instruments.

         First of all from what I know the CCS Serial Terminal only works at a lower baud rate.

    TI Guy from TX said:
    Entering text blinks the led as characters are typed, expected behavior. However, hitting return simply returns the cursor to the beginning of the line, 'Enter Text:' + Text Input remains; so in other words the input is not echoed.

        I have verified before that each letter you type after "Enter Text:" is echoed back to serial console like Putty.

        You can confirm this by putting a breakpoint at UARTIntHandler at uart_echo example program in debug mode. Then type a letter after "Enter Text:"

        The uart_echo example program does not work that after you type a word after "Enter Text:", then you press "Enter", the entire word will be echoed back    

    - kel

  • Hi All,

    You may improve the functionality of this application if you just simply add +1 to the received character and sent it back. This way you may be sure you  type "a" and on screen will be displayed "b".

    Petrei