2021-05-04 02:20 PM
My end goal is to have an USB-to-I2S device running on STM32F411, built using the HAL and customizable.
I'm trying to port the USB Audio 1.0 Playback example from https://www.st.com/en/embedded-software/x-cube-usb-audio.html to an STM32F411 target. X-CUBE-USB-AUDIO cannot be imported directly as an example or extension, so I manually built a project using the same files and HAL/drivers.
The biggest problem is that the example uses the SAI interface of the F446 processor, and the F411 only implements I2S. So clearly a direct port is not an option.
STM32IDE can build a project for the F411 using the USB Audio and I2S, but the USB Audio driver doesn't implement the feedback mechanism to allow the USB host to adapt the rate based on the actual I2S device rate.
Is there an existing project that implements the rate feedback? If not, my initial thinking is to use the X-CUBE-USB-AUDIO example and enhance the USB Audio class. But when doing this in the past, every time I re-generate the project IOC file, my audio class gets overwritten. Middleware doesn't get the same protection as other project files
Has someone implemented something similar and/or has suggestions on how to best approach his?
Thanks in advance
2021-05-19 07:03 AM
Hello @fbar ,
Take a look at the following example provided in the firmware package : Firmware\Projects\STM32F4-Discovery\Applications\Audio\Audio_playback_and_record
This might help you.
BeST Regards,
Walid