Hi,
We need manual control of standard downstream port current levels (100mA and 500mA)
from our board which is a host (an Android USB accessory) which plugs into the USB of
an Android-based mobile (see http://developer.android.com/guide/topics/usb/index.html)
Our board is already successfully transmitting data and charging every Android mobile we
have tested. We have a very simple setup:
- Our Stellaris-based board has a USB stack that currently runs in HOST only mode and provides VBUS to an Android device (which is running in accessory mode, as a USB client, hence it needs the power from our USB device)
- The Stellaris detects the USB connection, enumerates, and configures. We always supply max current on VBUS from a TPS61240 (450mA max, but this chip was used in the TI EVM to supply charging current on their host port so we continue to use it).
- In other words, VBUS is just the output of the TPS61240 5V DC converter which can supply up to 450mA (with some analog conditioning) connected to the USB
- VBUS. There is no control of this current or voltage, it is directly connected to the USB connector.
Please refer to the lower half of the schematic below for a look at our old circuit.
This always works wonderfully, but the problem is we want more control of how much current is
sourced from the limited battery of our board! Essentially, we want to at least be able to switch
to a low-power mode of 100mA to optimally preserve the battery of our board and the Android mobile.
(So that both devices exhaust their batteries at around the same time).
It seems simple, but I have run into problems adding this simple capability.I have chosen a TPS2540A and ~thought~ I could manually switch between low current and
high current modes (~100mA and ~500mA respectively) and avoid the automated switching, but there is nothing in the data sheet that details how to do this.
However, two things I noted in the data sheet:
- "The ILIM_SEL pin allows the system to digitally select between two current-limit thresholds, which is useful in end equipment that may require a lower setting when powered from batteries (versus wall adapters)" Note that our board is an example of this battery powered example case.
- "In the case of a USB 3.0 host, the super speed differential pairs must be routed directly to the USB connector without passing through the TPS2540/40A/41/41A"
Now we are not USB 3.0, but it would seem that I can route the DM/DP lines around the 2540 and manually switch the current with ILIM_SEL.
Can anyone confirm this statement? Further how do I set up CTL1-3? In the new circuit in the schematic below I have setup the CTL1-3 lines for SDP USB 2.0, but should this even matter if I manually control the current limit?
There is one minor wrinkle. Some Android tablets may run in host mode, so we want to
detect the host and shut off our VBUS in this case (this is not required functionality at this point).
However, if the Stellaris detects a host via the (directly routed) DM/DP lines it might use EN/DSC
to shut of VBUS connection to that host.
Finally, there are plenty of features of the TPS2540A that I want to use, but many that I don't.
Am I better off with some other chip or a custom design?
Thanks in advance.
Kind regards,
Kevin Kreger