Skip to main content
Associate III
Oct 28, 2023 7:20 AM UTC
Solved

How can I use multiple USB device classes with STM32L4

Hello together,
does anyone know how I can implement multiple USB device classes on a STM32?
I want to use the CDC so a VCP and the DFU class so I can communicate with my chip and drive an update if needed. I am working with a STM32L452RE.

It must be possible, it is the standard functionality of every ST-Link V2/V3 debugger that exists.

In the CubeMx you can not set this, is that documented somewhere? Unfortunately I haven't found anything yet.

Thanks for your assistance!

This topic has been closed for replies.
Pavel A.
Pavel A.Best answer
Oct 28, 2023 11:24 AM UTC

The keyword is "composite device". Search for it and you'll find enough information.

 

5 replies

Pavel A.
Pavel A.Best answer
Oct 28, 2023 11:24 AM UTC

The keyword is "composite device". Search for it and you'll find enough information.

 

EniRot99Author
Associate III
Oct 30, 2023 8:19 AM UTC

This was the right key word. Found this which looks nice: I-CUBE-USBD-Composite 

MKing
Associate
Jan 19, 2024 6:26 AM UTC

Hi,

it is a shame that CubeMX does not support a combination of several device classes. After one day of searching examples i found a "software pack" for CubeMX:

alambe94/I-CUBE-USBD-Composite: Create STM32 USB Composite devices with ease. (github.com)

ST, please support this project and promote it, so we all can save lifetime!

 

MKing_0-1705645332984.png

 

I use:

CubeMX 6.10.0

CubeIDE 1.14.0

Processor: STM32F407VGT

Shirley.Ye
ST Employee
Oct 30, 2023 12:21 AM UTC

you can download the L4 cube firmware in st.com and there is USB middleware in stm32cube_fw_l4\Middlewares dir.