alambe94 / I-CUBE-USBD-Composite

Create STM32 USB Composite devices with ease.
MIT License
161 stars 34 forks source link
composite stm32 usb usb-library

I-CUBE-USBD-Composite

A wrapper class around ST USB stack to create STM32 USB Composite devices with ease.

Modifications

TODO

How to use

1. Download AL94.I-CUBE-USBD-COMPOSITE.1.0.0.pack from repo.

Download

2. Add AL94.I-CUBE-USBD-COMPOSITE.1.0.0.pack to CubeMX.

ADD1

LOCAL

ADD2

INSTALLED

3. Inlude in project

Enable USB peripheral & NVIC NVIC

Add middleware to project INCLUDE

Add components to project, Selection of Core & COMPOSITE is must SELECT

Enable the classes you want ENABLE

Dont forget!!! SELECT2

4. Generate Code

Call MX_USB_DEVICE_Init(); manually SELECT2

Enumerated

1. USB CDC ACM.

CDC_ACM

2. CDC & HID.

HID_CDC

3. RNDIS.

RNDIS

4. UAC Microphone & Speaker.

UAC

5. UVC Camera & Mass Storage.

UVC_MSC

Troubleshooting

  1. Cross check number of endpoints in MCU & consumed by application.
  2. Adjust Endpont Size & PMA buffers in "Target/usbd_conf.c" accordingly.
  3. For some classes "SOF" must be enabled!!!
  4. Make sure MCU clock is configured properly & USB Interrupt is enabled.
  5. For L5 HAL_PWREx_EnableVddUSB() needs to be called before enabling USB operation.