cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F7 discovery MEMS microphones, loud noise playback

FGuns.1
Associate II

Hello everyone,

I've been struggling a lot recently trying to make this code work.

This project uses a STM32F746G DISCOVERY microcontroller.

I tried to make a simple project, heavily inspired by the BSP driver example, with the objective of recording through the boards integrated microphones, and playing it back after.

This code's function were taken from the STM32F746G DISCOVERY BSP examples, particularly the "audio_play.c" and "audio_rec.c" files.

The code is supposed to work as follows : Press the user button that generates an interruption to start recording. Using the integrated MEMS microphones (x2 MP34DT01-M), we record the sound produced and store it in the SDRAM, to play it back once the audio blocks are filled. The audio is played back in a loop.

Once the user button is pressed again, we come back into the default state, where we wait another button press to start recording again.

The code can be compiled and flashed without any issues, but after recording, the playback is just loud random noise, instead of the sound produced into the microphone (human voice).

As for the configuration :

System Core :

- GPIO : PI11 (user button) interruption enabled

Connectivity :

- USART1 to input messages to a serial monitor (putty)

- FMC (for the SDRAM 1)

FGuns1_0-1732699494511.png

 

 FGuns1_1-1732699516941.png

Multimedia (the one worth checking out) :

SAI A (for audio recording)

SAI B (audio playback)

FGuns1_2-1732699577163.png

 

FGuns1_3-1732699619049.png

 

FGuns1_4-1732699654108.png
 

 DMA :

FGuns1_6-1732699702854.png

 

If you need any more information, here's a link to the project if you want to check it out with more detail : https://github.com/Tresnov2142/Mic_recorder_V3

I'd really appreciate any help on this matter.

Thank you in advance

2 REPLIES 2
jiangfan
ST Employee

questions:

hardware, do you use STM32F746G DISCOVERY board ?

firmware, did you try with original project from ST ? like: STM32CubeF7/Projects/STM32746G-Discovery/Applications/Audio/Audio_playback_and_record at master · STMicroelectronics/STM32CubeF7 · GitHub

Thank you for replying,

I did run some of the original ST examples, and they work perfectly fine. The microphone works, so it's not a hardware issue.

It's probably memory management, or some misconfiguration, in my project.