Anyone using VDM to emulate TI's PDIO Alternate Mode?

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
MaKe_4459911
Level 1
Level 1
5 questions asked 10 sign-ins 5 replies posted

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.

0 Likes
1 Solution

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

View solution in original post

0 Likes
3 Replies
Sananya_14
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

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

0 Likes

We're setup as a DRP but need these Vendor Defined Messages working while operating as an UFP.

0 Likes

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

0 Likes