2024-12-20 11:03 AM
Hi, I am asking about the STM32 usb power delivery middleware. Is there a way to delay/stop the PS_RDY (power supply ready) message from being sent out, or is that completely automatic? Thank you.
Solved! Go to Solution.
2024-12-20 01:37 PM - edited 2024-12-20 01:38 PM
I figured it out. In the function USBPD_DPM_Notification add the case USBPD_NOTIFY_POWER_STATE_CHANGE. Inside that case statement, don't allow the function to return until your power supply is where it should be (but be sure not to take forever or the other device might send a hard reset).
(I also check in that case statement to make sure I am indeed acting as a source, since my device is dual role, but idk for sure if that is needed.)
2024-12-20 01:37 PM - edited 2024-12-20 01:38 PM
I figured it out. In the function USBPD_DPM_Notification add the case USBPD_NOTIFY_POWER_STATE_CHANGE. Inside that case statement, don't allow the function to return until your power supply is where it should be (but be sure not to take forever or the other device might send a hard reset).
(I also check in that case statement to make sure I am indeed acting as a source, since my device is dual role, but idk for sure if that is needed.)
2024-12-20 01:39 PM
Also note that if you don't do this bad things may happen since you aren't supposed to send a PS_RDY message until the power supply is ready.