#usb-device #embedded #usb

no-std stm32-usbd

'usb-device' implementation for STM32 microcontrollers

13 releases (7 breaking)

0.8.0 Jul 27, 2025
0.7.0 Jul 2, 2024
0.6.0 Mar 12, 2021
0.5.1 Feb 6, 2020
0.3.0 Jul 10, 2019

#161 in Hardware support

Download history 1164/week @ 2025-10-01 822/week @ 2025-10-08 1491/week @ 2025-10-15 1246/week @ 2025-10-22 1296/week @ 2025-10-29 1230/week @ 2025-11-05 1051/week @ 2025-11-12 1132/week @ 2025-11-19 1181/week @ 2025-11-26 1043/week @ 2025-12-03 1020/week @ 2025-12-10 1933/week @ 2025-12-17 1288/week @ 2025-12-24 1298/week @ 2025-12-31 856/week @ 2026-01-07 1483/week @ 2026-01-14

5,096 downloads per month
Used in 31 crates (13 directly)

MIT license

155KB
4.5K SLoC

crates.io crates.io Build Status

stm32-usbd

usb-device implementation for STM32 microcontrollers.

This project is a successor to the great work started by @mvirkkunen.

Supported microcontrollers

  • STM32F042xx
  • STM32F048xx
  • STM32F072xx
  • STM32F078xx
  • STM32F103xx
  • STM32F303xC
  • STM32L0x2xx
  • STM32L4x2xx
  • And others...

Usage

This driver is intended for use through a device hal library. Such hal library should implement UsbPeripheral for the corresponding USB peripheral object. This trait declares all the peripheral properties that may vary from one device family to the other.

Examples

Example applications may be found in the individual device HALs:

Dependencies

~2.5MB
~41K SLoC