cancel
Showing results for 
Search instead for 
Did you mean: 

DMA configuration for FSMC

kai2
Associate
Posted on May 31, 2014 at 12:45

Hey, I am presently transferring an image from a camera (connected through DCMI) to the internal SRAM via the DMA. This way I'm able to get the whole image. However, when I try to write into the external SRAM through the FSMC, I encounter a FIFO error or a direct mode transfer error depending on whether memory incrementation is set or not. Am I supposed to change any other configurations in the DMA? Also, my FSMC is configured according to an example code provided for the STM322xg eval.

#fsmc #dma #fifo #direct-mode
2 REPLIES 2
stm322399
Senior
Posted on May 31, 2014 at 13:47

DCMI data transfers require very low latency memory because of small DMA FIFO depth. There is no problem with internal SRAM, but external SRAM/SDRAM accessed through FMC/FSMC might not always meet this requirement.

On F4 MCU I got the best result enabling DMA FIFO and setting the lowest threshold for transfer.

I don't know STM322xg eval, check FSMC registers and your SRAM model, to see whether there is room for timing parameter optimization or not.

kai2
Associate
Posted on June 02, 2014 at 06:22

Hey, I reconfigured the FSMC initialization settings and changed the fifo threshold from full to the minimum (1/4th in this case). Now the image seems to be getting transferred. Thanks for your help.