Skip to main content
ADoro.2
Associate III
August 30, 2021
Question

STM32 + USB PD + Voltage and Current control

I work with STM32G4 and USB PD.

I have a question about voltage and current control. How is voltage and current controlled during operation so that the values do not go beyond the limits specified in the profile definition?

I found only one place in the code where this is controlled - in the void function DPM_ManageAlert (void). Is it being done elsewhere?

This topic has been closed for replies.

1 reply

Yohann M.
ST Employee
September 21, 2021

Dear @ADoro.2​ 

Mainly the voltage control is done in the applications we delivered. Main power functions are located in usbpd_pwr_if.c:

For the CAD state machine (file usbpd_cad_hw_if.c), we need to regularly check the VBUS Status (during SRC/SNK attachment or when SNK is attached to port partner every 10ms).

VBUS level is also checked during hard reset procedure through 'USBPD_DPM_IsPowerReady -> USBPD_PWR_IF_SupplyReady' function.

Regards,

Yohann