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.

PROCESSOR-SDK-AM335X: Am335x USB communication issue

Part Number: PROCESSOR-SDK-AM335X

Hi Bin,

The USB communication stability issue was still exist even if I reduced the USB speed from high speed to full speed , please see the link below for the early issue thread. It seems the communication is very vulnerable to interference. Since the Ethernet card worked ok with the lagacy protduct(using Freescale MPU) and the USB circuits and layout are the same with lagacy protduct(only MPU was changed to AM335x),  I don't understand why the USB of AM335x is so easy to be disturbed by the interference?are there any USB driver patchs to improve the USB anti-interference capability ?(eg. improving USB pin driver capacity or sw filiters? ) . please give some suggestions or comments for the improvement,Thanks!

the following are print logs when the USB communication was disturbed:

[ 929.282324] musb-hdrc musb-hdrc.1: Babble
[ 929.286643] musb-hdrc musb-hdrc.1: Babble
[ 929.291965] usb 2-1: USB disconnect, device number 24
[ 929.299238] usb 2-1.1: USB disconnect, device number 25
[ 929.305388] smsc95xx 2-1.1:1.0 eth1: unregister 'smsc95xx' usb-musb-hdrc.1-1.1, smsc95xx USB 2.0 Ethernet
[ 929.317991] smsc95xx 2-1.1:1.0 eth1: hardware isn't capable of remote wakeup
[ 929.856298] usb 2-1: new full-speed USB device number 26 using musb-hdrc
[ 930.036562] usb 2-1: not running at top speed; connect to a high speed hub
[ 930.044369] usb 2-1: New USB device found, idVendor=0424, idProduct=9512, bcdDevice= 2.00
[ 930.053525] usb 2-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 930.069800] hub 2-1:1.0: USB hub found
[ 930.074991] hub 2-1:1.0: 3 ports detected
[ 930.396349] usb 2-1.1: new full-speed USB device number 27 using musb-hdrc
[ 930.546787] usb 2-1.1: not running at top speed; connect to a high speed hub
[ 930.573382] usb 2-1.1: New USB device found, idVendor=0424, idProduct=ec00, bcdDevice= 2.00
[ 930.591704] usb 2-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 930.619544] smsc95xx v1.0.6
[ 930.735398] smsc95xx 2-1.1:1.0 eth1: register 'smsc95xx' at usb-musb-hdrc.1-1.1, smsc95xx USB 2.0 Ethernet, 12:2d:53:5e:d6:d9
[ 931.088862] smsc95xx 2-1.1:1.0 eth1: hardware isn't capable of remote wakeup
[ 931.097314] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready

 

The USB SCH:

The early issue thread:

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1135267/processor-sdk-am335x-am335x-usb-communication-issue/4214929?tisearch=e2e-sitesearch&keymatch=%252520user%25253A289264#4214929

  • Hi Lance,

    Which SDK/kernel version do you use on AM335x?

  • Lance,

    How is the Eth device connected to the USB bus? is it soldered on the board or plugged in a standard USB type-A receptacle?

  • Hi Bin,

    we used SDK 06.03.00.106 and the kernel version is 4.19. 94.  The Eth board is a  separate board and connected to the controller through standard usb cable. I want to konw how can I change the driver to improve the communication stability for USB2 port ? I mean can the drive ignore this kind of error for USB2 port and do not disconnect the device and reset the usb controller ? 

  • Hi Lance,

    There is no software control to avoid the babble condition. When babble happens, the USB controller is already turned off by itself, the only thing which software can do is restarting the USB controller and the software stack.

    One quick test you can do is to add a USB hub in between. The hub will filter the USB signals, hopefully it will prevent babble to happen. I know adding a USB hub adds up the BOM cost.

    I am looping in our USB hardware expert to see if the babble condition can be improved in hardware perspective.

  • Hi Bin,

    Thanks, I will try it later. please let me konw if any update from your hardware experts.

    By the way, after USB is downgraded to full speed, the fread function freezes when transferring files through this network port, it works ok when USB worked on high speed, is there any driver issues/bugs when USB works on full speed mode ? please give your suggestions for fixing this issue, thanks.

  • Hi Bin,

    There are some new updates for the fread freezen issue during transferring files after downgrading usb speed :

    1. It works ok if the controller keep on pinging PC IP address before transferring files, it seems the USB Rx data buffer was stopped and need Tx data to recover it.

    2. when I reconfig the kernel to disable DMA and use PIO mode for USB, it works ok.

    Is there any bugs for USB work at DMA mode after downgrading USB to full speed ?  can you please give some suggestiones for fixing it, thanks!

  • Hi Lance,

    Thanks for the details.

    2. when I reconfig the kernel to disable DMA and use PIO mode for USB, it works ok.

    It seems there is an issue in handling full-speed bulk packets (64 bytes) in the USB DMA routine. Since the USB full-speed is rarely used, it is likely a bug in the MUSB DMA driver.

    Since the max speed in USB full-speed is only 12Mbps, I don't think using DMA has much benefit. Can you disable the USB DMA as a workaround?