cancel
Showing results for 
Search instead for 
Did you mean: 

How to set SAI to receive audio data on the microphone on STM32F746G-disco

uveuvenouve
Associate III

Hi everybody,

I am trying to use the audio on stm32f746g-disco.
I can hardly find a tutorial for this.
Many solutions got their way to solve it and left not much details.

lots of the solutions guide to the examples in CubeMX , but they seems a little bit old and I can't figure out what is the examples are doing

 

For now I tried to init SAI2B to receive data 

but it not like getting any valid data or triggering half and complete callback
i've attached my main.c ,and the setting of SAI B and its dma
take a look if you have time

thank you

3 REPLIES 3
SofLit
ST Employee

Hello,

You can use the BSP audio driver of the embedded microphones from here

Related files: stm32746g_discovery_audio.c and stm32746g_discovery_audio.h

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.

Hi SofLit,

I can see it. I just realize it is set to use the microphones for the audio loop back example.

but when I plug in my earphone , it just have constant electric sound. 

What do you think the problem is ?

 

Not sure what the problem is. 
Start using the audio player example under this path:

Projects/STM32746G-Discovery/Applications/Audio/Audio_playback_and_record

If it does’t work, indeed there is an issue, if not inspire from the example.

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.