Skip to content

Conversation

sylvioalves
Copy link
Contributor

@sylvioalves sylvioalves commented Sep 29, 2025

Ensure the USB clock is enabled before initializing the controller by invoking the pre_enable hook. This avoids initialization failures when the HAL has not yet configured the clock.

Fixes #96679

tmon-nordic
tmon-nordic previously approved these changes Sep 29, 2025
raffarost
raffarost previously approved these changes Sep 29, 2025
tmon-nordic
tmon-nordic previously approved these changes Sep 29, 2025
tmon-nordic
tmon-nordic previously approved these changes Sep 30, 2025
@sylvioalves sylvioalves changed the title udc_dw2: espressif: add pre-enable hook udc_dw2: espressif: add pre-enable and shutdown hooks Sep 30, 2025
@sylvioalves sylvioalves force-pushed the bugfix/usb-pre-init branch 2 times, most recently from c493238 to 4964956 Compare September 30, 2025 15:04
@sylvioalves
Copy link
Contributor Author

@jfischer-no adding the shutdown hook was indeed needed, thanks.
That allows performing tests/driver/udc.

@tmon-nordic
Copy link
Contributor

nitpick: the driver is usb_dwc2 not usb_dw2

@sylvioalves sylvioalves changed the title udc_dw2: espressif: add pre-enable and shutdown hooks udc_dwc2: espressif: add pre-enable and shutdown hooks Sep 30, 2025
Ensure the USB clock is enabled before initializing the
controller by invoking the pre_enable hook. This avoids
initialization failures when the HAL has not yet configured
the clock.

Adds shutdown hook to allow interrupt and clock deinit.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Increase default UDC DWS stack size for ESP32-S3 in order
to guarantee quirks are executed without issues.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
@sylvioalves sylvioalves changed the title udc_dwc2: espressif: add pre-enable and shutdown hooks drivers: udc_dwc2: add Espressif pre-enable and shutdown hooks Oct 3, 2025
Copy link

sonarqubecloud bot commented Oct 3, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: USB Universal Serial Bus
Projects
None yet
Development

Successfully merging this pull request may close these issues.

samples:subsys:usb:webusb: esp32s3 after enabling spi ram, device configuration is not supported
5 participants