- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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