-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Add STM32H7 Series USB Device Support #33365
Comments
I am planning to contribute this next week, but I don't want to promise anything. So here are the steps you need:
|
@shlomow Thank you for this—I've applied these changes to my dev branch, and now the device will enumerate on my MacBook! 🎉 Unfortunately, the device gets suspended shortly after enumeration:
I'm updated my development branch with your suggested changes. |
I made a mistake in what I wrote before. Enable voltage detector in the end of |
@shlomow Moved the voltage detector enable to However, the |
Continuing testing with the I tried setting |
Realized that I hadn't tried to send data through the |
@shlomow Did you have more success than this? |
Sorry,. I am on holiday now |
Is this request related to a missing driver support for a particular hardware platform, SoC or board? Please describe.
This request addresses USB device driver support on the STM32H7 series. It is not currently supported by Zephyr.
Describe why you are asking for this support?
I have attempted to bring up USB device support myself (see below), but need help understanding where some of the pieces belong (clock and peripheral config) as well as hoping to get support from people more expert in the STM USB implementation.
I am willing, to the best of my abilities, to support this functionality if it makes it into Zephyr.
Additional context
STM32H7 Overview
USB hardware and PCB guidelines using STM32 MCUs - Application note
My Efforts So Far
I have started work in this development branch. I started with trying to bring up the USB FS peripheral on the NUCLEO-H753. I added it to the
stm32h7.dtsi
and tonucleo_h753zi.dts
. (One area where I need help is in understanding how to populate some of the values in the DTS entry for this peripheral, how to find all of the appropriate register values).With these changes, the
samples/subsys/usb/hid
sample would compile, but the peripheral failed to initialize.Comparing the init and config in Zephyr to a working USB STM32H7 project in STM32CubeIDE, I tried adding some USB peripheral config that seemed to be missing for H7.
With these changes, the device will now initialize! There is even different behavior on startup if a USB host is attached. Specifically, the device is suspended.
Unsurprisingly, the device does not enumerate.
At this point I'm not sure what's missing. Some fundamental incompatibility of the H7 USB device that's not obvious from looking at their header and example files, or something with the configuration of the Zephyr stack in terms of device registers, interrupts, and pinouts.
The text was updated successfully, but these errors were encountered: