I am working with a CCG3PA, using the CY4532 EVK for prototyping, modifying the provided PA/CLA firmware. In my application, I need to be able to modulate power delivered to an attached USB-C sink device, depending on external power conditions. This is accomplished by either changing source capabilities (for PD capable sink devices) or modulating Rp (for non-PD, Type-C only sink devices). My application does not support USB-A or BC1.2 devices.
For the most part I am able to achieve this and everything is working as expected.
In some circumstances, I would like to cancel an existing negotiated contract with a PD capable sink device and revert to modulating power using Type-C current only.
I know this may seem like an odd requirement. This is to support certain known sink devices that draw more than the PD negotiated current, due to errors in their PD implementation. For these devices, 5V current can instead be modulated appropriately via Type-C/Rp. These types of port partners can only be identified once a PD contract has already been established.
Essentially, for certain devices, I would like to send a Hard Reset (or simulate a disconnection) and then proceed as if the CCG3PA is not a PD capable source, modulating power only via Rp, until a disconnect event is received. Sending a Hard Reset to cancel the existing contract is straightforward, however, I'm unsure how I should prevent the CCG3PA from automatically re-negotiating a new PD contract afterwards.
In order to prevent the CCG3PA from negotiating a new PD contract after the Hard Reset I have tried calling one of these functions:
I have tried calling one or both of these functions at these times:
- prior to sending Hard Reset
- upon receipt of APP_EVT_HARD_RESET_SENT in sln_pd_event_handler()
- upon receipt of APP_EVT_HARD_RESET_COMPLETE in sln_pd_event_handler()
In all cases, the CCG3PA always re-negotiates a new PD contract. It's as if the pe/dpm are automatically being re-enabled sometime after the Hard Reset.
If I call dpm_typec_command(port, DPM_CMD_PORT_DISABLE, NULL) then the port seems to be disabled altogether and calling it again with DPM_CMD_SET_RP_DFLT, DPM_CMD_SET_RP_1_5A and DPM_CMD_SET_RP_3A have no effect.
How can I use Type-C only (Rp) to communicate source current capabilities, even when the sink port partner is PD capable?