2014-11-16 09:01 PM
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 appreciatedThanksVincentcode https://www.dropbox.com/s/rcdn0erle0epxna/CameraTest.zip?dl=0 #stm32f429 #dcmi #lcd #dma2015-08-28 01:32 AM
Hi
I have the same issue.
You
deal with it
?
2015-08-28 02:22 AM
Vladimir,
using DCMI on F429 might require some trade-off: resolution versus frame rate versus image processing. Example: 1.3MP at 30fps to be stored in a file is very difficult to achieve due to the combination of small internal SRAM (cannot fit 1.3MP RGB image), latency or bandwidth limitation of external memory, small DCMI output FIFO (only 16 words!!), low number of DMA masters on the bus, etc ... Tell us a bit more about your project, with some luck there could be a chance to find a successful combination that works.2015-08-28 02:36 AM
I have QVGA RGB565
And allocate memory space: uint8_t OV7670_buffer[320 * 240 * 2]; When I try to pick up the data, but the buffer is empty: HAL_DCMI_Start_DMA(&OV7670_hdcmi_eval, DCMI_MODE_SNAPSHOT, (uint32_t)&OV7670_buffer, (uint32_t)((IMG_ROWS * IMG_COLUMNS * 2) / 4)) HAL_Delay(300); LCD_DisplayImage((uint16_t*)OV7670_buffer); Init code: Sorry for my English2015-08-28 02:52 AM
Did you verify that the OV7670 outputs any data ?
Does HAL allows you to catch DMA errors ? If yes, are there any of them ?2015-08-28 03:00 AM
Interrupting DMA2_Stream1_IRQHandler works often
DMA2_Stream1_IRKHandler interrupt is triggered only once, after calling HAL_DCMI_Start_DMA() If you disconnect the camera from the data bus, the interrupt will stop working2015-08-28 04:58 AM
Very good.
Now, what's make you think there is no image data ? Are you sure that your LCD is working properly ? Did you test with a crafted image of your own ?2015-08-28 05:38 AM
Yes,
I use the
display for
logs
I write
for the test
in the first cell
array
data
:OV7670_buffer [
0] = 0xFFFF;This
pixel is
visible on
the display.
In all other
cells of
the zeros
2015-08-28 06:05 AM
Good point.
Now, does the manually written 0xFFFF survives another HAL_DCMI_Start_DMA ? Next step is to make sure that data arrives at the DCMI port. First check GPIO config (PushPull config look always suspicious to me about inputs!), then make sure that your OV7870 sends another data than blank image ! Do you use a custom HW or a well known (verified) platform ?2015-08-28 06:47 AM
Yes, 0xFFFF survives.
I just checked the oscilloscope - the data coming from the camera. I use STM32F429I - Discovery. I changed the configuration of ports on GPIO_PULLDOWN, but nothing has changed