2024-07-25 03:39 AM - edited 2024-07-28 10:46 PM
2024-07-26 04:53 AM
Hello @Sankar_Eswaran
What do you mean by "to change the power source" ?
Is the STM32L5 source or sink ?
If you are updating the source capabilities of the charger, you need to send the new capabilities to refresh the sink information.
Which API do you use ? Can you share your .cpd trace (see tools here) to understand the issue ?
You normally don't have to unplug the cable. That is the goal of the power delivery protocol : do live exchanges.
Regards,
Nicolas
2024-07-26 05:54 AM - edited 2024-07-28 10:48 PM
..
2024-07-26 06:39 AM
Hello Sankar,
You can use USBPD_DPM_RequestSourceCapability() API in order the source to send its capabilities again.
Then you will be able to negociate a new contract with sink device.
Best Regards,
Lucas
2024-07-26 06:42 AM - edited 2024-07-28 10:47 PM
..
2024-07-26 08:30 AM
Hello again Sankar,
I am not sure to understand if your device act as a source or as a sink ?
In case it is a source device you should call USBPD_DPM_RequestSourceCapability() API so that source sends its new source capabilities.
In case it is a sink device you can request for source capabilities of source by using USBPD_DPM_RequestGetSourceCapability() API. It will enforce source to resend source capabilities.
In any case it would be easier to help you with a trace of the communication.
Best Regards,
Lucas