AN2739 Implementation example
21/26
Figure 8. Demo’s functional flowchart 2
Error messages
If an error occurs during the initialization phase, the LCD_DisplayError function is called
(instantiate in main.c file). A message may be displayed on the LCD to determine the error
source:
● Memory error: the “ERROR: Memory ->RST" message is displayed, meaning that the
memory initialization failed and a system reset is needed to recover.
● Audio file error: the “ERROR: File ->RST" message is displayed, meaning that the
audio file initialization failed or the audio file format is not supported. A system reset is
needed to recover.
● I
2
C communication error: the "ERROR:I2C com. ->RST" message is displayed,
meaning that communication with the codec through the I
2
C interface failed. A system
reset is needed to recover.
Audio file loading
In order to use the application note firmware, an audio file with the allowed specifications
(refer to Section 2.4), has to be loaded into the used memory medium (the default memory
medium is the NOR Flash memory interfaced through the FSMC peripheral).
For this purpose, one of the three following procedures may be performed:
● Use the audio file from the demo delivered with the STM3210E-EVAL
STMicroelectronics evaluation board. The audio file is included in the DFU image of the
demonstration firmware and the file address to be used is the default address
(AUDIO_FILE_ADDRESS = 0x6406 0000 constant in main.h file, corresponding to
the NOR memory).