Showing results for 
Search instead for 
Did you mean: 

Increasing Resolution of OV5640 Camera

Drew M
Associate II


I am using the STM32H747I-DISCO board and B-CAMS-OMV daughterboard with integrated OV5640 image sensor to test out using a camera on an MCU. I have been using this example as the base code I am working with but have modified it to communicate image data externally instead of just showing up on the integrated LCD:

I have been successfully capturing images at the example 320x240, 480x272, and 640x480 resolutions. However, when trying to use the example 800x480 resolution, I am not able to capture an image. With the other resolutions I can see I am getting callbacks to BSP_CAMERA_LineEventCallback() and BSP_CAMERA_FrameEventCallback() as data is transferred via DCMI to SDRAM. With the 800x480 resolutions I get no such callbacks, giving the impression that the capture silently hangs.

I've tried to look for any errors that may be generated during configuration of the camera, DCMI, etc., but haven't found anything. I've also tried to see if DMA generates any errors during transfer, but it doesn't look like the driver is flagging any errors. Any thoughts on why an increased resolution may cause image capture to stop working?


ST Employee

Hello @Drew M ,

When you increase the resolution to 800x480 the DMA configuration should be adapted to support this resolution.

In your case, it is a medium resolution, for that  it must be configured the DMA with Double-buffer mode.

I recommend you to refer to AN5020 and precisely 6.4 DMA configuration Section.

When your question is answered, please close this topic by choosing "Accept as Solution". This will help other users find that answer faster.


To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Hi Kaouthar, thanks for your reply.

I believe I am already using DMA double buffer mode, as utilized by HAL_DCMI_Start_DMA() in stm32h7xx_hal_dcmi.c :

I ended up connecting a logic analyzer to the pins on my camera module and found that at lower resolutions the camera is outputting PCLK, HSYNC, and VSYNC signals as expected. However, when I increase the resolution to 800x480 or other higher resolutions, the camera stops outputting the VSYNC signal. I believe this is why the camera appears to hang on the capture, because it is not actually outputting a full frame.My guess is that there is some issue in the register configuration of the OV5640. However, my team has decided that we are no longer interested in pursuing an embedded camera in our device, so I don't have the ability to look into this further.