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.

LP-CC2652RB: Sysconfig, Selecting UART Pins

Part Number: LP-CC2652RB
Other Parts Discussed in Thread: SYSCONFIG, , CC2652RB

I want to communicate using UART between the LP-CC2652RB and an ESP32. I have configured my LP-CC2652RB using sysconfig like such:

/**
 * Import the modules used in this configuration.
 */
const UART  = scripting.addModule("/ti/drivers/UART");
const uart = UART.addInstance();

/**
 * Write custom configuration values to the imported modules.
 */
UART1.$name               = "CONFIG_UART_0";
UART1.uart.txPin.$assign  = "boosterpack.30";
UART1.uart.rxPin.$assign  = "boosterpack.29";
UART1.txPinInstance.$name = "CONFIG_GPIO_0";
UART1.rxPinInstance.$name = "CONFIG_GPIO_1";
uart.ringBufferSize = 512;
I then connected the TX pin of the ESP32 to the LP-CC2652RB's DIO0, and the RX pin of the ESP32 to DIO1. I am quite sure my code is correct and that I'm using the correct UART pins on the ESP32. However, UART communication is not working (neither can receive data from the other).
Is there anything wrong with my sysconfig configuration? Am I using the wrong pins on the LP-CC2652RB?
  • In addition, this is my code to set up the initialize the uart:

    UART_Handle uart;
    
    UART_init();
    UART_Params uartParams;
    UART_Params_init(&uartParams);
    uartParams.baudRate = 2000000;
    uartParams.readMode = UART_MODE_BLOCKING;
    uartParams.writeMode = UART_MODE_BLOCKING;
    uartParams.writeDataMode = UART_DATA_BINARY;
    uartParams.readDataMode = UART_DATA_BINARY;
    uartParams.readReturnMode = UART_RETURN_FULL;
    uartParams.readEcho = UART_ECHO_OFF;
    uart = UART_open(CONFIG_UART_0, &uartParams);

    And to read or write over UART, I am calling these:

    UART_read(uart, b64_buf, 6);

    int sent = UART_write(uart, b64_buf, num_bytes_remaining);

  • Hi Michael,

    Thank you for reaching out. We will look into this and get back to you as soon as possible. In the meantime, can you provide the SDK version you are using?

    Best Regards,

    Jan

  • yes: sdk 6.20.00.29

  • Hello Michael, 

    Can you test the TX and RX pins of the CC2652RB board with a logic analyzer to see if they are receiving/transmitting? Also, you can test the uartcallback and/or the uartecho example programs to see if the UART is working properly. Then try and change the GPIO pins within the uartcallback/uartecho example programs to the desired pins for your project to see if they are working correctly. Lastly, are you using a custom board or a LaunchPad for your testing? 

    Thanks, 

    Isaac