cancel
Showing results for 
Search instead for 
Did you mean: 

I2S or SPI for audio data acquisition?

ATeli.1
Associate III

I am using a STM32-NUCLEO-F401RE and expansion board x-NUCLEO-CCA02M1. I am not using the library provide by STM. I trying to understand which serial communication protocol is better for this type of application and why it is better.

Can someone help me?​

1 ACCEPTED SOLUTION

Accepted Solutions
Eleon BORLINI
ST Employee

Hi @ATeli.1​ ,

usually the I2S interface is more suited for continuous streaming audio applications, since it is designed for audio, but you can use also SPI with a high-enough clock frequency (for example 10MHz), or at least sensibly higher than the microphone one (typically 1MHz to 3MHz for a PDM microphone).

-Eleon

View solution in original post

3 REPLIES 3
Eleon BORLINI
ST Employee

Hi @ATeli.1​ ,

usually the I2S interface is more suited for continuous streaming audio applications, since it is designed for audio, but you can use also SPI with a high-enough clock frequency (for example 10MHz), or at least sensibly higher than the microphone one (typically 1MHz to 3MHz for a PDM microphone).

-Eleon

Thank you! I am not understanding why if I use I2S, in the settings I can only sample at given frequency. In my case I am using a 2 PDM microphones that work between 1MHz and 3MHz. This mean that for this type of microphones I can only use SPI and not I2S?

Hi @ATeli.1​ ,

no, those frequencies are compatible with the I2S interface (which I suggest you for audio stream).

-Eleon