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 USB-interface: Override VBUS and ID detection for only hostmode



Hello engineers,


We want to use a SystemOnModule with a AM335x with a lithium battery, so we can't provide the Bus-Voltage of 5V and we don't want to add a boost converter just for that purpose.

Here in the forum i already read through several threads with similar problems, but couldn't find a satisfying answer.
So is there a possibility using just software settings to disable the VBUS and ID detection?

Thank You
Best Regards
Hannes

  • Hi Johannes,

    Yes, VBUS and ID detection can be overridden by software. See section 16.3.3 and 16.3.7 in the AM335X TRM Rev. J.

  • Johannes,

    Which USB mode do you use? Host, gadget or OTG?

    ID detection could use sw overwrite for host mode, but it just saves you from bringing out the USBx_ID pin, it has nothing to do with the battery.

    For gadget mode, the USBx_VBUS comes from the VBUS on the USB bus; but for host mode, you must have a 5V, there is no way to workaround this, it is a OTG controller on AM335x.

  • Sorry, I overlooked your post subject, which clearly says for host only mode.

    Then no, there is no way to workaround the VBUS 5V power supply.

  • Thank you for the answers Bin Liu, but why does it collide with what Biser Gatchev said?

    I will check the sections in the Manual first.

  • Johannes,

    I will let Biser to clarify, but I guess he misunderstood your question. The OTG controller on AM335x requires twice VBUS sensing while transition to host mode. We have seen many application directly tied USBx_VBUS to 5V, which requires sw workaround to bypass the first VBUS sensing. I guess Biser meant there is sw override for this one. Biser is correct on the ID override.

    If you use low voltage battery, there are two problems you cannot pass.

    1. The USB Specs requires the host has to provide 5V on VBUS, so you *must* have 5V on the board, otherwise, the host will not work with any USB device.

    2. The AM335x has a OTG controller, to transition between host and peripheral mode, the host mode requires the 2nd VBUS sensing to see VBUS >= 4.4V, otherwise, the controller will not transition to host mode.

  • Hello Bin,


    Please check in the TRM on page 2207 the second last paragraph. In my understanding it clearly says that the mode is set either 1. by sensing a voltage at the VBUS pin or 2. by changing a register value by the firmware. Sounds promising to me. :)

    And in my opinion it would be a huge backdrop if TI wouldn't have thought of the option using the processor in a battery environment, for example integrating a USB-hub for communicating with onboard components (which is the case in our project).

  • Johannes,

    Johannes Hofmann said:
    Please check in the TRM on page 2207 the second last paragraph. In my understanding it clearly says that the mode is set either 1. by sensing a voltage at the VBUS pin or 2. by changing a register value by the firmware. Sounds promising to me. :)

    This is talking about the IDDIG register bit, which is the sw override for the ID pin.

    The ID detection is one of the conditions to let the OTG controller transition to host mode, another condition is that the VBUS has to be >= 4.4V within 100ms when USBx_DRVVBUS is high.

  • Johannes,

    Bin Liu said:
    This is talking about the IDDIG register bit, which is the sw override for the ID pin.

    What a Monday ;( I read the 2nd paragraph of 16.3.7, not the *last* 2nd one.

    Ok, you are talking about the SESSION bit. Yes, it is controlled by firmware/driver for entering host mode, but after the SESSION bit set to 1, the OTG controller starts transitioning to host mode, and does the two VBUS sensing I mentioned before, the first one could be bypassed by sw, but the 2nd sensing could not.

  • For the 2nd VBUS sensing, please continue your reading to the first paragraph of page 2208.

  • Hi Biser,

    You and Bin Liu have opposing opinions concerning our problem. Could you please give another reply to Bin's thoughts that i finally know what's what :)


    @Bin
    I read further on page 2208, but it's still not clear for me what happens inside the USB controller while checking for the operational mode.

  • Please disregard my comments. Bin is the final authority on USB. Sorry for the confusion, guess I also didn't read carefully.

  • Hmmm.... no good news at all...
    So that means for us that there has to be a boost converter on our board just for that VBUS detection.
    Is it then possible to enable the voltage just for the period of initialization of the host mode? So that we can disable the converter afterwards to save energy.

    Could you please present that problem to your design team to improve the concept of the processor?

  • Johannes,

    Johannes Hofmann said:
    Is it then possible to enable the voltage just for the period of initialization of the host mode?

    No, the >= 4.4V power must be present on VBUS during the period while operating as a host. Once the VBUS is lower than 4.4V, it is the over-current condition,  which causes the OTG controller leave the host mode and transition to peripheral mode.

    Johannes Hofmann said:
    Could you please present that problem to your design team to improve the concept of the processor?

    Yes, I will. And thank you for the feedback. But I doubt there is much TI can do to meet your requirement. The USB controller on AM335x is an OTG controller, it has to complain with the OTG Specs and satisfy the VBUS transition requirements of the Specs across the OTG host and peripheral mode, and other OTG features, such as HNP and SRP...