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.

LAUNCHXL-CC2640R2: use of 1 UART in multiple application.?

Part Number: LAUNCHXL-CC2640R2
Other Parts Discussed in Thread: CC2640R2F, CC2640

Tool/software:

I have 1 question about - if I can use the UART) peripheral for other purpose also for reading string if the same UART0 is already been used in the 'simple central' to provide an interface for the application.[ https://software-dl.ti.com/lprf/simplelink_cc2640r2_sdk/1.30.00.25/exports/examples/rtos/CC2640R2_LAUNCHXL/blestack/simple_central/README.html ] this is the link for simple central example used in my code.

please guide me for this.

can we use same UART0 which is already used for display peripheral and now i want to read characters from same UART0 peripheral.

when I tried code for reading bytes from uart0 my simple central code stops working.it wont send any data on its display.

thanks in advance.

  • UART0 is already been used for Displaying purpose in 'simple central' application, now i want to read data from UART0 in the same firmware[only 1 uart is available on cc2640r2 launch pad HW] but I am not able to read data from uart and even 'simple central application' messages are not getting displayed on terminal Putty.  

  • Hi sujata,

    You are correct in that the CC2640R2F only has one UART peripheral.  As UART is asynchronous it does not support a bus setup which would be capable of connecting several devices to one hardware peripheral.  The Display driver (i.e. backchannel XDS110 communication to a computer COM port) only transmits data, but if you require the second UART device to both send and receive then we need to explore additional options.

    You could consider upgrading to the CC2642R and LAUNCHXL-CC26X2R1 which supports two UART peripherals and has the latest SimpleLink SDK updates/support, or you can incorporate Sensor Controller functionality to add a UART emulator.  Alternatively you may be able to find a third-party UART emulator solution which works for your design, but this would not be directly supported by TI.

    Regards,
    Ryan

  • can i get more about UART emulator?

    Do i needed to add emulator code in my current firmware? 

  • I recommend that you read the Sensor Controller Studio SimpleLink Academy Labs to gain a greater understanding of this solution and environment.  You will need to add SCIF OSAL APIs to your firmware project, which is described in further details within the resources I've shared.

    Regards,
    Ryan

  • Hi Ryan, Thanks a lot for your inputs.

    As you mentioned that 'The Display driver (i.e. backchannel XDS110 communication to a computer COM port) only transmits data' and this display type is "Display_Type_UART" which only writes data. I am using CCS IDE. Using other IDE will be inefficient. Please provide inputs for this. 

    so we can not read data from same UART0 that is being used in display driver.?

    if suppose i am choosing not to go for Sensor Controller functionality.

  • I am not expecting any other IDE be used other than CCS.  What are you reading from, the same host for which the Display is used or a separate device?  If the former then I apologize for the misunderstanding, and you will need to replace the Display TI Driver with a full-functional UART interface.  You can refer to HCI and NPI documentation as well as the host_test example.  If separate targets then do you need to transmit to that device as well?

    Regards,
    Ryan

  • Hi , My Host device which is displaying comments on putty while establishing BLE connection such as 1) device Connected2)device disconnected etc,

    now the same host[CC2640 launchpad HW] wants to read data from user[may be Putty or any input terminal we can use to read string - 8bytes.]and i have to manipulate this string for my task in the same code where "simple central" application is. 

    Ryan, i am working on only 1 device of CC2640.

  • Thank you for clarifying, and I apologize for the confusion.  In this case you will need to remove the Display TI Driver (uni-directional TX only) and replace it with the Host Control Interface (bi-directional UART).  You might be interested in this relevant E2E thread as well.

    Regards,
    Ryan