drivers: usb: udc: stm32: implement proper isochronous support for ST USB IP #105151
Merged
nashif merged 3 commits intozephyrproject-rtos:mainfrom Mar 24, 2026
Merged
Conversation
433865a to
9ea9c3d
Compare
4 tasks
erwango
previously approved these changes
Mar 16, 2026
Contributor
Author
|
Would appreciate review/+1 from an USB maintainer: @jfischer-no / @tmon-nordic / @josuah if one of you could please take a look 🙂 |
tmon-nordic
reviewed
Mar 16, 2026
9ea9c3d to
a32cbb6
Compare
Contributor
Author
|
@tmon-nordic PTAL again |
Move options such that all generic options go toghether, followed by hardware-specific ones and wrap the HW-specific options in dedicated menus. Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
a32cbb6 to
4efa9cc
Compare
tmon-nordic
previously approved these changes
Mar 23, 2026
gautierg-st
previously approved these changes
Mar 24, 2026
erwango
previously approved these changes
Mar 24, 2026
Update the copyright notice to use SPDX-FileCopyrightText. While at it, add STMicroelectronics to the list of copyright holders as we have made numerous contributions to this driver recently. Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Implement proper support for isochronous operation when "st,stm32-usb" IP is used. Previously, the driver did not take into account specificities of this IP regarding isochronous endpoints resulting in invalid transfers. Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
3aee3a2
4efa9cc to
3aee3a2
Compare
erwango
approved these changes
Mar 24, 2026
Contributor
Author
|
Fixed the typo reported by @gautierg-st and added STMicroelectronics to the copyright list of the driver in a preliminary commit while at it. |
|
tmon-nordic
approved these changes
Mar 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



The ST USB IP (compatible
st,stm32-usb) supports two different modes of operation for each endpoint:EP0 IN/EP0 OUT) uses a single USB SRAM buffer and a singlebuffer descriptorregister to perform transfersEP1 OUT) uses two USB SRAM buffers and twobuffer descriptorregisters to perform transfersUnlike others, isochronous endpoints must be double-buffered which requires special handling that, up until now, was not implemented in the driver. As such, it was possible to incorrectly configure the IP which could result in e.g. wrong data being sent to the USB bus.
Update the UDC driver to properly support isochronous operation with this IP. To this end, and due to stack architecture, three new Kconfig options are introduced:
UDC_STM32_STUSB_ISOCHRONOUS_SUPPORT: enables overall isochronous supportUDC_STM32_STUSB_ISO_OUT_EP_NUM/UDC_STM32_STUSB_ISO_IN_EP_NUM: used to reserve a fixed number of endpoints for isochronous operation (in either direction)EPn <OUT/IN>as not supporting isochronous mode onceEPn <IN/OUT>has been configured in bulk/interrupt modeEPn <OUT/IN>as not being available (no mode supported) onceEPn <IN/OUT>has been configured in isochronous modeTested OK on STM32H573I-DK with
samples/subsys/usb/uac2_explicit_feedback(requires additional patches not provided here)