- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Pranay,
Sorry for the delay in responding. In the 'app_event_handler' API, you have a case (APP_EVT_PKT_RCVD).
This is disabled by default. if you enable this, you can add an API to check the packet recieved. For example, if msg_type is CTRL_MSG_REJECT, the packet received is 'Reject'.
Regards,
Rajath
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello RajathB_01,
By Configuring ccg3pa as Sink and after initiating an UVDM, If DUT responds How would I track the respose.
What is the expected sequence of code flow for an UVDM response ?
Regards,
Pranay.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Pranay,
Which is the API you are using to send UVDM's?
Regards,
Rajath
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
"dpm_pd_command(G_PORT0, DPM_CMD_SEND_VDM,&VDM_cmd_buf, NULL);"
This is the API I'm using to initiate UVDM by making
VDM_cmd_buf.cmd_do[index].ustd_vdm_hdr.cmd_type = CMD_TYPE_INITIATOR; | |
VDM_cmd_buf.cmd_do[index].ustd_vdm_hdr.cmd = VDM_CMD_DSC_IDENTITY; | |
VDM_cmd_buf.cmd_do[index].ustd_vdm_hdr.vdm_type = VDM_TYPE_UNSTRUCTURED; |
Question 1:
with above configuration I'm able to initiate uvdm, but need to track response.
That means DUT is responding with below VDOs, I need to decode and check for DUTs response.
How I achieve this ?
How would I decode DUTs UVDM response ?
Question 2:
In the screenshot below, I want to change "Available for Vendor use" field which is from bits[14:0] in Each Dataobject.
How do I configure the b[14:0] bits in each Data object ??
can you please point me out to the API if any available.
Thanks & Regards,
Pranay.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Pranay,
Have you tried the uvdm_handler API?
uvdm_response_state_t uvdm_handle_cmd(uint32_t *rx_pkt, pd_do_t **vdm_rspn_pkt, uint8_t *vdo_count, flash_cbk_t flash_cb)
Regards,
Rajath
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Rajath,
You mean for initiating uVDM? No I didn't tried and Can we initiate using this COmmand ??
But when uVDM response is received I Kept breakpoint in uvdm_handle_cmd() function but it is not hitting.
can you try this on your end and let me know the sequence flow ?
Regards,
Pranay.
-
On Thu, 02 Jul 2020 16:33:13 +0530 RajathB_01 <community-manager@cypress.com> wrote -
http://www.cypress.com
https://community.cypress.com/?et=watches.email.thread
Logging Events Received in CC3PA
reply from https://community.cypress.com/people/RajathB_01?et=watches.email.thread in EZ-PD Type-C USB - https://community.cypress.com/message/241437?et=watches.email.thread#241437
Hi Pranay,
Have you tried the uvdm_handler API?
uvdm_response_state_t uvdm_handle_cmd(uint32_t *rx_pkt, pd_do_t **vdm_rspn_pkt, uint8_t *vdo_count, flash_cbk_t flash_cb)
Regards,
Rajath
Reply to this message by replying to this email, or https://community.cypress.com/message/241437?et=watches.email.thread#241437
Start a new discussion in EZ-PD Type-C USB by mailto:discussions-community-productforums-usb-ezpdtypec--usb@broadcomwiced-v8.hosted.jivesoftware.com or at https://community.cypress.com/choose-container.jspa?contentType=1&containerType=14&container=2261&et=watches.email.thread
Following https://community.cypress.com/message/241437?et=watches.email.thread#241437 in these streams:
Inbox
This email was sent by Cypress Developer Community because you are a registered user.
You may https://community.cypress.com/unsubscribe.jspa?email=pranay%40graniteriverlabs.in&token=0d7b2fdac2470c62213b6e2bad37147ce0c7fe09e0bf80fd6ab2a318cc92c26f instantly from Cypress Developer Community, or adjust email frequency in your https://community.cypress.com/user-preferences!input.jspa
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Pranay,
You mean for initiating uVDM? No I didn't tried and Can we initiate using this COmmand ??
No, I was talking about tracking recieved UVDM response using this api.
But when uVDM response is received I Kept breakpoint in uvdm_handle_cmd() function but it is not hitting.
Okay, I will check about this.
Regards,
Rajath
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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