2023-06-06 02:15 AM
Does the latest version of the driver of STM32F4 supporting USB audio class and CDC composite device functionality?
I want to use the USB interface of STM32F4 to develop the functions of USB audio and CDC composite devices.I have a question, is the latest version of the driver supporting USB audio and CDC composite device functionality? If supported,please let us know how to implement it.Thank you。
Solved! Go to Solution.
2023-06-09 02:53 AM - edited 2023-11-20 03:50 AM
Hello @jding.1
First let me thank you for posting.
To create a USB composite device with CDC and UAC functionality, you can follow these general steps:
1- Select your target microcontroller model (e.g., STM32F479ZITx)
2- Enable the USB_OTG_FS and USB_OTG_HS by navigating to the "Connectivity" tab .
3- In the "Class For FS IP" section, select "Communication Device Class (Virtual Port)" to enable CDC functionality.
In the "Class For HS IP" section, select "Audio Class" to enable UAC functionality.
4- Configure the other settings, such as endpoints, buffer sizes, and callbacks, as needed for your application.
5- Configure the clock settings and other peripheral configurations as per your project requirements.
6- Generate the initialization code using STM32CubeMX and export the project for your chosen toolchain (e.g., STM32CubeIDE).
Thx
Ghofrane
2023-06-09 02:53 AM - edited 2023-11-20 03:50 AM
Hello @jding.1
First let me thank you for posting.
To create a USB composite device with CDC and UAC functionality, you can follow these general steps:
1- Select your target microcontroller model (e.g., STM32F479ZITx)
2- Enable the USB_OTG_FS and USB_OTG_HS by navigating to the "Connectivity" tab .
3- In the "Class For FS IP" section, select "Communication Device Class (Virtual Port)" to enable CDC functionality.
In the "Class For HS IP" section, select "Audio Class" to enable UAC functionality.
4- Configure the other settings, such as endpoints, buffer sizes, and callbacks, as needed for your application.
5- Configure the clock settings and other peripheral configurations as per your project requirements.
6- Generate the initialization code using STM32CubeMX and export the project for your chosen toolchain (e.g., STM32CubeIDE).
Thx
Ghofrane
2023-06-11 06:34 PM
I would like to use the STM32F4 USB FS device as a composite device(UAC+ CDC), without using a USB HS device.please let us know how to implement it.Thank you。
2023-09-23 05:16 PM
I have to say that looks like a real hack, back in 2015 it was possible to set the F407 up with Audio, Virtual com port devices, and host for keyboard and mouse, as you can see in the diagram.
It looks like STM is losing the ability to support their MCUs.
2023-09-23 05:19 PM
What you're asking for was available for the F407 in 2015, I have the code for doing this as you can see in this image.
STM seem to have dropped the ball on USB, it really seems like they are in a mess. They've told me that they are focusing on USB for AzRTOS, and hope to have it working by Xmas, but like you, I'd prefer to have it working as it did back in 2015 but for the H7 in my case.
2024-01-17 10:11 PM - edited 2024-01-17 10:14 PM
Hi,
i totally agree. When there is a possibility to handle different devices or endpoints it should be selectable in CubeMX. At the moment I am searching for a combination of CDC (virtual com port) and UVC (webcam device). Can you upload the USB part of your project? Thx!
I use STM32F407VGT
2024-01-18 09:48 PM
Can you please give a link to this project? I found at least 5 composite device implementations for stm32, and none of them worked. Your example would be very helpful :)
2024-01-18 10:24 PM
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!
I use:
CubeMX 6.10.0
CubeIDE 1.14.0
Processor: STM32F407VGT
2024-01-19 12:26 AM
Isn't the I-Cube composite plug-in fantastic! I also passed it to STM's Paris support manager, Cedric, saying this was an example of what was needed, but the response was null, not interested.
IMHO I think ST staff have been coasting for years, taking it easy, their MCU products are not developed in-house, they buy in design parts, like the USB controller, and don't really have anyone expert in how to program it.
2024-02-02 09:59 AM
Moreover, this package cannot be installed in the latest version of CubeIDE/cCubeMX... It looks like I will have to separately install older versions of the software and then import the project into the latest version. "Everything for users!" (sarcasm).