| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
Follow-up: after checking the STM32C5 HAL source, I replaced the temporary direct PA_12 GPIO detach with HAL_PCD_DeviceDisconnect() after PCD initialization. HAL_PCD_Start() performs the matching attach when USB is ready. The common usbd_if.c no longer contains a C5-specific pin reference. |
Sorry, something went wrong.
|
Follow-up split PRs are now open for the remaining shared pieces: #3060 contains the HAL v2 UART helper compatibility fix, and #3061 contains the generic UF2 upload recipe. The UF2 recipe invokes the uf2upload executable from Arduino_Tools #122; end-to-end C5 1200-bps upload requires both #3061 and this USB PR (#3059), while #3060 is independent of USB and Tools. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Summary
This PR adds STM32C5 HAL v2 USB device support to the shared USBDevice library.
This PR implements the following features:
Motivation
The Seeed XIAO STM32C5 uses the STM32C5 HAL v2 USB device peripheral. The shared USBDevice library currently has no HAL v2 low-level adapter, so the board cannot provide USB CDC through the normal Arduino core path.
This change is intentionally separated from the XIAO board definition so the common USB implementation can be reviewed independently. The initial split first used a direct PA_12 GPIO detach in usbd_if.c; after checking the STM32C5 HAL, this was replaced with the HAL PCD device-connect API. The common re-enumeration helper no longer contains a C5-specific pin reference.
Validation
USB CDC enumeration, serial communication and sustained CDC transfers were validated on Seeed XIAO STM32C5. The C5 CDC PMA endpoints are configured as non-overlapping single-buffer areas.
Code formatting
Closing issues
N/A