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 Host hang-up issue



I've got the FTDI CDC driver running through a hub in my code, but have a hang-up issue. After communicating for a while with my FT232R on another board transmitting and receiving, I get stuck with a transmit waiting (ePipeWriting) to go out of EP1, but it never goes out. Why does it work for sometimes minutes, then all of the sudden get hung up? Any clues?

Thanks

  • USB0TXCSRL1 register bits TXRDY and FIFONE are both set. I cannot recover by clearing them, they won't clear. How do I retry? What state is the USB controller in that hangs it without sending data after it was commanded to? Is there a race condition? The hang-up occurs after a random number of successful transmissions, once after 3020 successful three byte transfers, once after 10,042.

    If I can recover successfully, I can deal with the occasional issue, but I'd rather fix the cause. Any help is appreciated.

  • gkonzak said:
    What state is the USB controller in that hangs it without sending data after it was commanded to?

    How about other bits of USBTXCSRL1?
    a) NAK limit - known by the NAKTO bit; increase USBTXINTERVAL1 register
    b) STALLed - - known by the STALLED bit
    c) transaction error - known by the ERROR bit

    FTDI CDC driver

    The class of FTDI FT232R is vendor-specific, it isn't CDC ;-)

    Tsuneo

  • All other bits are zero. I finally captured the hang with a USB bus analyzer. A message goes out, then there are two SOF and it's dead. Most likely my code times out from not getting a response and tries to send again. I will break on the timeout and read the registers again to see what happened Monday.

  • Hi gknozk,

    Were you able to fix this issue? I am also facing a similar issue. TXRDY and FIFONE bits are set in my case also but I am unable to carry on the transmission. Any help on this will be appreciated.

    Thanks,
    Umair