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.

RTOS/CC1310: CC1310 Uart flow control - RS485

Part Number: CC1310

Tool/software: TI-RTOS

Hi, I trying to use UART on CC1310 with flow control (in RS485), these are my configurations on my custom board

const PIN_Config BoardGpioInitTable[] = {
    CUSTOM_UART_RX | PIN_INPUT_EN | PIN_PULLDOWN,                                                      /* UART RX via debugger back channel */
    CUSTOM_UART_TX | PIN_GPIO_OUTPUT_EN | PIN_GPIO_HIGH | PIN_PUSHPULL,          /* UART TX via debugger back channel */
    CUSTOM_UART_RTS | PIN_GPIO_OUTPUT_EN | PIN_GPIO_HIGH | PIN_PUSHPULL,
    CUSTOM_UART_CTS | PIN_INPUT_EN | PIN_GPIO_LOW | PIN_NOPULL | PIN_IRQ_DIS,
    CUSTOM_SPI0_MOSI | PIN_INPUT_EN | PIN_PULLDOWN,                                                     /* SPI master out - slave in */
    CUSTOM_SPI0_MISO | PIN_INPUT_EN | PIN_PULLDOWN,                                                     /* SPI master in - slave out */
    CUSTOM_SPI0_CLK | PIN_INPUT_EN | PIN_PULLDOWN,                                                       /* SPI clock */
    PIN_TERMINATE
};
/* UART Board */
#define CUSTOM_UART                  CC1310_LAUNCHXL_UART0
#define CUSTOM_UART_RX           IOID_2
#define CUSTOM_UART_TX           IOID_1
#define CUSTOM_UART_CTS        IOID_3
#define CUSTOM_UART_RTS        IOID_4

const UARTCC26XX_HWAttrsV2 uartCC26XXHWAttrs[CC1310_LAUNCHXL_UARTCOUNT] = {
{
.baseAddr = UART0_BASE,
.powerMngrId = PowerCC26XX_PERIPH_UART0,
.intNum = INT_UART0_COMB,
.intPriority = ~0,
.swiPriority = 0,
.txPin = CUSTOM_UART_TX,
.rxPin = CUSTOM_UART_RX,
.ctsPin = CUSTOM_UART_CTS,
.rtsPin = CUSTOM_UART_RTS,
.ringBufPtr = uartCC26XXRingBuffer[CC1310_LAUNCHXL_UART0],
.ringBufSize = sizeof(uartCC26XXRingBuffer[CC1310_LAUNCHXL_UART0]),
.txIntFifoThr = UARTCC26XX_FIFO_THRESHOLD_1_8,
.rxIntFifoThr = UARTCC26XX_FIFO_THRESHOLD_4_8,
.errorFxn = NULL
}
};

Are my CTS and RTS pin configurations ok? but I can´t receive any data.

  • To enable flow control, the only thing you have to do is to set

    .ctsPin = CUSTOM_UART_CTS,
    .rtsPin = CUSTOM_UART_RTS

    Can you please provide more info regarding what HW you are using, what SW you use, what problems you see? It is not possible to guess what is wrong without more details.

    Siri
  • Hello, I need to use the CC1310 with ADM3065E (RS485 Transceiver), and when I worked with PIC and STM I use the same circuit attached, in this circuit UART_FC is union between CTS and RTS pin, I trying but in CC1310 don´t working.

    Thanks

  • From the schematic it looks like the CC1310 is able to send a signal to ADM3065E but not the other way. Using both CTS and RTS require a two way communication as I read it. If you only use one way you should disable the direction you are not using.
  • Hello, I tried whit this configuration but don´t work

    #define CUSTOM_UART CC1310_LAUNCHXL_UART0
    #define CUSTOM_UART_RX IOID_2
    #define CUSTOM_UART_TX IOID_1
    #define CUSTOM_UART_CTS PIN_UNASSIGNED
    #define CUSTOM_UART_RTS IOID_4
    
    const UARTCC26XX_HWAttrsV2 uartCC26XXHWAttrs[CC1310_LAUNCHXL_UARTCOUNT] = {
        {
            .baseAddr       = UART0_BASE,
            .powerMngrId    = PowerCC26XX_PERIPH_UART0,
            .intNum         = INT_UART0_COMB,
            .intPriority    = ~0,
            .swiPriority    = 0,
            .txPin          = CUSTOM_UART_TX,
            .rxPin          = CUSTOM_UART_RX,
            .ctsPin         = CUSTOM_UART_CTS,
            .rtsPin         = CUSTOM_UART_RTS,
            .ringBufPtr     = uartCC26XXRingBuffer[CC1310_LAUNCHXL_UART0],
            .ringBufSize    = sizeof(uartCC26XXRingBuffer[CC1310_LAUNCHXL_UART0]),
            .txIntFifoThr   = UARTCC26XX_FIFO_THRESHOLD_1_8,
            .rxIntFifoThr   = UARTCC26XX_FIFO_THRESHOLD_4_8,
            .errorFxn       = NULL
        }
    };
    
    const PIN_Config BoardGpioInitTable[] = {
        CUSTOM_UART_RX | PIN_INPUT_EN | PIN_PULLDOWN, 
        CUSTOM_UART_TX | PIN_GPIO_OUTPUT_EN | PIN_GPIO_HIGH | PIN_PUSHPULL,
        CUSTOM_UART_RTS | PIN_GPIO_OUTPUT_EN | PIN_GPIO_HIGH | PIN_PUSHPULL,
        PIN_TERMINATE
    };

    I use in main.c:

    CC1310_LAUNCHXL_initGeneral();

    In my task:

    UART_Params uartParams;
    UART_Handle uart;
    
    UART_init();
    
    UART_Params_init(&uartParams);
        uartParams.baudRate = 115200;
        uartParams.writeDataMode = UART_DATA_BINARY;
        uartParams.readMode = UART_MODE_CALLBACK;
        uartParams.readDataMode = UART_DATA_BINARY;
        uartParams.readCallback  = readCallback;
        uart = UART_open(CUSTOM_UART, &uartParams);
        if (uart == NULL) {
            while (1);
    }

    I can receive data, but I can´t send data because pin CTS is always ON and don´t go to OFF when i use:

    UART_write(uart, (const void *)(&myTrf.uidLeido[0]), 8);

    If I configure RTS pis as GPIO, I can send data but I need manually to change pin state

    PIN_setOutputValue(allPinHandle, CUSTOM_RTS, 0);
    UART_write(uart, (const void *)(&myTrf.uidLeido[0]), 8);
    PIN_setOutputValue(allPinHandle, CUSTOM_RTS, 1);

    When I need tou use RTS flow control pin is correct this configuration

    CUSTOM_UART_RTS | PIN_GPIO_OUTPUT_EN | PIN_GPIO_HIGH | PIN_PUSHPULL,

    The same circuit and transceiver working when I use PIC24 or STM32 with flow control CTS and RTS.

    Thanks

  • I haven't deep dived down in the driver to see what that does. But I see from 19.4.4.2.1 in that 4 combinations of RT/ CTS is possible. Since you can only send a signal one way you have to find the setting that sets the wanted combination in this table. Have you compared to how the flow control is set up in PIC24 or STM32 compared to CC1310? Are you comparing equal setup or different?