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.

CCS/TM4C123GH6PM: Problem with UART

Part Number: TM4C123GH6PM
Other Parts Discussed in Thread: EK-TM4C123GXL

Tool/software: Code Composer Studio

The uart_echo example worked as expected, however, I copy the uart_echo.c file to another project. After changing the properties of the project, this project can be compiled successfully, but the uart_echo doesn't work.

  • Hi,

      What project properties did you change? What is the project you copy the uart_echo.c to? One thing to make sure is that in the other project, do you have any peripherals using the same pins as the uart_echo.c. The uart_echo.c uses PA0 and PA1 pins. Make sure you don't have other peripherals using the same pins. One more thing is if you have the correct baudrate, stop bits and parity in your terminal window settings. If you have the oscilloscope, you can probe the PA1 to see if you are transmitting the data. 

  • The TivaWare_C_Series-2.2.0.295/examples/boards/ek-tm4c123gxl/uart_echo/uart_echo.c contains the interrupt handler function UARTIntHandler() which performs the echo. The TivaWare_C_Series-2.2.0.295/examples/boards/ek-tm4c123gxl/uart_echo/startup_ccs.c file in the example registers the UARTIntHandler() in the g_pfnVectors[] vector array of interrupt handlers.

    If the uart_echo.c source file is copied into another project, and the g_pfnVectors[] array is not updated to add the entry for UARTIntHandler(), then the program will end up in the IntDefaultHandler() when a UART interrupt occurs.

  • Hi Chester,

      Thanks for your input. That is certainly another thing to check. The poster can reference the uart_echo startup fiile on the vector table.