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: Does UART Hardware Flow Control Work In TI-RTOS 2.13.00.06?

Other Parts Discussed in Thread: CC2640, BLE-STACK, CC2650

The current version of BTStack (v2.0) doesn't support UART hardware flow control even at API level. However, the new release TI-RTOS 2.13.00.06 seems having the API for it. So I give it a try by following porting guide here. It compiles and runs ok. However, trying to blast data at Rx to CC2640, the flow control (RTS) doesn't seems kicking in to stop the sender sending. The other direction (CTS) seems ok since I have to make my terminal to be hardware flow control to receive Tx data from CC2640.

So I my question is: Is UART Rx RTS supposed to work in this release of TI-RTOS?

thanks,

../ming

  • As I know, there is no RTS/CTS on CC26xx.
  • Hi Ming,

    This question was just answered earlier today: e2e.ti.com/.../424270

    If you need flow control, I suggest looking at the example on the BLE Wiki: processors.wiki.ti.com/.../Cc2640_Adding_a_UART_or_SPI_driver_to_a_Sample_Project

    As YK states, it's not RTS/CTS but uses a custom protocol.

    Best wishes
  • Thanks for the response. But I am still confused regarding whether UART hardware flow control is supported with the latest stack (v2.0) and rtos (2.13.00.06), and if not, when it will be supported in the future.

    The hardware flow control I am referred to is the standard RTS/CTS flow control which can interact with other standard UART hardware, not a custom protocol that the link referred to. That won't work for me. And besides that protocol seems to address power management, not flow control. 

    A month early I asked the same question and I got a response that it will be supported in the next release of TI-RTOS. I even got a preview of the UART driver code to work with (that's very nice). However, I decided to wait for the release instead of spending time to make the preview code work. Now TI-RTOS 2.13.00.06 is released and that preview of UART driver is almost the same as the release, which does seem have settings and logic for RTS/CTS. So could you tell me will UART hardware flow work in TI-RTOS 2.13.00.06? If not, what do I need to do to make it work? And when will it be officially supported?

    thansk,

    ../ming

  • Hi Ming,

    I do apologize for the confusion. I just confirmed UART HW Flow Control is working in TI-RTOS 2.13.00.06 using BLE-Stack 2.0. Follow the instructions in this thread e2e.ti.com/.../421520 to updated your TI-RTOS, but apply to the HostTest Project. Modify the Board.c file to add the RTS/CTS Pins, currently they are listed as PIN_UNASSIGNED:

    const UARTCC26XX_HWAttrs uartCC26XXHWAttrs[CC2650_UARTCOUNT] = {
    ..
    .ctsPin = Board_UART_CTS,
    .rtsPin = Board_UART_RTS

    File located in C:\ti\tirtos_simplelink_2_13_00_06\packages\ti\boards\SRF06EB\CC2650EM_7ID for the 7x7 board file.

    Rebuild and flash your EM. In BTool, open the respective COM port and select "Flow: RTS/CTS".

    For other changes in this TI-RTOS release, please do check out the release notes:
    C:\ti\tirtos_simplelink_2_13_00_06\docs\cc26xxTiRtos_drivers_release_note.txt

    Best wishes
  • Hi Ming,

    The flow control in the UART driver should work when configuring the CTS/RTS pins in the board file.
    However the driver seems to not support waking up the device when RTS from the other device is asserted.

    The alternative is to use the network processor handshake mechanism (SRDY/MRDY) in JXS's link which is common for both both SPI and UART.

    Could you provide an example code snippet of how what you have implement + a logic analyzer plot of what you are seeing?

    Regards;
    Svend
  • JXS and Svend,

    Thanks for the response and follow up. 

    Currently, I am testing without power saving. So I can deal with wakeup issue later. I will give you an update later about the current problem I am having - RTS seems not asserting (actually de-asserting) correctly to back pressure sender. Since you say RTS/CTS is working in the new release of RTOS, I just want to make sure I have haven't done something stupid on the app side before throwing the problem.

    ../ming

  • JXS and Svend,

    Some problems on my side has been cleared and cleaned up including this issue. The good news is the UART h/w flow control function in the new driver work as expected. The bad news is the NPI transport which I was used originally really doesn't support flow control. I ended up rewriting the entire transport layer. Now the full data path works and is verified. Thanks for your help.

    ../ming