- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I need to communicate with a TI PD chip that uses TI's PDIO alternate mode. Has anyone attempted this? I'm using the CCG3 as a DRP.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
You could check if the port is in a UFP role using the dpm_get_info() API and reading dpm_stat->cur_port_type before handling the VDMs. If you need to send any VDMs to the UFP, you could use the dpm_pd_command() API after checking if the vdm task manager is idle.
Example usage:
if (is_vdm_task_idle(port))
{
cmd_buf.cmd_sop = SOP;
cmd_buf.cmd_do[0] = /* add your custom data */;
cmd_buf.no_of_cmd_do = 1;
cmd_buf.timeout = 100;
while (dpm_pd_command(port, DPM_CMD_SEND_VDM, &cmd_buf, pd_command_cb) != CCG_STAT_SUCCESS)
{
}
}
In the pd_command_cb(), you could evaluate the response for the VDM and perform necessary operations.
Best Regards,
Sananya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Please let us know if you have CCG3 configured as a UFP or DFP? If it is a UFP, you could add the TI SVID under the configuration and add the VDM handling for the GPIOs for PDIO mode under eval_vdm() function in vdm.c file.
Please refer to the Host SDK User Guide for detailed explanation of the VDM handling in the firmware.
Best Regards,
Sananya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We're setup as a DRP but need these Vendor Defined Messages working while operating as an UFP.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
You could check if the port is in a UFP role using the dpm_get_info() API and reading dpm_stat->cur_port_type before handling the VDMs. If you need to send any VDMs to the UFP, you could use the dpm_pd_command() API after checking if the vdm task manager is idle.
Example usage:
if (is_vdm_task_idle(port))
{
cmd_buf.cmd_sop = SOP;
cmd_buf.cmd_do[0] = /* add your custom data */;
cmd_buf.no_of_cmd_do = 1;
cmd_buf.timeout = 100;
while (dpm_pd_command(port, DPM_CMD_SEND_VDM, &cmd_buf, pd_command_cb) != CCG_STAT_SUCCESS)
{
}
}
In the pd_command_cb(), you could evaluate the response for the VDM and perform necessary operations.
Best Regards,
Sananya