cancel
Showing results for 
Search instead for 
Did you mean: 

Some problems with DCMI stm32f407vgt6 mcu

hitsumen
Associate II
Posted on July 10, 2013 at 11:46

I have some problems with DCMI (stm32f407vgt6 mcu).

I saw on forums the examples of reading data from camera and sending it through DMA to LCD.

What I want is to get the data from DCMI, save 1 frame to internal SRAM memory, send data through USART to my computer and see if its good.

I connected the camera to the same pins like the example of OV9655. Mine camera is OV5642.

What I have is I can read the data from DCMI->DR (data register), I have some data, so I see that my camera is functioning, i tried to cover camera, I received 0x00000000, with uncovered camera I received some numbers, so some data are correct. I even can read the

DCMI_FLAG_VSYNCRI and 

DCMI_FLAG_LINERI

. I use QVGA(320x240) format, so 

DCMI_FLAG_LINERI is triggered 240 times, so its ok.

I can read the DCMI->SR (status register) which gives me 0x02, 0x03 or 0x04 values, I do not receive 5, 6, 7, in data sheet it was written that when valid data is in fifo the FNE flag should be, but I do not receive 5,6,7.. What should I check?

My questions whould be:

1. Do I need to use the DMA? Is it possible to read the data from DCMI->DR register and put it in memory by watching DCMI_FLAG_VSYNCRI and DCMI_FLAG_LINERI registers?

2. What values should I receive from DCMI->SR if everything is ok?

3. How data is saved in DCMI->DR register becouse its 32bit register. I programmed the camera to give the RGB565 format to me, so there are 16 bits of data. So the DCMI->DR gives 2 pixels of data, or 1 pixel and another stuff will be like 0xFFFF0000? 

Thank you.
2 REPLIES 2
1134971431
Associate
Posted on July 15, 2013 at 04:25

I use DCMI Interface connected TVP5150 ,too.  how do you use the embedded data synchronization mode.The manual did not say how the configuration register.

GHITH.Abdelhamid
Associate II
Posted on July 18, 2013 at 10:50

I guess you have an overrun issue, you can check ORV flag in DCMI_RIS register.

I suggest to use DMA for data transfer from DCMI to RAM (avoid ovr) and use CPU to send you data over UART to PC.

rgs