How to enable the battery charger detection of CP2102N ?

by <a href=""><font color="#000000"><font size="2">Hero Employee</font></font> </a> yucheng on ‎07-18-2017 02:24 AM


The CP2102N includes a USB 2.0 full-speed function controller, and the USB block contains a charger detection circuit which is compliant with the USB-IF Battery Charging Specification, Revision 1.2.
Upon establishing a physical connection to a USB host, the USB peripheral can distinguish between a standard downstream port (SDP), dedicated charging port (DCP), or a charging downstream port (CDP).

The CP2102N battery charger detection can notify the external battery charger the amount of current available from the USB interface with three GPIOs. The CHREN indicate 100 mA source current, CHR0 indicate 500 mA source current, and CHR1 indicate up to 1.5 A source current.


For enabling the battery charger detection, should configure the CP2102N with Xpress Configurator in Simplicity studio. There are four choices about the Battery Charging detection setting as below.


Disable the Battery Charging detection, CHREN, CHR0, CHR1 won’t indicate the available current, and just keep the initial value of the interface pin latch after a device reset.

Up to 100mA:

CHREN pin will indicate the available 100 mA source current after detecting SDP DCP or CDP.

Up to 500mA:

CHREN and CHR0 pin will indicate the available 500 mA source current after detecting SDP DCP or CDP.

Greater than 500mA:

CHR1 pin will indicate the available up to 1.5 A source current after detecting DCP or CDP.




For a quick demo, just set the Battery Charging to “Greater than 500mA”, and connect CP2102N to a standard USB2.0 port of the PC. CP2102N will detect SDP, because the default max power setting for CP2102N is 500mA, so the host will provide 500mA current through VBUS after successful enumeration. There are some LEDs on the CP2102N EK board can indicate the GPIO status. For this case, CP2102N will set CHREN and CHR0 pin to 1 to light the corresponding LEDs.




About the detection of DCP, just connect the CP2102N to a power adapter as below. After detecting DCP, all of CHREN, CHR0 and CHR1 pin will be set to 1.