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.

TM4C129ENCPDT: UART Flow Control with TI-RTOS

Part Number: TM4C129ENCPDT
Other Parts Discussed in Thread: CC1310

Hi All,

Please tell me about Tiva-C's UART Flow Control with TI-RTOS.

Customer communicating with UART between Tiva-C and CC1310, and it was connected both CTX and RTS, but it can not communicate.

When checking the communication waveform with the oscilloscope, both signals were pull-down and were always asserted.

Therefore, when RTS Pin of CC1310 was Pull-UP with PIN_Config(), communication of Tiva-C(Tx) -> CC1310(Rx) could be controlled.

They tried Pull-UP of Tiva-C's RTS pin in the same way, but I could not set it with Pin_Config().

They tried to Pull-UP with external resistance, but if they make it BIOS_Start with TI-RTOS the RTS pin will be asserted.

(Up to BIOS_Start, RTS was Pull-Up.)

So please tell me about the following contents.

1. Can Tiva-C use UART function and built-in Pull-UP function at the same time?

2. Can I control Tiva-C's UART Flow Control with TI-RTOS?

Best Regards,

Takashi

  • Hi Takashi-san,

     I'm not an RTOS expert. I think from TI-RTOS perspective you need to define RTS/CTS hardware attributes in the uartTivaHWAttrs. Most likely you have the default with the flowControl turned off. I think you will need to change from  UART_FLOWCONTROL_NONE to UART_FLOWCONTROL_TX | UART_FLOWCONTROL_RX to enable both CTS/RTS. In the EK_TM4C129EXL_initUART() you need to add/configure the pinmux of the CTS/RTS pins of your selected UART instance accordingly.

    const UARTTiva_HWAttrs uartTivaHWAttrs[EK_TM4C129EXL_UARTCOUNT] = {
        {
            .baseAddr = UART0_BASE,
            .intNum = INT_UART0,
            .intPriority = (~0),
            .flowControl = UART_FLOWCONTROL_NONE,
            .ringBufPtr  = uartTivaRingBuffer[0],
            .ringBufSize = sizeof(uartTivaRingBuffer[0])
        }
    };
    
    const UART_Config UART_config[] = {
        {
            .fxnTablePtr = &UARTTiva_fxnTable,
            .object = &uartTivaObjects[0],
            .hwAttrs = &uartTivaHWAttrs[0]
        },
        {NULL, NULL, NULL}
    };
    #endif /* TI_DRIVERS_UART_DMA */
    
    /*
     *  ======== EK_TM4C129EXL_initUART ========
     */
    void EK_TM4C129EXL_initUART(void)
    {
        /* Enable and configure the peripherals used by the uart. */
        SysCtlPeripheralEnable(SYSCTL_PERIPH_UART0);
        GPIOPinConfigure(GPIO_PA0_U0RX);
        GPIOPinConfigure(GPIO_PA1_U0TX);
        GPIOPinTypeUART(GPIO_PORTA_BASE, GPIO_PIN_0 | GPIO_PIN_1);
    
        /* Initialize the UART driver */
    #if TI_DRIVERS_UART_DMA
        EK_TM4C129EXL_initDMA();
    #endif
        UART_init();
    }