cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F429 OV5640 Double buffer DMA issue

ADani
Associate III

Hi, I'm using a STM32F429ZIT6 controller to interface an OV5640 camera module. I'm interfacing the sensor over 8 channel DCMI. I'm trying to capture RGB565 at high resolution. I'm using DMA with the double buffer on the fly address update feature. I capture the image directly into the SDRAM.

When I try 320x240, 640x480, 800x640 and 1280x720 the DMA is working properly and I am getting the desired image. When I increase the resolution to 1280x1024 the DMA stops exactly midway of the total bytes to be transferred. I checked multiple times and it stops exactly at the same point. I'm getting only half the image at this situation. I thought it was because of a faulty SDRAM but know the SDRAM is working perfectly. I'm using an 8MBytes SDRAM.

I could see that the direct mode error flag is set. How do I prevent or handle this error?

1 REPLY 1
ADani
Associate III

In case someone stumbles on the same issue, the DCMI double buffering DMA transfer code which is generated by STMCUBEMX is not working for capturing images more than 1280x720. You have to create your own transfer code. The DCMI application note has given an example for the SxGA image. Implementing that solved my issue.

Hope this helps 👍