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.

TM4C1299NCZAD: CTS control in usb_dev_serial

Part Number: TM4C1299NCZAD

Dear Champs,

Under usb_dev_serial example on TivaWare for dk-tm4c129x, we could see below description. 

Where code line we can it report CTS as high? in main code or usblib?

Or it just wait to listen host report CTS status? 

Could we change CTS status as low? 

If you have any suggestion, please feel free to let us know.

Thanks a lot.

Best regards,

Janet

  • This example when run on the DK-TM4C129x development board turns the "USB OTG" port into a virtual serial port that passes data to UART0. On this development board, UART0 is connected to a UART on the ICDI chip which in turn passes data to a USB virtual port on the "Debugger USB" connector. In effect, you have a USB virtual serial port talking to another USB virtual serial port with two real UARTs in between. On this hardware, the CTS line is not connected between the two UARTs.

    If you were to use this example code on custom hardware that uses UART0 as a real serial port with the CTS signal, then you could change the state of the CTS signal based on the events "USB_EVENT_SUSPEND" and "USB_EVENT_RESUME". See lines 1039-1045 of usb_dev_serial.c. Currently these events are ignored.
  • Dear Bob,

    Thanks for your suggestion.
    We actually hope to change the state of the CTS signal. But no idea for this.
    As you suggestion, how do I adjust which flag on "USB_EVENT_SUSPEND" and "USB_EVENT_RESUME" for CTS states change?
    Thanks a lot.
  • Hi Janet,
    I am still somewhat confused by your question, and I suspect my previous response did not help. CTS is an input to the UART on the TM4C. RTS is the output signal. Are you asking about how to configure a UART that is attached to something external to use hardware flow control? That would be part of the UART configuration which in this example is done in main(). You need to use a UART that has the extra flow control pins; UART0 , UART1, UART2, UART3 or UART4 on the TM4C1299NCZAD. You need to configure the pins for use as RTS and CTS. Finally you need to call: UARTFlowControlSet(UART_FLOWCONTROL_TX | UART_FLOWCONTROL_RX);
  • Dear Bob,

    Sorry to confused you. We could control and update CTS by flow control in MCU(TM4C129x) (USB device mode on CDC or bulk type)

    Please kindly look at below system block for customer demand. (We could control MCU and UART device)

    Customer need detect CTS signal in host (PC GUI), do we have host windows driver for CTS control?

    If yes, could we provide the source code of host windows driver ?

    If we do not provide host driver, how to get CTS signal in host side?    

    If you have any suggestion, please feel free to let me know.

    Thanks a lot.

  • Hello Janet,

    I was looking into what is possible with USB CDC for signals like CTS and I found that USB CDC Host does not accept CTS signals. That is why no driver exists. In theory a proprietary custom driver could be made, but that is not how USB CDC is handled and nothing we have any means to support.