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.

CC2640 UART COMMUNICATION

Other Parts Discussed in Thread: CC2640, CC2650

Hello

I am using cc2640 implemented in LSRs  SABLE X 5x5 system with TI XDS110 debugger. I would like to do histogram testing of the ADC and for that I need to send my data over the UART.

I used sensor controller studio to generate an CCS project. In sensor controller studio all 3 ADC sample applications are working perfectly (getting data from ADC and sending it via UART), but in CCS I do not get anything when I send data via UART(I am using 2.13 RTOS and I resolved the bug with UART and blocking of RTOS), so I think it is working from CC2640s side, but in windows hyperterminal (or putty) I do not get anything...

I used DIO_0 and DIO_1 pins for UART and I am not sure which COM port to use (COM4-XDS class application/user UART, COM5-class auxiliary data port or COM 6 witch is just USB port and witch stops the debuger when I try to connect with it). I mean i tried all 3 an nothing works... The Tx and Rx LEDs are also not flashing when I send the data and from LSRs datasheet DIO_0 and DIO_1 are for UART so I know where is the error?

Do I need to setup something for FLOW CONTROLL?

Should the UART communication go via USB of the debugger or the board?

I also can not get BTool to connect so do you think these problems are connected?

Regards,

Ivan

  • Hi Ivan,

    You, posted at the wrong forum. Luckily a TI Engineer will move your post to the appropriate one.

    - kel
  • Moving to the Bluetooth Smart forum

    Regards,
    Gigi Joseph.
  • Hello Ivan,

    Now that you are in the correct forum, please see the Serial Communication article on the TI BLE Wiki!

    For app output, use the XDS application/user COM port.

    Best wishes
  • Hello, I did everything according to:

    and it did not work...

    Also, when I simulate the task with sensor controller studio, everything works, I mean I get the samples when I am testing it (so UART is working then). But when I generate the project for Code Composer studio and run it, I also dont get anything. I think in these generated projects, everything should be setup?

    I am using LSRs SABLE X module (i have set up the project for 5x5 pinout).


    Did I miss something?

    Best regards,

    Ivan

  • Hi Ivan,

    Would you like to use the sensor controller emulated UART or the UART peripheral on the CM3? You have mentioned sensor controller, but the printf example you linked to above uses the CM3 UART peripheral and TI-RTOS. Let's standardize what example you would like to use so that we may best help you to get it working.

    One more question, what version of Sensor Controller Studio are you using?

  • Hi,

    I need a way to send the data of the ADC to my PC in order to test it. So I tried both, and could not succeed.

    I would like to get the UART peripheral working. Could you help me with that?
    (I tried the link because you collegue told me to check the links and I found that)


    I am running the version 1.2.1.40829 and 2.13 TI RTOS?

    Thank you,
    Ivan
  • Ivan,

    Okay, lets focus on getting the sensor controller example working since that is initially what you were using.

    A couple things:

    1. Note that the Sensor Controller studio generates examples for the SmartRF06 board with 7x7EM. Since you have the Sa-BLE X board with the 5x5 EM you will need to change the UART pins and select the correct board file (with patches made as we have discussed in another thread)

    2. When building the project for Sensor Controller studio, do you select the TI-RTOS version? This will automatically create a TI-RTOS capable SC image along with a program stub that echos data over the UART

    3. Regarding PC settings for sending/receiving data from the Sensor Controller UART emulator via a PC you can use any terminal program you like. The settings are baud rate of with 8 data bits, no parity bits, no flow control, and one stop bit

    4. Once you have generated the project in Sensor Controller Studio, you will have to import the project in CCS and build it. When you do this, does it build successfully? are you able to load it?
  • Hi,

    1. Yes, I did that. The problem is in the pin select because I can only select DIO_0 and DIO_1 as UART pins (by datasheet) and those signals go to real pins, not over the USB like I want (I confirmed with oscilloscope) 

    2. No I did not chose TI RTOS version. It was automatically selected (the only one installed).

    4. The project is building and loading and working. I just get the UART signals on DIO_0 and DIO_1 which go outside and I think I need them to go over USB but I am not sure how to chose those pins since they are not DIO?

    I am not too familiar with sending serial bits over USB, I guess that is why it is called emulator because it doesnt work like real UART but simulates it somehow?

  • Hi,

    sorry if I was unclear:

    When I load the program from sensor controller studio into CCS and implement emulated UART (in order to send the data to my PC), I get nothing on PC side (its running and loading).

    It was written that it will send the data only when idle task is running, so can that be an error (maybe its never in idle state)? I used data streamer example from sensor controller studio...


    processors.wiki.ti.com/.../CC26xx_Adding_basic_printf_over_uart_with_TI-RTOS
  • Ivan,

    In order to see the data on your PC, you will need to select the proper DIO so that the emulated UART from the SC will be sent to the XDS110's UART backchannel pins. Otherwise, the data will be sent out from the CC2650, but will never be converted to USB logic levels to be sent to the PC. You can verify the UART is working by probing the pins that connect to the XDS110.

    This applies to both the printf and SC examples.