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.

CC2650: Pull-UP uart RX?

Part Number: CC2650
Other Parts Discussed in Thread: CC1310,

If nothing is connected to the RX pin, I get garbage on it, or the data that I send to TX. I got the same results when I (on other controllers) had the pullup of the RX pin turned off. How do I enable pullup for UART RX?

CC1310/CC2650, contiki

  • Hi,

    Are you using the TI-RTOS Pin driver? You can see the configuration we use for our UART pins in our UART echo example, located here in CC1310_LAUNCHXL.c.

    Check out line 543 for BoardGpioInitTable. UART RX is configured with weak pull-down and UART TX is configured standard, i.e. push-pull.

  • No, I'm using Contiki and ti-lib. I changed the UART initiation code in ti-lib as follows:

    #define IOC_STD_INPUT_PULLUP    (IOC_CURRENT_2MA | IOC_STRENGTH_AUTO |      \
                                     IOC_IOPULL_UP | IOC_SLEW_DISABLE |         \
                                     IOC_HYST_DISABLE | IOC_NO_EDGE |           \
                                     IOC_INT_DISABLE | IOC_IOMODE_NORMAL |      \
                                     IOC_NO_WAKE_UP | IOC_INPUT_ENABLE )
    
    void
    IOCPinTypeUart(uint32_t ui32Base, uint32_t ui32Rx, uint32_t ui32Tx,
                   uint32_t ui32Cts, uint32_t ui32Rts)
    {
        //
        // Check the arguments.
        //
        ASSERT(ui32Base == UART0_BASE);
        ASSERT((ui32Rx <= IOID_31) || (ui32Rx == IOID_UNUSED));
        ASSERT((ui32Tx <= IOID_31) || (ui32Tx == IOID_UNUSED));
        ASSERT((ui32Cts <= IOID_31) || (ui32Cts == IOID_UNUSED));
        ASSERT((ui32Rts <= IOID_31) || (ui32Rts == IOID_UNUSED));
    
        //
        // Setup the IOs in the desired configuration.
        //
        if(ui32Rx != IOID_UNUSED)
        {
            IOCPortConfigureSet(ui32Rx, IOC_PORT_MCU_UART0_RX, IOC_STD_INPUT_PULLUP);
        }
        if(ui32Tx != IOID_UNUSED)
        {
            IOCPortConfigureSet(ui32Tx, IOC_PORT_MCU_UART0_TX, IOC_STD_OUTPUT);
        }
        if(ui32Cts != IOID_UNUSED)
        {
            IOCPortConfigureSet(ui32Cts, IOC_PORT_MCU_UART0_CTS, IOC_STD_INPUT);
        }
        if(ui32Rts != IOID_UNUSED)
        {
            IOCPortConfigureSet(ui32Rts, IOC_PORT_MCU_UART0_RTS, IOC_STD_OUTPUT);
        }
    }

    And I still get garbage on the RX pin, which often repeats what I'm sending to TX. RX and TX are not connected in the circuit, and the UART Loop Back is not enabled.