cancel
Showing results for 
Search instead for 
Did you mean: 

STM32G4 + USB PD + Switching power profiles

ADoro.2
Associate III

I am studying USB PD now with the demo board B-G474E-DPOW1.

I try to program the consumer and need help with switching profiles.

When the cable is connected, the charger displays a list of available profiles.

0693W000007ESB3QAO.jpgI can't figure out how to choose the right profile.

  1. Should the consumer choose one of the suggested source profiles?
  2. Or does the consumer pass one of its profiles to the source?
  3. At what time can I send a switch request?

Could you give an example of a function that implements profile switching?

1 ACCEPTED SOLUTION

Accepted Solutions
Yohann M.
ST Employee

Dear @ADoro.2​ 

You may have few answers into our Wiki page:

https://wiki.st.com/stm32mcu/wiki/USB_Power_Delivery_overview

And mainly the part describing our strategy how to select a power profile:

https://wiki.st.com/stm32mcu/wiki/USB_Power_Delivery_overview#SNK_PDO_selection_policy_in_DPM

In Cubemonitor-UCPD, for test, you can request a power profile but this profile should match with your sink PDO.

Regards

Yohann

View solution in original post

3 REPLIES 3
Yohann M.
ST Employee

Dear @ADoro.2​ 

You may have few answers into our Wiki page:

https://wiki.st.com/stm32mcu/wiki/USB_Power_Delivery_overview

And mainly the part describing our strategy how to select a power profile:

https://wiki.st.com/stm32mcu/wiki/USB_Power_Delivery_overview#SNK_PDO_selection_policy_in_DPM

In Cubemonitor-UCPD, for test, you can request a power profile but this profile should match with your sink PDO.

Regards

Yohann

Nicolas P.
ST Employee

Hello,

Perhaps you can have a look at this wiki article.

The consumer can select any of the profiles proposed by the provider. Whenever he needs.

You could even request a PDO that is not in your sink PDO list.

If you have STM32G4 package, check for the G4 Eval application example : file Projects\STM32G474E-EVAL\Demonstrations\Modules\ucpd\usbpd_dpm_user.c.

And look for function USBPD_DPM_RequestMessageRequest.

ADoro.2
Associate III

@Yohann M.​ , @Nicolas P​  thank you so much.

I figured out this problem.