2014-11-10 05:30 AM
Hello. I am using the new HAL library for writing a program for STM32F4Discovery (for university presentation). The program activates a USB FS CDC device once running to speak with a PC. I've attached an SD card slot to the discovery, and I also need the discovery board to act as USB FS Mass Storage device after the user clicks the User Button (without losing the CDC functionality). Then become back to the only-CDC mode once the user safe-ejects the mass storage device. As far as I know this is called a composite device (one physical connection, several devices). Is this possible with STM32F4 with HAL library and USB OTG library? If yes, is there an example code for this? Please help me if you can, thank you.
Edit 1 I have found a composite device example in ''STM32_USB-FS-Device_Lib_V4.0.0'' library which is used by STM32F102xx, STM32F103xx, STM32L1 and STM32F3. But there is no composite device example in ''STM32_USB-Host-Device_Lib_v2.1.0'' which is used in my mcu's (STM32F407) case, though its documentation (UM1021) says that it supports it: ''supports multi-interface applications (composite devices)''. #cdc #composite #msc #usb2020-01-16 12:16 AM
Could you provide a link to your example?
2022-07-14 01:13 PM
Has anyone come up with a composite CDC+MSC example? Preferably for STM32F4?
2022-07-14 01:34 PM
2022-07-14 01:49 PM
Thank you. TinyUSB is an option, but i'd like to find a direct low level composite driver. Or build my own
2022-07-14 03:19 PM
This may be what I'm looking for. Not sure if Sasha completed it yet but it looks close