-
Notifications
You must be signed in to change notification settings - Fork 24
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
usbfs: add support for the USBFS peripheral #57
base: master
Are you sure you want to change the base?
Conversation
Updates cargo dependencies, and removes the deprecated `bare_metal::Nr` trait. The `bare_metal::Nr` is no longer present in the latest version, and all usage in this HAL are easily replaced by directly converting the `Interrupt` enum to a base integer type.
Adds `.option +zicsr` to `eclic-mode-hack.S` to fix a failure to assemble with recent versions of `riscv64-unknown-elf-gcc` (e.g. 12.2.0).
Updates the precompiled `bin/gd32vf103xx-hal.a` part of the library.
Adds support for the USB full speed device peripheral. Implements the `Device` function using the [usb-device](https://github.com/rust-embedded-community/usb-device) crate. Creates a new `usbfs` module to allow for adding the `OTG` and `Host` functions in later work.
Changes the main clock from `McycleDelay` to `Delay<TIMER2>`. The C/C++ library from Gigadevice uses `TIMER2` as the USBFS timer, so mirror that in the HAL.
Adds the relevant part of the `usb_core_init` initialization sequence from the C/C++ GigaDevice library.
Moving this work to a draft PR. Currently, having issues with getting the device to detect There is also a read error when the device gets detected by the host, and I still need to make the TX FIFO sizes configurable based on the type of device. I'll continue debugging, and update the PR with fixes. Any help/advice is greatly appreciated. |
Hi!
There is a PR in a different repo which adds support for this chip: stm32-rs/synopsys-usb-otg#36
It would be nice to re-use it, but testing is needed for different chips to avoid regressions.
WBR,
Vadim Kaushan
…On 18 June 2023 08:12:53 EEST, rmsyn ***@***.***> wrote:
Moving this work to a draft PR.
Currently, having issues with getting the device to detect `VBUS` line. The device will power on when the `VBUS` wire is plugged directly into a 3.3V power line, but not the `VBUS` line.
There is also a read error when the device gets detected by the host, and I still need to make the TX FIFO sizes configurable based on the type of device.
I'll continue debugging, and update the PR with fixes. Any help/advice is greatly appreciated.
--
Reply to this email directly or view it on GitHub:
#57 (comment)
You are receiving this because you are subscribed to this thread.
Message ID: ***@***.***>
|
edit: So, I think something else is the issue with my example in I still can't get the VBUS line to power the device. Working on getting the hardware setup to proxy the device, because the device doesn't register the vid/pid (via Added an HID example to It feels like I'm missing something. I am using a USB-C breakout board to connect |
Adds support for the USB full speed device peripheral.
Implements the
Device
function using the usb-device crate.Creates a new
usbfs
module to allow for adding theOTG
andHost
functions in later work.Depends on #56