2025-12-02 7:52 AM - last edited on 2025-12-02 8:01 AM by Saket_Om
I’m trying to build a UAC2.0 (USB Audio Class 2.0) device on STM32H7, supporting:
After reviewing many threads here, I still haven’t found a complete or working reference.
Here are some related ST Community posts with no clear resolution:
Across all of these, the same question remains unanswered:
Is there a working UAC2.0 reference for STM32H7?
Not to be confused with X-CUBE-AUDIO (last updated 2019). Reference: X-CUBE-AUDIO-KIT
The audio kit focuses heavily on LiveTune and doesn’t explain the folder structure or how to adapt it for UAC2.0 device work. Most forum replies simply say "look at X-CUBE-AUDIO," but there is no clear documentation on how to integrate it into an actual USB audio project.
I looked into:
Both use UAC2.0, but neither is fully functional. There are several issues (audio distortion, buffering, pointer handling, feedback endpoint logic, etc.) that prevent reliable playback, let alone adding recording.
I also evaluated STM32WBA-BLE-USBx Standalone, but porting it to H7 requires major rewrites and may not be compatible with the existing H7 USB stack.
I considered starting from the H7 USBD Audio Standalone UAC1.0 example and updating it manually to UAC2.0, bypassing USBX entirely, but I’m unsure whether this is practical or recommended.
I’m currently unable to move forward with actual development because I’m spending all my time debugging:
ring-buffer logic bugs
incorrect pointer handling
missing wrap-around
feedback endpoint issues
unexplained artifacts (e.g., a loud screech at 4–5 seconds)
Before I continue down another rabbit hole, I need a clear answer:
What is the correct, supported path to get UAC2.0 working on STM32H7?
Any guidance from ST experts would be greatly appreciated. @FBL @JonathanC
2025-12-04 8:03 AM
Hello,
I can answer for the X-CUBE-AUDIO-KIT part of your question, for the rest I let FBL comment.
As said in other post, ST doesn't support TinyUSB as native stack. However, I can explain the folder tree organization how it is used inside X-CUBE-AUDIO-KIT.
Hope it helps,
Br
Jonathan
2025-12-08 10:14 AM
Thank you @JonathanC
Awaiting response from @FBL
2025-12-10 3:41 AM
Hello @audio
Can you explain which threads don’t answer the core Question?
For STM32H7, recording application development is ongoing and is expected in future release.
So, there will be soon new release supporting feedback endpoint. We cannot provide any details on release dates.
About the actual N6 project, now the CubeN6v1.3 supports playback + feedback.
I hope it's clear !
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2025-12-12 6:48 AM
Hello @FBL
This one is still unresolved: https://community.st.com/t5/stm32-mcus-embedded-software/audio-in-ux-device-audio2-0-playback-project-on-stm32h753i-eval2/m-p/861015#M70643
As for the projects, the folder structure is very confusing and could be organized better. For example, middleware and USBX is not organized nicely, and gets very confusing trying to find paths in the IDE project:
./Middlewares/ST/usbx
./STM32CubeIDE/Application/User/USBX
./STM32CubeIDE/Middlewares/USBX
./USBX
For this reason, I still haven't finished fixing the issues every time I build, porting H753 into the N6 project, it is a waste of time, and I still have to go through it. Your project has issues, as I mentioned in the other thread.
2025-12-15 2:09 AM
Hi @audio
This issue was not reproduced on my end. Unfortunately, I don’t have sufficient bandwidth nor the required tools to analyze, investigate, and debug the screeching issues you mentioned.
Regarding the attached projects, please note they are not official releases. I try to provide solutions and support to help on the ST Community, but official releases might take some time to be available.
As for the project folder structure, you are free to tailor it as you see fit. However, the provided structure follows the standard organization similar to what CubeMX generates by default.
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2025-12-15 6:33 AM
Hello @FBL
Are there any resources available on how to add middleware files so that I can create my own project to use H753 and still be able to port the N6 files over?
That's more important than anything at the moment. I still want to see the project CubeN6v1.3 on my H753.
I just don't know how to deal with all the includes header as it is not easily accessible without using the includes path.
Thanks
2025-12-15 7:28 AM
Hi @audio
Did you try generate code using latest CubeMX version?
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2025-12-15 10:14 AM
I did - the N6v1.3.0 Standalone version does not have the MX compatible version, so I just generate into STM32CubeIDE. From that point, I am looking into linker script to see what needs to be ported from N6 to H7. I change the startup file so that it uses H753.
But the driver is different and I will also need to port that over to H753 as well. This includes Drivers/BSP, Drivers/CMSIS and Drivers/STM32N6xx_HAL_Driver, as well as some Core files that needs to be ported to H7.
Once I change them, I get compilation error saying that the files do not exist, due to include path.
So that's where I need guidance on, how do I do this without breaking the file structure?
2025-12-16 8:00 AM
Hi @audio
Maybe you need to clone git with recursive option.
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.