cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F429 SAI HAL_SAI_ErrorCallback errors OVRUDR

d239955
Associate II
Posted on April 10, 2015 at 13:54

Hi,

i'm using SAI output on STM32F429BIT6. I used some of the code from STM32CubeF4-Example stm324x9i_eval_audio.c for initialization. In pricipal all works fine, but sometimes i get an Error from the SAI interface and stop in the HAL_SAI_ErrorCallback() routine.

Here is the content of the configuration and status-registers:

SAI_ACR1: 0xc33280, SAI_ACR2: 0x1

SAI_ASR: 0x20001

SAI_ASR says it's an over or underrun error.

Why does this happen? First i started playing audio with two small buffers in external RAM and sequentially fill them from an wav-file from SD-Card. Then i tried this with internal RAM, and also with an full RAM buffering, so there is no problem with SD-Card performance. Playing audio works for some files e.g. playing 5 files and then it stops. Sometimes it seems to look better when i set the DMA priority from DMA_PRIORITY_HIGH to DMA_PRIORITY_VERY_HIGH - but ths helps not at all.

For Information: Audio stream is 8kHz, 16bit, Mono - so not much performance is needed.

I also tried to record audio with SAI_Block_B into RAM and then play it by Block A from RAM. Recording works but when i start playing it sometimes calls the error handler.

Dirk.

#stm32f429-sai-dma-error-ovrudr
0 REPLIES 0