-
Notifications
You must be signed in to change notification settings - Fork 2k
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
cpu/stm32: improvement of USB device driver selection #18787
cpu/stm32: improvement of USB device driver selection #18787
Conversation
Murdock results✔️ PASSED 112f0c6 pkg/tinyusb: improvement of USB driver selection for STM32
ArtifactsThis only reflects a subset of all builds from https://ci-prod.riot-os.org. Please refer to https://ci.riot-os.org for a complete build for now. |
To be honest, I'm not really happy with the large selection list in cpu/stm32/periph/Kconfig and pkg/tinyusb/Kconfig. It might be better to define additional features, e.g. |
885be9c
to
22c69f5
Compare
I agree with that. This is also some why we have the I will take a closer look when I am done with the stm clock tree rework... |
It does look like the xlsx file containing the relevant data on USB support. So I guess extending the script should be very much possible.
Maybe we can try to summon @aabadie. The possible values in the
|
Yes. My concern is that it would be the only feature extracted from the |
Note: that this will be fixing the issue in nightlies for the nucleo-f3* |
As it has been 7 days with broken nightlies I would make a 1 liner fix PR if there are no objections. Already some merge conflicts need to be sorted out... |
+1 for fixing now with a large selection list and cleaning up later :) |
There are STM32 families where all models use only the Synopsys DWC2 USB OTG core while others completely use only the USB Device FS core. For these families then either the driver `drivers/usbdev_synopsys_dwc2` or the driver `cpu/stm32/periph/usbdev` is used depending on the respective family. However, the STM32 families F1 and L4 use both cores. The correct driver must therefore be selected depending on the CPU line or CPU model.
There are STM32 families where all models use only the Synopsys DWC2 USB OTG core while others completely use only the USB Device FS core. For these families then either the driver `drivers/usbdev_synopsys_dwc2` or the driver `cpu/stm32/periph/usbdev` is used depending on the respective family. However, the STM32 families F1 and L4 use both cores. The correct driver must therefore be selected depending on the CPU line or CPU model.
22c69f5
to
112f0c6
Compare
I have rebased the PR to resolve the conflicts. |
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.
Tested all stm32
based CPU boards with NIGHTLY=1
and #18797 patched on tests/pkg_tinyusb_cdc_msc/
and tests/shell
. Everything passed without mismatches.
Cleanup can be done later... This may make the nightlies pass again, so ACK.
Contribution description
This PR provides an improved selection of USB device driver for
periph/usbdev
andpkg/tinyusb
.There are STM32 families where all models use only the Synopsys DWC2 USB OTG core while others completely use only the USB Device FS core. For these families either the driver
drivers/usbdev_synopsys_dwc2
or the drivercpu/stm32/periph/usbdev
is used depending on the respective family. However, the STM32 families F1 and L4 use both cores. The correct driver must therefore be selected depending on the CPU line or the CPU model.Testing procedure
Since the definitions used by the modules
drivers/usbdev_synopsys_dwc2
,periph/usbdev
,tinyusb_portable_synopsys_dwc
andtinyusb_portable_stm32_fsdev
are provided by the header files in CMSIS and are only present if the corresponding USB core is used by the STM32 MCU, a successful CI compilation is sufficient proof for the correct driver selection.Issues/PRs references