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.

AM3352: Regarding whether USB*_DRVVBUS can be used as GPIO while USB* is enabled (host).

Guru 12115 points
Part Number: AM3352

Hi,

I asked earlier whether it is possible to use USB*_DRVVBUS as a GPIO while enabling USB* (host).

I have received your reply that it can be used in that case, but it is not going well.

ーーーーExcerpt from related postーーー
>If 1) the USB controller is used as device-only mode, or 2) the USB controller is used as host-only mode and USBx_DRVVBUS is not used to control the USB power switch, then yes, USBx_DRVVBUS pin can be used as a GPIO.

ーーーーーーーーーーーーーーーーーーー

When USB1 is enabled, the F15 pin is set to GPIO3_13, but it is always Hi.

Could you let me know if any additional settings are required?

Thing you want to do:
I want to enable USB1, but use the F15 pin as GPIO3_13 instead of DRVVBUS for USB1.
The reason is that I want to turn VBUS ON/OFF at the timing set by SW.

Thanks,

Astro

  • Astro-san,

    If you still need to use the DRVVBUS pin (regardless in GPIO mode or not) to control the VBUS power switch, you shouldn't configure the pin in GPIO mode. There is timing requirements built in the AM335x USB controller that causes using sw/GPIO to control the VBUS power switch will break the USB function.

  • Hi, Bin

    The CPU wants to shut down the DRVVBUS when software intends.
    In other words, I want to turn on/off the power of the USB dongle connected to USB1 (host) from the software.
    Is it possible to turn ON/OFF DRVVBUS from software?

    TRM16.2.1 VBUS Voltage Sourcing Control says "The control on the USB_DRVVBUS is automatic", and it seems that if the USB controller's DRVVBUS is enabled, it cannot be controlled directly from software.

    Thanks,
    Astro

  • Hi Astro,

    it seems that if the USB controller's DRVVBUS is enabled, it cannot be controlled directly from software.

    Correct, DRVVBUS pin is not directly controlled by software, rather the internal OTG state machine in the MUSB controller.