文档介绍:.... .... ,, ,
AN2739
Application note
How to use the high-density STM32F103xx microcontroller
to play audio files with an external I²S audio codec
Introduction
This application note describes how to use the high-density STM32F103xx I2S feature to
play audio files using an external codec.
The I2S protocol is widely used to transfer audio data from a microcontroller/DSP to an
audio codec in order to play melodies (stored in a memory) or, to capture analog sound
(from a microphone).
The high-density STM32F103xx allows I2S munications using the SPI peripheral,
and implements specific functionalities for munications mode.
The first, preliminary section of this application note may be skipped by advanced users.
Note: Throughout this document, and unless otherwise specified, the term of I2S will be used to
refer to the I2S feature of the SPI peripheral that is implemented in high-density
STM32F103xx microcontrollers.
May 2008 Rev 1 1/26
1
.... .... ,, ,
Contents AN2739
Contents
1I2S general description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
I2S protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
STM32F103xx I2S feature presentation . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2 Implementation example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
General overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Hardware description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Audio codec . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
STM32F103xx and board configuration . . . . . . . . . . . . . . . . . . . . . . . . . 10
Firmware description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .