cancel
Showing results for 
Search instead for 
Did you mean: 

DMA transfer from DCMI to Flash or SD card?

raghu tumati
Associate II
Posted on January 24, 2018 at 19:50

Hi 

My micro (

STM32F765VI) has 512KB of SRAM. I have an OV7725 image sensor connected to it. 

I

am right now performing a DMA transfer of RGB565 in 320x240 format from the image sensor to SRAM. This takes up 320x240x2 = 153.6kB of data.

However if I wanted to take a 640x480 RGB565 image, it would take up 614.4kB of space which is more than what I have for my SRAM

Is there a way I could perform a

1. DMA transfer from DCMI to the 2MB flash? 

2. DMA transfer from DCMI to external SD card? 

If the DMA controller cannot do any of the above, do you suggest any other option to hold a image of this size? Or is getting a MCU with a bigger SRAM the only other option? 

3 REPLIES 3
Posted on January 24, 2018 at 20:03

No and No

If you believe you have sufficient bandwidth to accomplish a write while the DCMI data is streaming in, you could presumably write large aligned blocks to a MicroSD card from RAM. Figure blobs of 32, 64 or 128KB, via a DMA buffer with HT and TC interrupts to manage inactive halves of the buffer.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on February 02, 2018 at 03:15

Thanks for the reply Clive. 

I do not think I have the sufficient bandwidth. The DCMI transfer takes place very fast. Around a millisecond. And the SD card write from SRAM takes much longer than that. 

So I would guess the only other alternative is to get a micro with a larger SRAM? 

Posted on February 02, 2018 at 03:51

SDRAM would probably quite efficient in this role.

SD Cards are highly variable with writing, but commands have significant overhead, so large writes aligned to the internal blocks is the way to go. 4-5 MBps writing should be achievable.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..