cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F42x/STM32f43x SAI DMA FIFO errors

chris239955
Associate
Posted on January 16, 2014 at 07:24

Hello,

I have been working with an STM32F27 in an audio application. I am using the SAI module with both blocks. Block A is a master RX block, block B is a slave TX block synchronized to block A. The interface is standard phillips I2S with 32 bits per channel.

I am following the order suggested in the reference manual and enabling the DMA before the SAI. And, enabling the slave before the master.

The error I get is that as soon as I enable one of the SAI blocks, I get a fifo error (DMA_FLAG_FEIF4) from the DMA. This flag is set once and only once. If I simply clear this flag once and continue, it will not be seen again. I have the DMA in FIFO disabled mode. I tried playing around with the FIFO configuration for both the DMA and SAI block, but have not been able to get different results.

I have the easy work-around of just clearing that flag the first time it pops up. However, I am uncertain why this error is occuring.And, I lost half a day trying to figure out what was wrong before I just decided to try seeing if it was a persistent error.

Has anybody else encountered this kind of behavior, or are there any STM people out there who can comment on this?
2 REPLIES 2
Amel NASRI
ST Employee
Posted on January 27, 2014 at 10:31

Hello Chris,

Here there is no code given for review but I assume that you are enabling the peripheral request before the DMA stream. In such case, the FIEF flag will be set.

The workaround in such case is to simply inverse commands order.

Even if it is disabled, the FIFO is used to anticipate transfer of only the first unit of data from memory to peripheral.

If you are not in these same conditions, please share the minimum of complete code that we can check.

-Mayla-

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.