Skip to main content
vincent_au_93
Associate
November 17, 2014
Question

STM32F429I-Discovery DCMI DMA OV7670

  • November 17, 2014
  • 21 replies
  • 3239 views
Posted on November 17, 2014 at 06:01

Hi,

I want to implement DCMI on the STM32F429I Discovery using OV7670. I am using external clock of 20MHz for OV7670 clock source. I can get the frame interrupt, but cannot get the dma interrupt working. Also, no data is written to the buffer. My code is posted below. So my question is can i actually implement DCMI with STM32F429 and use lcd at the same time? I am using lcd driver without ltdc, so the dcmi pin is still not used. And, how can I write data received to DCMI to the data buffer? Any help will be greatly appreciated

Thanks

Vincent

code 

https://www.dropbox.com/s/rcdn0erle0epxna/CameraTest.zip?dl=0

#stm32f429 #dcmi #lcd #dma
This topic has been closed for replies.

21 replies

Chuev.Vladimir
Associate III
August 29, 2015
Posted on August 29, 2015 at 13:25

Hi

I will check it

on Monday

Chuev.Vladimir
Associate III
August 31, 2015
Posted on August 31, 2015 at 09:51

Everything remained as before

DMA status at the time of interruption - ''DMA Mem0 process success''

stm322399
Senior
August 31, 2015
Posted on August 31, 2015 at 10:15

How did you wire the camera. Having a quick look in your code, I did not see how VSYNC is connected.

Chuev.Vladimir
Associate III
August 31, 2015
Posted on August 31, 2015 at 11:06

0690X000006030sQAA.jpg

stm322399
Senior
August 31, 2015
Posted on August 31, 2015 at 11:35

PB7 is not configured in our code.

Chuev.Vladimir
Associate III
August 31, 2015
Posted on August 31, 2015 at 12:02

I noticed this error several days ago.

I corrected her, but no changes

http://code.re/8gi

Chuev.Vladimir
Associate III
August 31, 2015
Posted on August 31, 2015 at 13:13

I updated

version of

Hal

.

Now

something is happening

0690X000006034FQAQ.jpg

stm322399
Senior
August 31, 2015
Posted on August 31, 2015 at 15:06

What's happening here is probably only related to a different code/data/heap arrangement.

Your  #1 problem is to understand why DMA produces no errors (do not trust HAL, check registers) while the target buffer is not overwritten. Does data present in the buffer still survive the DMA transfer ?

Chuev.Vladimir
Associate III
September 1, 2015
Posted on September 01, 2015 at 09:52

I changed I2C array with initialization registers.

Now camera shows small blocks of picture, no fullscreen. And picture became purple.

My code:

    while(1){

        HAL_Delay(600);

        HAL_DCMI_Start_DMA(&hdcmi, DCMI_MODE_SNAPSHOT, (uint32_t)(&OV7670_buffer), (uint32_t)((IMG_ROWS * IMG_COLUMNS * 2) / 4));

    }

0690X000006034KQAQ.jpg

stm322399
Senior
September 3, 2015
Posted on September 03, 2015 at 09:47

Sounds good. Camera sensor init is a critical part, you will require to follow the sequence provided by the sensor vendor to get the wanted resolution, frame rate, format, etc ...

Did you manage to get a better picture ?