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.

USB CDC uart overrun

Other Parts Discussed in Thread: SYSBIOS, EK-TM4C123GXL

I have created a USB cdc device based from the ti reference code that I am using to attach a serial gps to. If I attach the gps device to the uart after windows boots everything is fine. If the gps is attached at power up then it does not work. I have found that the problem is due to a RX buffer overrun. My question is how should this be handled by the ti ref code to clear the overrun so that the cdc code will not hang.

  • Hello James,

    If I get the connection correctly, its PC <-> TM4C <-> GPS?

    Can you please explain the data flow between the PC, TM4C and GPS?

    Regards
    Amit
  • Yes connection is correct. GPS is connected via UART1. I am using sysbios and using usblib, I am using usb_dev_serial from EK-TM4C123GXL. The cdc serial port will work fine through a comm port terminal like teraterm. If uart data is sent to it before windows is up, it never seems to work.
  • Hello James,

    Since the PC is not up yet, the USB connection would not be established causing back pressure on the UART RX FIFO. The UART communication if stalled till USB enumeration is not completed must be used to indicate to the GPS not to send data.
    Alternatively, if the CPU can simply discarded the packets from UART till the enumeration and device connection is not completed would have the same effect.
    May be I am oversimplifying the process.

    Regards
    Amit
  • I agree, just wasnt sure where or how to handle this with the ti usb code. I was trying to move it to the cdc code where it tries to enable the serial line settings but that didnt seem to work. Although I was looking at just trying to clear the overflow error.