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.

Linux/AM3352: USB overcurrent recovery

Part Number: AM3352

Tool/software: Linux

Hi Sir 

We used latest SDK in TI SK-EVM for test.

We used one USB device to let usb over-current phenomenon happened. 

         root@am335x-evm:~# [ 55.776691] musb-hdrc musb-hdrc.1: VBUS_ERROR in a_wait_vrise (88, <AValid), retry #3, port1 00080108

And then unplug USB device. It seems we need to use below command to let USB port work normally.

    https://e2e.ti.com/support/processors/f/791/p/414696/1912906

   echo '47401c00.usb' > /sys/bus/platform/drivers/musb-dsps/unbind
   echo '47401c00.usb' > /sys/bus/platform/drivers/musb-dsps/bind

Does TI USB driver support recovery way automatically if it meets overcurrent issue ?

Otherwise, we may need to use above command to recover USB function in TI SK EVM ?

please advise

BR

Yimin

  • Hi Yimin,

    When did the over-current condition happen? During inserting the usb device or during data transfers after the device is enumerated?

  • Hi Sir

    During insert the usb device (example: like usb hdd )

    The message show VBUS error.

    If we unplug this device and insert usb stick , system should recognize the device normally.

    But it seems usb goes into OC mode and cannot recover.

    BR

    Yimin

  • Yimin,

    The error happens due to the high in-rush current in device insertion which causes VBUS voltage dropping below VBUS_VALID threshold. As the kernel log indicates the driver has already tried to recover 3 times, but VBUS voltage is not rose higher than VBUS_VALID, so the USB port is disabled. To re-enable the port, user or application has to do something as the commands you mentioned to reload the usb drivers, which basically reset the retry counter.

    The best solution for this problem is to prevent the over-current condition to happen. The USB Spec requires VBUS on USB host should have minimum  120uF capacitor, but the AM335x SK evm only has 4.7uF cap (C193) on USB1 port. So if you add a 120uF cap parallel to C193, this over-current condition shouldn't happen if the USB device is compliant to the USB Specs.