cancel
Showing results for 
Search instead for 
Did you mean: 

usb power delivery PS_RDY message

alex33
Associate II

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.

1 ACCEPTED SOLUTION

Accepted Solutions
alex33
Associate II

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.)

View solution in original post

2 REPLIES 2
alex33
Associate II

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.)

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.