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.

AM335x MUSB controller question

Hi,
There is a HUB IC is connected to USB1 port in our product.It should support several usb devices at same time.I try to assgin to every usb device with the exclusive TX and RX endpoints.
I want to know if the controller support setting TxPktRdy bit of TXCSR register of two or more endpoints at the same time?Does this behavior will cause usb errors more easily?

  • The USB experts have been notified. They will respond here.
  • I am not sure what you meant by 'at the same time'. Typically the driver does the following operation to, for example, ep1out, ep2out, and ep3out.

    - if ep1 tx fifo is empty, load data to the fifo, set ep1 TXCSR[TxPktyRdy];
    - if ep2 tx fifo is empty, load data to the fifo, set ep2 TXCSR[TxPktyRdy];
    - if ep3 tx fifo is empty, load data to the fifo, set ep3 TXCSR[TxPktyRdy];

  • Hi Bin,
    I mean that if I can set the ep2 TXCSR.TxPktyRdy when the ep1 TXCSR.TXPkyRdy is 1.
    I can catch usb errors more frequently if I set the TXCSR.TxPktyRdy bit of more than one endpoints in series.
  • xing lui said:
    I mean that if I can set the ep2 TXCSR.TxPktyRdy when the ep1 TXCSR.TXPkyRdy is 1.

    In theory this should not be an issue. But I never experimented this situation in Linux, so I am not 100% sure if this will cause problems or not. The Linux MUSB driver doesn't check if other ep's TXCSR[TxPktRdy] is set when setting an ep's TxPktRdy bit.

    xing lui said:
    I can catch usb errors more frequently if I set the TXCSR.TxPktyRdy bit of more than one endpoints in series.

    What error is it?

  • Hi Bin,
    The usb error is identified by the TXCSRL.D2 register.After this error occurs, The usb device will not respond to usb host.The flush tx fifo process in usb host driver will be failed.I think the usb device is lost.The only solution to this issue is repluging usb device.
  • TXCSR.D2 means the error that device does not respond for 3 re-transmits. Did you see the same error on the usb bus analyzer trace?

    I think there are cases in Linux in which the hub stops responding or NAKing to the host, but I didn't find the reason because the bus trace shows nothing wrong on the host side. It could be the same reason that a TX EP is programmed while other TX EP is still active. The problem is with a Genesys and a NEC hub.
  • Hi Bin,
    I will upload the usb analyzer trace image next monday.I think I don't see any errors of transmission.I remember the usb analyzer trace show the setup packets follow with the data packet when the usb error occurs. The usb analyzer is connected between hub port and usb device(usb flash drive).

  • Xing, the trace between the hub and usb device is not helpful, the usb traffic on the hub upstream port and downstream port are different.

    I guess it is difficult to get the hub upstream port trace, since the hub is on the board, so you don't have to capture the trace anymore, the TXCSRL.D2 already tells the error.

    If you patch the driver to ensure no other TX EP is active before programming a TX EP, do you still have any issue?