Logging Events Received in CC3PA

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
PrRe_3492461
Level 4
Level 4
First like received 50 sign-ins 50 replies posted

Hello Cypress community,

I'm using ccg3pa for my development.

Whenever a PDC happens I'm able to log Events received by ccg3pa by Filling a logger in "app_event_handler()" @app.c file.

So There is "APP_EVT_PKT_RCVD" event occuring for PD packet received.

Do we have any provision to find out whether what kind of packet is received ?

For Example:

We initiated Request packet with PDO with Max.operating and Operating current which DUT doesn't support, in this case DUT responds with Reject which is expected.

So How would I come to know whether DUT Rejected/Accepted my last Requested PDO and take a call based on that? How would I achieve this requirement?

Regards,

Pranay.

0 Likes
1 Solution
RajathB_01
Moderator
Moderator
Moderator
250 replies posted 100 replies posted 50 replies posted

Hi Pranay,

You can use the app_evt_handler() API for checking UVDM response too. The event PKT_RCVD can be used to identify what packet has been recieved.

For additional info, the function eval_vdm() in vdm.c will be used to process recieved UVDM's. When PKT_RCVD event occurs, the parameter void *dat contains pd_packet_extd_t* formatted received data (VDO).

Regards,

Rajath

View solution in original post

0 Likes
8 Replies