Skip to main content
Associate III
March 21, 2024
Solved

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

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

This topic has been closed for replies.
mƎALLEm
mƎALLEmBest answer
ST Technical Moderator
March 22, 2024

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 "Best answer" on the reply which solved your issue or answered your question.

3 replies

mƎALLEm
ST Technical Moderator
March 21, 2024

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 "Best answer" on the reply which solved your issue or answered your question.
Associate III
March 22, 2024

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 ?

 

mƎALLEm
mƎALLEmBest answer
ST Technical Moderator
March 22, 2024

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 "Best answer" on the reply which solved your issue or answered your question.