Skip to content

Conversation

@mathieuchopstm
Copy link
Contributor

@mathieuchopstm mathieuchopstm commented Oct 17, 2025

Wait for Vdd33USB to be ready instead of the opposite.

Note: I have added a commit to fix the device driver as my understanding is that fixes are still accepted? Let me know if that commit should be dropped.

Fixes #97589

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]>
@sonarqubecloud
Copy link

@mathieuchopstm mathieuchopstm added this to the v4.3.0 milestone Oct 17, 2025
Copy link
Contributor

@FRASTM FRASTM left a 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)) {
Copy link
Contributor

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

Copy link
Contributor Author

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.

@jhedberg jhedberg merged commit 26f5469 into zephyrproject-rtos:main Oct 21, 2025
33 checks passed
@mathieuchopstm mathieuchopstm deleted the stm32_usb_fix_n6_pwr_init branch October 21, 2025 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: USB Universal Serial Bus platform: STM32 ST Micro STM32

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants