2017-09-08 05:46 AM
Hello,
I want to implement an audio record based on STM32L4. To do that I want to use the SAI peripheral. By Referring to the STM32L4 datasheet the SAI don't support a microphone interface. So, in such case shall I use an external microphone to be able to record audio data using the SAI? .
thanks for the help.
2017-09-12 12:01 PM
SAI is a digital interface which can be switched to multiple protocols. If you want to connect an analog microphone, you need an external ADC or CODEC chip (usually supporting I2S protocol). Alternatively, you can connect an analog microphone (amplified appropriately) to some of the ADC inputs of L4.
Other option is to use a digital microphone and connect it using the DFSDM module.
Look at the
board for inspiration - the two onboard microphones are digital connected to DFSDM; and there is an input from the TRRS 3.5mm jack to the CODEC's MIC input(s) to connect a headset's microphone.JW
2017-09-23 09:03 AM
Hello,
thanks for your response,
In the reality, I'm trying to connect Adafruit microphone using SAI of the STM32L4. This microphone uses I2S protocol, and delivers as output PCM 24 bits data,(The microphone includes Segma delta filter and a decimator which are used to convert PDM data to PCM data), over sampling rate fixed at 64 and Clock frequencies from 2.048Mhz to 4.096MHz are supported.
Until this step, I can receive audio data from the SAI, but I didn't know how to validate if they are well received or not. As solution, I'm trying to read the audio buffer using an other SAI + the WM8960 audio codec available in the STM32L4 board. But, I'm not hearing the real sounds that I have recorded.
In that case, I want to ask if it's right to use the WM8960 codec to read this kind of audio data?
The data size and the sampling rate used by the microphone can impact on the codec choice.