Skip to main content
Associate II
Sep 29, 2026 11:59 PM UTC
Solved

DCMI With DMA ON STM32H743

Hi 

 

I am using a custom board to run a stm32h743 with a ov5640 camera. There is external ram fitted, the camera sets up correctly using i2c, and i can run the capture

HAL_DCMI_Start_DMA(&hdcmi,DCMI_MODE_SNAPSHOT,(uint32_t)pFrameBuffer, (512 * 1024) / 4);

 

However what i am getting in the buffer is just repeated garbage.

 

 

is there any help you can give or at least something to look at.

 

 

drJonesyBest answer
Associate II
Oct 27, 2026 5:56 PM UTC

Hi yes it was a hardware issue needed to redesign the camera. please close this issue.

6 replies

KDJEM.1
ST Technical Moderator
Sep 30, 2026 9:03 AM UTC

Hello ​@drJonesy ;

 

Could you please give more details like image size?

In snapshot mode, the DMA must ensure the transfer of one frame (image) from the DCMI to the desired memory:

  • If the image size in words does not exceed 65535, the stream can be configured in normal mode.
  •  If the image size in words is between 65535 and 131070, the stream can be configured in double buffer mode.
  • If the image size in words exceeds 131070, the stream cannot be configured in double-buffer mode.
     

For that I recommend you to look at AN5020 Section 6.4.6, Section 6.4.8 and Section 6.4.9 to check the DMA configuration.

Also you can refer to  8.3 DCMI examples based on STM32CubeMX section in AN5020 and get inspired. This section details the following typical examples of DCMI.

I hope this help you!

 

Thank you.

Kaouthar

To give better visibility on the answered topics, please click on "Best answer" on the reply which solved your issue or answered your question.
drJonesyAuthor
Associate II
Sep 30, 2026 10:57 AM UTC

The ov5640 is configured in jpeg mode at the moment.

KDJEM.1
ST Technical Moderator
Sep 30, 2026 1:14 PM UTC

Hello ​@drJonesy ,

 

Are you using a embedded synchronization mode or a  the hardware synchronization?

Because, for compressed data (JPEG), the DCMI supports only the hardware synchronization.

 

Thank you.

Kaouthar

To give better visibility on the answered topics, please click on "Best answer" on the reply which solved your issue or answered your question.
KDJEM.1
ST Technical Moderator
Oct 27, 2026 9:04 AM UTC

Hello ​@drJonesy ;

 

Any update about this issue?

 

Thank you.

Kaouthar

To give better visibility on the answered topics, please click on "Best answer" on the reply which solved your issue or answered your question.
drJonesyAuthorBest answer
Associate II
Oct 27, 2026 5:56 PM UTC

Hi yes it was a hardware issue needed to redesign the camera. please close this issue.

KDJEM.1
ST Technical Moderator
Oct 28, 2026 7:49 AM UTC

Hello ​@drJonesy ;

 

Thank you for updating post and sharing the issue.

Thank you for your contribution in STCommunity.

 

Kaouthar

To give better visibility on the answered topics, please click on "Best answer" on the reply which solved your issue or answered your question.