cancel
Showing results for 
Search instead for 
Did you mean: 

How to configure STM32 USB Device as Composite Device (CDC+MSC)?

jsalg.1
Associate III

Hi Team,

I am looking for the help to configure my STM32 MCU as Composite Device (MSC + CDC). I have gone through multiple blogs and examples available in ST community but none of the example shown me how to configure USB as Composite class (CDC + USB).

I am using STM32F750x8 could you please help me on this by sharing some inputs?

3 REPLIES 3
gbm
Lead III

Look at the STM32 USB code. After a week or so of heavy analysis, you will probably be able to understand their composite device support (it's already there, just not officially supported by CubeMX). Or maybe spend 3 days on writing your own USB stack, designed for composite from the ground up. As a side effect you should be able to save like 80% of required Flash and RAM size. That's what I did - 2 VCOMs + printer take 3.5 KiB of Flash + 300 B of RAM. MSC should add no more than 1.5 KiB - I will add it soon.

My STM32 stuff on github - compact USB device stack and more: https://github.com/gbm-ii/gbmUSBdevice
LOnGr.1
Associate III

Hi! Is it possible to share your example or at least a glimpse of it? Thank you

MKing
Associate III

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