Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob

Firmware flow for battery charging in CCG3PA power bank application - KBA233867

Firmware flow for battery charging in CCG3PA power bank application - KBA233867

ArunKumarChoul
Employee
Employee
50 questions asked 50 sign-ins 25 sign-ins

Version: **

The following firmware sequence occurs when a power bank application that uses an EZ-USB™ CCG3PA controller is connected to a battery.

ArunKumarChoul_0-1631794063132.png

 

  1. When powered up, if the power bank system having a CCG3PA chip is in self-powered condition (battery is used for powering the system), the chip continues in the same state. If the system is in the dead battery condition, it goes to Step 6.a.
  2. CCG3PA enables its Type-A port with the default configuration and the Type-C port as DRP.
  3. CCG3PA disables its internal VBUS regulator because the external VDDD is already present to power the chip.
  4. CCG3PA starts VBATT (battery voltage) monitoring.
  5. The Type-C port can stay unattached or get attached as sink or source. Note that the Type-A port is always the source. The following cases are possible:
    a) If the Type-C port is connected as sink, CCG3PA performs a power role (PR) swap if the port partner is DRP and not externally powered. This ensures that the power bank is charging the DRP device. Otherwise, CCG3PA stays in sink mode and charges the battery.
    b) If the Type-C port gets connected as a source, CCG3PA stays as source.
  6. Check if VBATT has fallen below the cut-off voltage. In this case, one of the following cases can occur:
  1. If the Type-C port is connected as sink, CCG3PA stays as sink. If the charging flow was initiated from a dead battery condition, it waits for VBATT to rise above the restart voltage and then disables the internal VBUS regulator because the external VDDD is now available to power the CCG3PA device.

Notes:

  1. VBATT cut-off voltage is the limit below which battery discharging is stopped. You should program this to a value which ensures that the battery is not completely drained. If VBATT falls below the cut-off voltage, CCG3PA stops sourcing power on the Type-A and Type-C ports.

  2. VBATT restart voltage is the limit above which it is safe to allow battery discharging. You should program this to a value which ensures that the battery can discharge when it is sufficiently charged. VBATT > Restart voltage and VBATT < Max voltage is the normal range where the battery is sufficiently charged.

b) If the Type-C port is not connected to anything, CCG3PA configures it as a ‘sink only’ device.
c) If the Type-C port is connected as source, CCG3PA removes VBUS and waits for disconnect. On disconnect, CCG3PA configures it as a ‘sink only’ device.
d) CCG3PA disables the Type-A port to stop the discharging of the battery, and waits until a power adapter is connected on the Type-C port.

  1.     CCG3PA does the following when a power adapter is connected to the Type-C port (or if the Type-C port is already a sink (see Step 6.d):
    a) Enables battery charging.
    b) Configures the Type-A port as standard downstream port (SDP) with 5 V@500 mA as the setting. This enables charging the sink device from the Type-A port while the power bank is getting charged on the Type-C port.
  2. CCG3PA waits for disconnect on the Type-C port, and then measures VBATT.
    a) If VBATT > restart voltage, goes to Step 2.
    b) If VBATT < restart voltage (battery is not sufficiently charged), stays in ‘sink only’ mode on the Type-C port and disables the Type-A port, and then goes back to Step 7.

See the CCG3PA datasheet for more information.

0 Likes
344 Views