-
Notifications
You must be signed in to change notification settings - Fork 8.2k
STM32: fix USB power-up sequence on STM32N6 #97805
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
STM32: fix USB power-up sequence on STM32N6 #97805
Conversation
Actually do what the comment says and wait for Vdd33USB to be ready, instead of waiting for the opposite. Signed-off-by: Mathieu Choplain <[email protected]>
Actually do what the comment says and wait for Vdd33USB to be ready, instead of waiting for the opposite. Signed-off-by: Mathieu Choplain <[email protected]>
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
| /* Enable Vdd USB voltage monitoring */ | ||
| LL_PWR_EnableVddUSBMonitoring(); | ||
| while (__HAL_PWR_GET_FLAG(PWR_FLAG_USB33RDY)) { | ||
| while (!__HAL_PWR_GET_FLAG(PWR_FLAG_USB33RDY)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also done with LL_PWR_IsActiveFlag_USB33RDY()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't change the function used to minimize diff since this driver is legacy.



Wait for Vdd33USB to be ready instead of the opposite.
Note: I have added a commit to fix the
devicedriver as my understanding is that fixes are still accepted? Let me know if that commit should be dropped.Fixes #97589