Skip to main content
Visitor II
February 12, 2021
Solved

STM32G4 + USB PD + Switching power profiles

  • February 12, 2021
  • 3 replies
  • 1197 views

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?

    This topic has been closed for replies.
    Best answer by Yohann M.

    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

    3 replies

    Yohann M.Answer
    ST Employee
    February 17, 2021

    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

    ST Employee
    February 17, 2021

    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.2Author
    Visitor II
    February 18, 2021

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

    I figured out this problem.