Skip to content

USB devices broken on STM32F723XX MCUs after clock enable changes in Zephyr v3.7.0 #84934

@jwjenson

Description

@jwjenson

Describe the bug
This change to /drivers/usb/device/usb_dc_stm32.c in 3.7.0 has broken USB for the SOC_STM32F723XX.
9587b7e

In the previous implementation, the STMF723XX would make the following calls:

LL_AHB1_GRP1_EnableClock(LL_AHB1_GRP1_PERIPH_OTGHSULPI);
LL_APB2_GRP1_EnableClock(LL_APB2_GRP1_PERIPH_OTGPHYC);

In the 3.7.0 implementation, the STMF723XX makes these call:

LL_AHB1_GRP1_DisableClockLowPower(LL_AHB1_GRP1_PERIPH_OTGHSULPI);
LL_APB2_GRP1_EnableClock(LL_APB2_GRP1_PERIPH_OTGPHYC);

This ultimately causes USB_CoreReset in modules/hal/stm32/stm32cube/stm32f7xx/drivers/src/stm32f7xx_ll_usb.c to return a timeout which gets bubbled up and caused usb_enable() to return -EIO. The USB devices are not enumerated/discovered by the host system.

With the previous implementation, no errors are returned and the USB devices function as expected.

To Reproduce

Expected behavior
usb_enable() should not return an error and USB devices should enumerate on the host.

Impact
Showstopper: USB devices are unusable on STM32F723XX MCUs.

Logs and console output

Environment (please complete the following information):
Built against the Zephyr 3.7.0 release branch.
Tested on a Fedora Linux host system.

Additional context

Metadata

Metadata

Labels

RegressionSomething, which was working, does not anymorearea: USBUniversal Serial BusbugThe issue is a bug, or the PR is fixing a bugplatform: STM32ST Micro STM32priority: lowLow impact/importance bug

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions