stm32-usbd 0.5.1

'usb-device' implementation for STM32 microcontrollers
Documentation Build Status


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...


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. Additionally, hal should pass ram_access_1x16 of ram_access_2x16 feature to the stm32-usbd library to define endpoint memory access scheme:

  • ram_access_1x16 - for "1x16 bits/word" access scheme
  • ram_access_2x16 - for "2x16 bits/word" access scheme


See the stm32-usbd-examples repo for different device-specific examples.

See the hal example for the reference hal implementation.