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.

CC2340R5: In the example code data stream UART can I change the RX and TX pins from 20 and 22 to 18 and 20???

Part Number: CC2340R5
Other Parts Discussed in Thread: SYSCONFIG

I am facing an issue in Configuring pins (Tx and RX) for target BLE module.

  1. In the example code Data stream with UART with the CC2340R5 launchpad, the Tx and Rx pins were DIO20 and DIO22 respectively. When tried the same code on target hardware module, module is able to receive the data. However, data transmission is not working.
  2. In the target module hardware, Tx pin is DIO18 and Rx is DIO20. Using data_stream_UART_over_BLE.sysconfig when tried updating these pins, communication (Both Rx and Tx) is not happening in BLE

Kindly help in resolving this issue.

  • Hello,

    Pins DIO20 and DIO22 (Tx and Rx respectively) will allow you to see the data displayed on your PC terminal as the launchpad uses those pins for the XDS110 UART connection. Therefore, the BLE data reception on the target can not be seen on the serial monitor if other pins are configured as RX and TX.

    If you want to use different pins in the launchpad, I suggest connecting directly the new configured pins (DIO18 as TX and DIO20 as RX) to the UART pins of the XDS110 (see image below).

    Hope it helps,

    David.

  • Hello David,

    I have already a BLE card /hardware module which is having,-  Tx pin is DIO18 and Rx is DIO20.

    How can I change the pins configuration? in code- data_stream_UART_over_BLE 

    even when I could change it as desired, I was unable to compile the code.

  • Hello Vidhyashree,

    Could you please share more details about why you were unable to compile the code?

    It would be useful if you share the project so I can try to reproduce the error.

    Best regards,

    David.

  • Yes sure David.

    We have designed a module using CC2340R5 and its working fine.

    We wanted to leverage the UART communication in our application. Our product is a Energy meter, which is having micro controller for its operation. BLE card will be communicating to meter using UART operation only. Meter will send data when ever there is a request from BLE (outside world request using mobile app). 

    In my case when I use a launch pad and XDS110 debugger and compile the example code -{please leverage the example available here: https://github.com/TexasInstruments/ble_examples/tree/simplelink_low_power_f3_sdk-7.20/examples/rtos/LP_EM_CC2340R5/ble5stack/data_stream_UART_over_BLE} I was able to connect to the BLE CC2340R5 device using mobile app.


    Using mobile app- Launch pad CC2340R5, while debugging and was opening TERMINAL to view the UART communication; I can

    1. Send - hex strigs or multiple characters - and able to receive at the UART receiver. In terminal I can see the exact string as expected. - working totally fine as expected.

    2. Recive - only one character (typed from laptop key board) (say "A") In mobile application I am able to see 41, but in terminal i am not able to view it.
    Problem 1 is - A string cannot be typed and sent from Laptop keyboard.

    Problem 2 is- What is being typed on laptop keyboard is not been viewed on TERMINAL.

    Problem 3 is- We want to use the same code for our BLE module, where in the selection of pins we wanted as DIO18-Tx and DIO 20-Rx. 

    The screenshot below is for your reference. The selection of pins we wanted as DIO18-Tx and DIO 20-Rx as in red rectangle shown in below image. When I do that, I do not get to choose the hardware to use.

  • Hello Vidhyashree,

    1. You mentioned before the code was not compiling correctly, have you solved that or is that why you are testing this in debug mode? If you haven't, can you share the compiling errors?
      1. Problem 1: this could be due to being in debugging mode.
      2. Problem 2: the sw is not program to do that, however it can be modified by adding a UART2_write() before sending the UART data through BLE at the callback function (inside app - Profiles - app_UART_over_data_stream.c).                                                               
        void SendUARTOverBLE(){
            UART2_write(uart, uartReadBuffer, UART_MAX_READ_SIZE, NULL);
            DSP_sendData( (uint8 *)uartReadBuffer, BufferSize );
            UART2_read(uart, uartReadBuffer, UART_MAX_READ_SIZE, NULL);
        }
      3. Problem 3: following what was done with the launchpad connections, you would need to route the DIO18-Tx and DIO 20-Rx to you TX and RX respective lines going to your pc UART (through XDS for example).
    2. The explanation you are giving me with the problems you are having are happening with TX and RX pins configured with DIO18 and DIO 20 respectively? Have you tried with the hardware connections that I sent  you (photos of how to connect the board for different TX and RX)?

    Best regards,

    David.