Configuration Parameters List; Table 4; I2S_Codec_Replayconfig Function - 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

Table 4

application (some are automatically set by the I2S_CODEC_Init function, others are
constants defined in the driver files).
Table 4.

Configuration parameters list

Parameters
OutputDevice
Address
I2S_STANDARD
I2S_MCLKOUTPUT
DEFAULT_VOL
I2S_AudioFreq
AudioDataLength
DataStartAddr

I2S_CODEC_ReplayConfig function

This function sets the number of times the audio file stream will be repeated (replayed)
each time its end is reached.
Table 5.
I2S_CODEC_ReplayConfig function
Function name
Prototype
Behavior description
Input parameter
Output parameter
Required preconditions
Called functions
lists all the parameters that have to be set in order to correctly configure the
Values
– OutputDevice_SPEAKER
– OutputDevice_HEADPHONE
Any value in respect to the
memory size.
– I2S_Standard_Phillips
– I2S_Standard_MSB
– I2S_Standard_LSB
– I2S_MCLKOUTPUT_Enable
– I2S_MCLKOUTPUT_Disable
– Any value from 0xFF(Mute)
and 0x00 (Max volume).
– 8000, 16000, 22050, 44100
or 48000.
– Total Length of the current
audio file stream.
– First audio data offset into
the current audio file
(corresponds to the header
length).
void I2S_CODEC_ReplayConfig(u32 Repetions)
Sets the number of current audio stream repetitions to Repetitions value (input).
Repetitions: any number ≥ 1 or 0 for infinite replay.
None
None
None
Location
I2S_CODEC_Init
function Input
I2S_CODEC_Init
function Input
Constant in i2s_codec.h
file:
Constant in i2s_codec.h
file
Constant in i2s_codec.h
file.
Automatically detected: Set
by AudioFile_Init
function
Automatically detected: Set
by AudioFile_Init
function.
Automatically detected: Set
by AudioFile_Init
function.
I2S_CODEC_ReplayConfig
Implementation example
Default value
OutputDevice_HEADPHONE
AudioFileAddress =
0x6406 0000 (variable in
i2s_codec.c file)
I2S_Standard_Phillips
I2S_MCLKOUTPUT_Enable
0x48
--
--
--
13/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

Subscribe to Our Youtube Channel

Table of Contents