Announcements

Live Webinar: USB-C adoption. Simple & Cost-efficient solutions | April 18th @9am or 5pm CEST. Register now !

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

cross mob
JoLu_3455101
Level 4
Level 4
5 likes given 5 solutions authored 25 replies posted

Hi,

I have a couple questions about CCG3PA:

1. Are CyDelay()/CyDelayUs() blocking functions that may affect system/vital functions from being executed?

2. I noticed that is a time difference between when a power contract is negotiated with a port partner (i.e. phone) and when the phone actually start sinking significant current. Is there a PD message that I can send to the port partner to see if it has reached its full targeted current? My understanding is that CCG3PA has a comparator that detects OCP, but cannot actually give me the current measurement being consumed by the port partner. This is why I was wondering if there is a message that I can send to port partner to request this information. I tried a simple delay (i.e. CyDelay) to wait for port partner to reach its targeted current, but this delay doesn't work well because the time varies too much.

Thanks,

Jonathan

0 Likes
1 Solution
ShifangZ_26
Moderator
Moderator
Moderator
10 likes given 250 sign-ins 1000 replies posted

Hi Jonathan,

1. The CyDelay()/CyDelayUs() is block the system as per C language, but it is not block the timer which was started before the Delay.

2. The CCG3PA have offered the VBUS current Measurement API, which is measure the current on the Rsense. You can get the current value timely. For your case, it can be implemented, you can acknowledge the target current information from the settled contract of Type-C port. And then, you can get the actual current value from the API.

uint16_t pd_hal_measure_vbus_cur (uint8_t port );

Measure the current currently being provided through the VBus supply.

Best Regards,

Lisa

View solution in original post

0 Likes
2 Replies
RajathB_01
Moderator
Moderator
Moderator
250 replies posted 100 replies posted 50 replies posted

Hi Jonathan,

1. Yes - when called from stack routines

2. No - a PD message cannot be used for such a purpose. The current measurement is not there in HW, so a PD message cannot do much.

Regards,

Rajath

ShifangZ_26
Moderator
Moderator
Moderator
10 likes given 250 sign-ins 1000 replies posted

Hi Jonathan,

1. The CyDelay()/CyDelayUs() is block the system as per C language, but it is not block the timer which was started before the Delay.

2. The CCG3PA have offered the VBUS current Measurement API, which is measure the current on the Rsense. You can get the current value timely. For your case, it can be implemented, you can acknowledge the target current information from the settled contract of Type-C port. And then, you can get the actual current value from the API.

uint16_t pd_hal_measure_vbus_cur (uint8_t port );

Measure the current currently being provided through the VBus supply.

Best Regards,

Lisa

0 Likes