Is there a way for CCG2 to decide which PDOs to advertise?

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
MiMu_4671456
Level 1
Level 1

Can the CCG2 firmware be adjusted such that it advertises PDOs depending on certain features?

My device is a USB-C dongle that can also be attached to an external supply.

I want the CCG2 to detect if the external supply is present and then advertise that power available (how much could also be detected).

If no external supply is available I want the dongle to draw power from the connected system, meaning it should advertise itself as consumer only.

0 Likes
1 Solution
Sananya_14
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

Hello,

Yes, I think it could be done. In the configuration, you could set the Port Role as DRP and Preferred Role as Source. You could use a GPIO to detect the power from external supply using a resistive divider and initiate a PR_SWAP in the firmware after checking for the current role.

Please let us know if you would like to edit the source PDOs as well? You could check for the configured PDOs using the current pdo_src pointer.

Please refer to High Frequency functions in CCG2 firmware customize​ for details on the related functions.

Best Regards,

Sananya

View solution in original post

0 Likes
2 Replies
MiMu_4671456
Level 1
Level 1

is there any way to receive a reply within 24-48h here?

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

Hello,

Yes, I think it could be done. In the configuration, you could set the Port Role as DRP and Preferred Role as Source. You could use a GPIO to detect the power from external supply using a resistive divider and initiate a PR_SWAP in the firmware after checking for the current role.

Please let us know if you would like to edit the source PDOs as well? You could check for the configured PDOs using the current pdo_src pointer.

Please refer to High Frequency functions in CCG2 firmware customize​ for details on the related functions.

Best Regards,

Sananya

0 Likes