cancel
Showing results for 
Search instead for 
Did you mean: 

DCMI and DMA to save multiple images on RAM

afok-esmart
Associate III

I'm currently evaluating the STM32U5 series to connect to a camera via DCMI and store video (i.e., multiple frames/images). For now, I would like to keep things simple and also learn how the DCMI and DMA workflow is like. So, I'll keep this forum post focused on just simply save multiple frames into RAM (see below for more details).

I'm using the STM32U575I-EV and its provided example for DCMI as the base of my code. It seems like, for this example, there's a buffer large enough only to hold 1 frame (CAMERA_FRAME_BUFFER). That's expected, since the example code just displays the frame and has no use for it anymore. But I would like to know where in the code I would need to adjust so that it saves multiple frames. I've tried looking through the documentation but frankly I keep getting lost with the workflow going on.

Thank you in advance for your help; let me know if you need more info! This is the setup I'm working with.

  • MCU: STM32U575I-EV
  • Camera: OV5640 (included / part of the EV; see STM's MB1379)
  • Code/Project: STM32Cube_FW_U5_V1.4.0\Projects\STM32U575I-EV\Examples\DCMI\DCMI_ContinousCap_EmbeddedSynchMode
  • IDE: STM32CubeIDE 1.14.1
  • Resources: AN5020 Rev 3

----------------------------

More details - For this project the end goal for storing video is to get the frames packaged up into an AVI file and stored on an SD card that would be accessed via SDMMC. I'll get a separate post for that eventually; but if by any chance this is an entirely different workflow compared to what's discussed in this post, please let me know and I'll expedite making the separate post.

2 REPLIES 2
afok-esmart
Associate III

(OP replying here) Could it be related to the "DMA_QListTypeDef DCMIQueue" variable? Regardless, I would appreciate an explanation as to where this queue/linked-list fits into the workflow.

KDJEM.1
ST Employee

Hello @afok-esmart ,

Do you want to save the image in internal RAM or in external RAM?

I think AN5593 How to use the GPDMA for STM32U5 Series microcontrollers can help you. Because this Application note provides some performance-oriented programming guidelines to the system developer. Also, AN5593 explains how to use SRAMs and OCTOSPI with GPDMA  and also provides some recommendation about channel and ports.

Also, I advise you to take a look at this FAQ: How to configure the GPDMA?

I hope this help you.

Kaouthar 

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.