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

USB EZ-PD™ Type-C Forum Discussions

JoLu_3455101
Level 4
Level 4
25 replies posted 25 sign-ins First solution authored

Hi,

I have the CCG3PA (CYPD3171) configured as a sink-only device. It is connected to a PD source with two "Fixed Supply" and one "Battery"-type supply (so 3 PDOs total). Using EZ-PD Configuration Utility, I've created and programmed "Sink PDO 1" to match the "Battery" source PDO, because I prefer the CCG3PA sink to select the "Battery" PDO. I am required to have "Sink PDO 0" to specify 5V Fixed Supply because it is a required default, even though I don't want the 5V PDO.

Questions:
1. How do I get my CCG3PA sink to select the Battery PDO from the source (3rd source PDO)? It kept on selecting the first source PDO, which is the Fixed 5V. As I can see from the EZ-PD Analyzer (please see attached screenshot), the source's Battery PDO data (right side of the screenshot) is matching with my Sink PDO 1 (left side of the screenshot). Still, I could not get CCG3PA sink to pick the Battery PDO.

2. From my screenshot, I've noticed that  EZ-PD Analyzer reports the source in units of 50mV and 250mW, but EZ-PD Configuration Utility reports the sink in units of 1mV and 1mW. Is this a bug or what is correct? Perhaps this mismatch is causing my problem described in question #1?

Thanks,
Jonathan

 

0 Likes
1 Solution

Hello Jonathan,

  1. (if you use SDK 3.5)

First , the FW will compare the Source PDO and Sink PDO in the API 
ATTRIBUTES_APP_PDO static bool is_src_acceptable_snk(uint8_t port, pd_do_t* pdo_src, uint8_t snk_pdo_idx)

  1.  

It will compare the Fixed Source PDO and then compare Battery PDO

If you want to send the Battery PDO request, the Sink PDO and the source PDO should meet the following conditions:

 

case PDO_BATTERY:
/* Battery connected directly to a battery
* This combination is unreliable */
if((min_volt >= pdo_snk->bat_snk.min_voltage) && (max_volt <= pdo_snk->bat_snk.max_voltage))
{
compare_temp = GET_MAX (max_min_temp, pdo_snk->bat_snk.op_power);
if (pdo_src->bat_src.max_power >= compare_temp)
{
CALL_MAP(gl_op_cur_power)[port] = pdo_snk->bat_snk.op_power;
out = true;
}
}

Otherwise you will only see the request of fix PDO

3.

By the way, you’d better set the PDO_SNK_BATTERY_SUPP_DISABLE = 0 in config.h

Best regards,
Kieran

View solution in original post

0 Likes
5 Replies
Kieran_Pan
Moderator
Moderator
Moderator
50 sign-ins 10 solutions authored First like received

Hello Jonathan,

1.
Do you mean your block diagram like the below picture?

Kieran_Pan_0-1673075999889.png

 


The range of minimum voltage is 3000mV to 5000mV. You can change the maximum value according to the minimum value in the EZ-PD configuration utility.

2.
Both are right, you can set 1mV and 1mW in EZ-PD configuration Utility, but in real test we recommend 50mV and 250mW in step.
Because in real product design of charger adapter and power bank, they are set in 50mV and 250mw in step. And in the USB TYPE-C spec they are all integer multiple of the 50 and 250.

Best regards,
Kieran

0 Likes

Hi Kieran,

Thanks for your reply. Please see below for my comments:

1. The diagram that you attached is similar to what I have, but since my CCG3PA application is sink-only, the Provider path doesn't exist. I don't have a battery as well as this is not a power bank.

My CCG3PA sink device is attached to a PD source which provides a "Battery" type PDO. Please let me know how I can request it as the CCG3PA sink device is only getting the Fixed 5V PDO even though it has a "Sink PDO 1" that matches the Source's "Battery" PDO.

Best regards,
Jonathan

0 Likes

Hello Jonathan,

  1. (if you use SDK 3.5)

First , the FW will compare the Source PDO and Sink PDO in the API 
ATTRIBUTES_APP_PDO static bool is_src_acceptable_snk(uint8_t port, pd_do_t* pdo_src, uint8_t snk_pdo_idx)

  1.  

It will compare the Fixed Source PDO and then compare Battery PDO

If you want to send the Battery PDO request, the Sink PDO and the source PDO should meet the following conditions:

 

case PDO_BATTERY:
/* Battery connected directly to a battery
* This combination is unreliable */
if((min_volt >= pdo_snk->bat_snk.min_voltage) && (max_volt <= pdo_snk->bat_snk.max_voltage))
{
compare_temp = GET_MAX (max_min_temp, pdo_snk->bat_snk.op_power);
if (pdo_src->bat_src.max_power >= compare_temp)
{
CALL_MAP(gl_op_cur_power)[port] = pdo_snk->bat_snk.op_power;
out = true;
}
}

Otherwise you will only see the request of fix PDO

3.

By the way, you’d better set the PDO_SNK_BATTERY_SUPP_DISABLE = 0 in config.h

Best regards,
Kieran

0 Likes

Hi Kieran,

Thanks for letting me know that I need to modify the firmware (as opposed to just changing the configuration in EZ-PD Configuration Utility) to request the Battery PDO from the source.

In the code that you suggested, there a comment saying:
"This combination is unreliable"
Is there a reason why? Any pitfalls that I should look out for?
I would need the CCG3PA sink to reliably request the Battery PDO from the source (instead of the Fixed 5V PDO).

Thanks,
Jonathan

0 Likes

Hello Jonathan,

The comment only indicates that the code is invalid when two batteries are directly connected.

Best regards,
Kieran

0 Likes