Firmware Description; I2S_Codec Driver Firmware Description; Table 1; Driver Library Description - ST STM32F103 Series Application Note

How to use the high-density microcontroller to play audio files with an external i2s audio codec
Hide thumbs Also See for STM32F103 Series:
Table of Contents

Advertisement

AN2739
For more details, refer to the STM3210E-EVAL evaluation board user manual on
www.st.com.
2.3

Firmware description

This application note is based on:
the STM32F10xxx firmware library
the I2S_CODEC driver firmware (offering the main functions required to control the
codec and I
a specific firmware to call the I2S_CODEC driver functions, as well as other functions
required for control and display (main.c and stm32f10x_it.c files).
The user may build any similar application using the same library and driver, and different
interfacing firmware/hardware.
2.3.1

I2S_CODEC driver firmware description

The user may interface the audio codec directly through the driver application layer. The
driver functions are summarized in the following sections.
driver file organization.

Table 1.

i2s_codec.h,
i2s_codec.c
High-level functions
These are the functions that can simply be called by the final application to execute all
needed configurations and perform high-end functionalities (like playing a wave sound,
pausing playing, configuring all the hardware components, etc.).
These functions are presented in
.
Table 2.
Function name
I2S_CODEC_Init
I2S_CODEC_ReplayConfig
I2S_CODEC_Play
I2S_CODEC_Pause
I2S_CODEC_Stop
I2S_CODEC_ControlVolume Increases/Decreases/Sets the digital volume
I2S_CODEC_Mute
2
S environment for an audio application)

Driver library description

File
2
– I
S and codec definitions, type definitions and function prototypes
– Basic functions (init, read, write, play, pause, stop, etc.).

I2S_CODEC driver high-level functions

Initializes the entire application environment (I
memory)
Sets the number of replays (number of stream playing loops ≥ 1 or
0 for infinite loop)
Causes the audio file to start playing (or to resume from Paused
state)
Pauses the audio stream playing and saves the current position
Causes the audio file to stop playing and resets all local pointers
Causes the codec to mute the released sound.
Description
Table 2
Implementation example
Table 1
presents the general
Description
2
2
S, I
C, codec,
11/26

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the STM32F103 Series and is the answer not in the manual?

Questions and answers

Table of Contents