Skip navigation
Home > All Places > USB > EZ-PD Type-C USB > Blog > 2019 > March
2019

CY4532 POWER BANK HARDWARE BLOCK DIAGRAM

The CY4532 power bank design is support Type-C and Type-A.

Type-C is Dual Role Power (Source Role: Type-C: 5V/3A, 9V/2A; Type-A: BC1.2, QC3.0, AFC (5V/3A, 9V/2.1A, and 12V/1.05A. Sink Role: Type-C: 5V/3A; Type-A: BC1.2 and Apple Charging.).

Type-A is Power Source Role only (BC1.2, QC3.0, AFC (5V/3A, 9V/2.1A, and 12V/1.05A. ).

KEY SIGNALS DESIGN POINTS:

1. SC8802 is DC/DC for Type-C VBUS power source and sink DC/DC buck-boost regulator.

CCG3PA control pins:

Pin#1 PWMI_OUT_C :Current setting for SC8802.

Pin#2 BUCK_BOOST_EN_C :Enable SC8802.

Pin#9 DIR_CTRL_C :Charging and Discharging direction control for SC8802.

 

2. SC8701 is DC/DC for Type-A VBUS power source.

CCG3PA control pins:

Pin#12 BUCK_BOOST_EN_A

Pin#8 TYPE_A_VBUS_EN

Pin#7 PWM_OUT_A

 

3. Type-A VBUS current sense on VBUS high end via INA199A3DCKR. The target is for Type-A device disconnection detected. It is wired to pin#13 of CCG3PA.

 

Based on above design, in order to get a clear SDK which is not related to any DC/DC, it shall be remove all of above firmware code to make it happen.

 

WHAT I HAVE REMOVED FROM SDK3.3

 

1. Clear @file config.h

/*******************************************************************************

* PSOURCE controls for PD port 1.

******************************************************************************/

#define APP_VBUS_SRC_FET_ON_P1()                    pd_internal_cfet_on(0, false)

 

#define APP_VBUS_SET_VOLT_P1(volt_mV)               vbus_ctrl_fb_set_volt(TYPEC_PORT_0_IDX, volt_mV)

 

#define APP_VBUS_SRC_FET_OFF_P1()                   pd_internal_cfet_off(0, false)

 

/*******************************************************************************

* PSOURCE controls for Port 2 (TYPE A port).

******************************************************************************/

#define APP_VBUS_SRC_FET_ON_P2()                    vbus_ctrl_pwm_turn_on(TYPEC_PORT_1_IDX)

 

#define APP_VBUS_SET_VOLT_P2(volt_mV)               vbus_ctrl_pwm_set_volt(TYPEC_PORT_1_IDX, volt_mV)

 

#define APP_VBUS_SRC_FET_OFF_P2()                   vbus_ctrl_pwm_turn_off(TYPEC_PORT_1_IDX)

 

/*******************************************************************************

* Power Sink (PSINK) controls for PD port 1.

******************************************************************************/

/* Function/Macro to turn consumer FET for P1 ON. */

/* Enable consumer direction, turn on Consumer FETs and enable Buck Boost converter. */

#define APP_VBUS_SNK_FET_ON_P1()                    pd_internal_cfet_on(0, false)

 

/* Function/Macro to turn consumer FET for P1 OFF. */

/*

* Disbale Buck Boost converter, turn off Consumer FETs, set direction to provider mode

* and turn off PWM I which limits current consumption.

*/

#define APP_VBUS_SNK_FET_OFF_P1()                   pd_internal_cfet_off(0, false)

 

2. @ file power_bank.c

line#49: comment out #define VBATT_MON_GPIO                         (GPIO_PORT_2_PIN_1)

 

line#64 - line#94 : Comment out all of contents in function void pb_typec_set_current (uint16_t cur_10mA)

 

line#151 -line#165: Comment out all of contents in function static uint16_t pb_get_battery_voltage(void) to fake battery voltage check (Return a constant value with 4.2V to let power bank state machine tuning well.)

 

3. @ file power_bank.h

line#51 - line#59 Comment out all of MACRO defines for PWM control.

 

ATTACHED PROJECT FILE

--- CYPD3171-24LQXQ_Single_C.zip