AnsweredAssumed Answered

Configuring DMA for SAI

Question asked by Eetu Nevalainen on Jan 23, 2018
Latest reply on Jan 24, 2018 by Eetu Nevalainen

Hi,

 

I'm trying to transfer data to SAI's fifo via DMA (memory-to-peripheral). I'm following reference manual's instructions for setting up DMA for SAI.

 

SAI DMA config

As soon as I enable the DMA channel FEIF4 (FIFO overrun/underrun) flag becomes active. After enabling the SAI2 interface and waiting few clock cycles TEIF4 (Transfer error) flag becomes active and disables the DMA channel. I've attached SAI2 A and DMA2 stream 4 register values below. I have no experience with DMA or SAI so maybe there's something wrong with the registers. If the registers seem OK could this be clock issue? Any help would be greatly appreciated. Please ask more info if you need to.

 

MCU: STM32F446ZE

 

SAI2 A REGISTERS

 

SAI2 A REGISTERS

 

DMA2 STREAM 4 REGISTERS

 

DMA2 STREAM 4 REGISTERS

Outcomes