2026-04-11 6:39 AM
I’m starting to work with the STM32F411E‑Discovery board and I’d like to use it for real‑time audio filtering. I’m using the onboard MEMS microphone together with the mini‑jack audio output.
I’m currently struggling with configuring the clock settings correctly — I’m observing a variable timing drift between the microphone input and the audio output.
Could you advise on the proper clock configuration for this setup, or point me to an existing project or example that demonstrates real‑time audio processing on the STM32F411E‑Discovery?
2026-04-11 12:14 PM - edited 2026-04-13 1:59 AM
Hello @Michael9 and welcome to the ST community,
Why don't use the BSP driver of the board especially the audio driver avalable in CubeF4 package / BSP: https://github.com/STMicroelectronics/32f411ediscovery-bsp/blob/c7de631adeb20ecd2097581ab22e88d316a8bdb3/stm32f411e_discovery_audio.c ?
Look at the demo example provided in the STM32CubeF4 package: Projects\STM32F411E-Discovery\Applications\Audio\Audio_playback_and_record especially the audio recording management implementation in waverecorder.c file.
2026-04-13 1:40 AM
Hello @Michael9 ,
There are 2 sub-demos in the BSP example for the STM32F411E-Discovery board:
You can find these examples by downloading the STM32Cube MCU Package for STM32F4 series from ST.com using this link: STM32CubeF4 package ,
After downloading, go to the following path: Firmware\Projects\STM32F411E-Discovery\Examples\BSP
There you will find the exact projects that can help you test the audio functionality on this specific board, STM32F411E-Discovery.
Br
2026-04-14 12:11 PM
Hello,
Thank you for the very fast response. I tried using the example you mentioned, but I noticed a problem.
I want to run sound recording and playback simultaneously in a continuous loop.
I used the BSP example, but it seems that the recording and playback use different timing settings. As a result, I am getting a variable drift between the recorded and the played sound.
2026-04-14 12:54 PM
Check you have the same clock configuration of the example: the same clock dividers, the same clock source etc ...