cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F429I-Discovery DCMI DMA OV7670

vincent_au_93
Associate
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
21 REPLIES 21
stm322399
Senior
Posted on August 28, 2015 at 16:22

Interesting. It looks like the DMA does not the job correctly.

Try to check status of DMA when the DMA IRQ arrives, looking for errors.

To make sure we have belts and suspenders, declare your buffer as uint32_t, so you naturally get word alignment.

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

Hi

I will check it

on Monday

Chuev.Vladimir
Associate III
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
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
Posted on August 31, 2015 at 11:06

0690X000006030sQAA.jpg

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

PB7 is not configured in our code.

Chuev.Vladimir
Associate III
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
Posted on August 31, 2015 at 13:13

I updated

version of

Hal

.

Now

something is happening

0690X000006034FQAQ.jpg

stm322399
Senior
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
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