I'm designing a device with USB communications, using an STM32F105 microcontroller. It has a LiPo battery, which charges from the USB port using an LTC4077 charge controller. It will generally use a high-current charging port to charge the battery, but will sometimes be plugged into a PC for data communications.
To stay within the USB specification, the charge controller initially allows a charge current of 100mA. If the STM32F enumerates with an appropriate USB host, it asserts a logic line telling the charge controller to take 500mA.
I have a power switch in between the battery/charger and the rest of the circuit. When the switch is off the microcontroller doesn't have power, and the battery will charge at 100mA.
Q: How do I charge at a higher current without microcontroller intervention?
The USB Battery Charging Spec 1.2 (found here) gives different hardware options for charging ports, to allow "Portable Devices" (like mine) to determine the capabilites of the charging port without enumeration. For example, a "Dedicated Charging Port" (with no communications capability) puts a 200-Ohm resistor between D+ and D-. If the Portable Device detects this connection, then it can assume the device can supply higher current.
I have found some charge-management IC's, such as the MAX77301, which handle this detection and set their charge current levels appropriately. However, they do their own enumeration, and do not pass through the USB data. I assume they can't be placed in parallel with the data communications path.
What am I missing? What is considered good practice, to accomplish what I am looking to do?
Thanks.