2019-07-29 01:37 PM
I am attempting to implement a system which uses a 5MP camera to take photos using DCMI and save them to an SD card via SDIO. When reading through the documentation there where a few things I was unclear of. I know between the SDIO interface and the DCMI interface I will need to implement a DMA buffer for the image data, however as the images I am taking are very large, they greatly exceed the MCUs on board memory. I was wondering if the buffer needs to be capable of storing the full image or if a smaller buffer of 64-128 kB would work. If the buffer does need to hold the entire image would I be able to expand the available memory using QSPI flash and use that for the buffer. If there is another way to do this that works better I am open to suggestions.
Thanks!
2019-07-29 02:08 PM
I think the main problem is the DCMI is a fire-hose, and outpaces both QSPI and SDIO write sinking abilities.
The DMA is limited in size, basically 65535 transfer units, but there are double buffering methods, where you'd advance the memory pointer of the inactive half. You'd likely need SDRAM to buffer an incoming image.