Posts: 72
Registered: ‎12-19-2014
Accepted Solution

USB load Battery pack with 500mA


I use a Happy Gecko MCU and I want to charge a battery pack via USB with 500mA.

Now I ran into a probleme I only want to charge with 500mA if the host device is able to do this.

I configure the bMax parameter and make USBD_init(); and then wait if the State of the USB change to ADDRESSED then I start charging with 500mA. WIth a normal PC with USB 2.0 this works fine.

The Problem is if I want to charge the battery pack with a power supply connected to a socket the USB status never is ADDRESSED so it only loads with 100mA even if the power supply is able to load with 500 mA.

Is it possible to recognize the power supplys and check if they are able to charge with 500mA???


Every answer is verry welcome



Posts: 553
Registered: ‎09-18-2015

Re: USB load Battery pack with 500mA

Hi @Sneaker1992,


You'll need to refer to the USB Battery Charging Specification (latest revision is 1.2; Google is your friend) to see how to handle this. Maxim has a nice summary here.


When you are plugged into a charger, there is no host communication, so you cannot rely upon any kind of USB status change to make decisions.


Essentially, you need to detect various levels on D+ and D- to determine when there is a charger at the other end of the cable and what kind of current draw it can support. The USB transceiver on Happy Gecko does not have this capability, so you will need external circuit to perform the detection for you. I did some quick checking, and it doesn't look like anyone sells a circuit specifically to do this, so the external components must not be too much of a hassle to do the job.



Posts: 6,327
Registered: ‎02-15-2004

Re: USB load Battery pack with 500mA

Add-on chips to detect charger (BC1.2) on USB device side:


TI BQ24392 - Dual SPST USB2.0 High Speed Switch with USB Battery Charging Specification Revision 1.2 Detection


Microchip (SMSC) USB375x - USB 2.0 Port Protection with Integrated Switch and Charger Detection - BC1.2


Fairchild FSA832 - USB2.0 High-Speed (480Mbps) Charger Detection with Isolation Switch - BC1.2



Posts: 553
Registered: ‎09-18-2015

Re: USB load Battery pack with 500mA

Hi @Tsuneo,


Thanks for providing the information about the BCS support ICs.  Figures I didn't know the right Google keywords to find them Smiley Surprised