English
Language : 

AN2682 Datasheet, PDF (1/15 Pages) STMicroelectronics – This application note describes how to interface
AN2682
Application note
Connecting I2S audio devices to
the STR7/STR9 MCU
Introduction
This application note describes how to interface the STR7xx SPI peripheral with an audio
device (Codec, ADC, DAC, filter...) using the I2S protocol via an external interface consisting
of a low cost small CPLD. The design is referenced to the I2S protocol specification, so any
I2S device is able to interface with the STR7xx and STR91x MCU through this bridge.
To avoid using extra hardware, an I2S solution could be implemented entirely by firmware
but this would put a huge load on the CPU. The SPI to I2S bridge solution proposed in this
application note is made with a very low cost hardware (about 1$) using a CPLD with less
than 32 macrocells and a minimum of firmware overhead. Only one Timer (one Output
Compare), 6 GPIOs and the DMA peripheral are used. The DMA available on STR75x and
STR91x allows the CPU to be totally free for other tasks, and on STR71x the CPU load is
3.9% at 32 MHz MCLK frequency. The footprint is less than 5 Kbytes in Thumb mode.
The example CPLD described in this application note was built for the STR71x and STR750
microcontrollers but can be easily tailored to the STR91x or STM32.
January 2008
Rev 1
1/15
www.st.com