3

I'm developing a USB audio device using an STM32F407G-DISC1 evaluation board.

For the audio output I was intending to just use the I2S peripheral connected to a DAC. However the only sample code I can find uses an SAI module:

Data flow in example USB audio application on STM32446E-EVAL board

What is this SAI module and how is it different from the I2S module on the STM32F407?

Also, do I need an MCU with an SAI module for my USB audio output to work correctly or can I make do with I2S?

donturner
  • 243
  • 2
  • 11
  • There is nice example for STM32F401-Discovery, which use I2S for sound recording and playing. It shouldn't be hard to port it to your MCU if you cant find example for your particular MCU. – Rokta Jul 17 '19 at 12:45
  • Yes, I've ported that one. It works pretty well, but doesn't include all the USB device stuff (it acts as a USB host to read an attached thumb drive). It's a great starting point though - thanks for pointing it out. – donturner Jul 18 '19 at 15:41
  • I think SAI is a more general form, which have some extra feature and maybe can be reduced to I2S. It have lots of frame confuguration option. – mohammadsdtmnd Mar 28 '22 at 06:34

1 Answers1

6

SAI is a Serial Audio Interface module. On the STM32F407, it contains two audio interfaces that can be used to send and/or receive audio. In addition to I2S, it supports other audio interfaces as well, such as AC97. If you don't need these features, and will only use I2S, then just use the I2S peripheral.

Justme
  • 127,425
  • 3
  • 97
  • 261