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.

EK-TM4C1294XL: How to use UART6 in EK-TM4C1294XL

Part Number: EK-TM4C1294XL

Hi

I am new to Tiva platform I made Tiva board up using tiva-c-master software stack I tested some examples like blinky, hello,uart_echo (able to read and write)

Here I need to configure uart6 and read and write data through uart6

 what changes I should do in uart_echo.c and how to  test uart6 

thank you

  • To use uart6, first you must have the appropriate hardware attached to pins PP0(U6Rx) and PP1(U6Tx). Then you must make the following software changes:

    In uart_echo.c

    1. Change all occurrences of UART0_BASE, to UART6_BASE

    2. Change

        //
        // Enable the peripherals used by this example.
        //
        ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_UART0);
        ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOA);
    

    to

        //
        // Enable the peripherals used by this example.
        //
        ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_UART6);
        ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOP);
    

    3. Change the GPIO pin configuration from:

        //
        // Set GPIO A0 and A1 as UART pins.
        //
        GPIOPinConfigure(GPIO_PA0_U0RX);
        GPIOPinConfigure(GPIO_PA1_U0TX);
        ROM_GPIOPinTypeUART(GPIO_PORTA_BASE, GPIO_PIN_0 | GPIO_PIN_1);
    

    to

        //
        // Set GPIO P0 and P1 as UART pins.
        //
        GPIOPinConfigure(GPIO_PP0_U6RX);
        GPIOPinConfigure(GPIO_PP1_U6TX);
        ROM_GPIOPinTypeUART(GPIO_PORTP_BASE, GPIO_PIN_0 | GPIO_PIN_1);
    

    4. Change the interrupt source from:

        ROM_IntEnable(INT_UART0);
    

    to

        ROM_IntEnable(INT_UART6);
    

    And in the file "startup_ccs.c" change the name of the UART6 interrupt handler from "IntDefaultsHandler" to "UARTIntHandler" in line 147.

  • Hi

    thanks for the reply :)

    I changed as you mentioned above but I am not able to read and write through uart cable
  • Had you noted - and then followed - vendor Bob's clear guidance, "To use uart6,  first you must have the appropriate hardware attached to pins PP0(U6Rx) and PP1(U6Tx)."

    Your writing, "through uart cable" does not (adequately) detail that cable - nor your method to create, "Signal Level Compatibility" - required between UART_6 and your "Connected Device!"    It is this NEED for "Signal Level Compatibility" - which Bob noted via his direction, "appropriate hardware attached."    (usually this is a "CMOS to USB" converter - enabling MCU's UART to "transact" w/PC's USB Port.)

    It would prove useful for you to describe just how you've concluded, "inability to read/write - thru the cable" - and to identify your "connected device."    (PC usually assumed)

  • Yea I am using USB to TTL cable connected to PP0 and PP1 of tm4c1294xl to PC

    I still not getting any response Is there any jumper settings for UART6

    Please can anyone share me code and bin file inwhich UART6 was tested so that I can verify my hardware and software
  • Can you check GPIO_PP1 (U6TX) pin with an oscilloscope to verify if the issue is with EK-TM4C1294XL or on the cable/PC side?
  • Here is the CCS project I used to create the instructions I provided for you:/cfs-file/__key/communityserver-discussions-components-files/908/uart6_5F00_echo.zip

    Since I do not have the hardware for interfacing to UART6, I traced the output with a logic analyzer. It also shows the ASCII interpretation of the UART6 TX signal.

  • Thank you sir :)

    it got worked .
  • Hi

    Can I get a code for tm4c129xl to interface with GSM module or any example program

    or how can I use two Uarts(for both debug and uart send) I am planning to use uart0 for debug and Uart2 for sending data
    how can I configure both so it should work simultaneously

    thank you and regards
  • Sorry, I do not have an example of interfacing to a GSM module, although I have seen many questions from people who have done that. I have addressed the question about multiple UARTs in your new post:
    e2e.ti.com/.../2413347
  • Thank you sir

    I got some idea
    what I need do is I just want to write from uart2
    and read whatever there in uart2 from uart0 and write it over console
    so how can do that using uart_echo example

    thank you
  • What you are trying to do is beyond the scope of the project "uart_echo". You can start with that project, but you will need to initialize both UARTs and modify the main function to perform the operation you desire.