2013-07-10 02:46 AM
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, soDCMI_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.2013-07-14 07:25 PM
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.
2013-07-18 01:50 AM
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