Skip to main content
ATeli.1
Associate III
December 6, 2022
Solved

I2S or SPI for audio data acquisition?

  • December 6, 2022
  • 1 reply
  • 4898 views

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?​

This topic has been closed for replies.
Best answer by Eleon BORLINI

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

1 reply

Eleon BORLINI
Eleon BORLINIBest answer
ST Employee
December 12, 2022

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

ATeli.1
ATeli.1Author
Associate III
December 12, 2022

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?

Eleon BORLINI
ST Employee
December 21, 2022

Hi @ATeli.1​ ,

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

-Eleon