Skip to main content
Explorer II
November 28, 2022
Question

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

  • November 28, 2022
  • 2 replies
  • 4209 views

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?

    This topic has been closed for replies.

    2 replies

    Graduate
    November 28, 2022

    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.

    Explorer II
    May 23, 2023

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

    Graduate II
    January 19, 2024

    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