cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 OV7670 DCMI

Marcomech
Associate

Hello, for a few days I have been trying to run the OV7670 camera on the STM32F446RE (Nucleo).
Since the full QVGA RGB565 (153600 B) does not fit in RAM, for now i opted for QVGA Y8 Grayscale, however i must have some problem with how im configuring something  because i cant see anithing from the image in UART terminal and using the debugger im only seeing '00' in the buffer.
Feel free to ask if you need further context or files. 

Regards, Marco

3 REPLIES 3
KDJEM.1
ST Employee

Hello @Marcomech,

 

What do you mean by “Y8 Grayscale”? Does it mean Y only?

The DCMI supports the following data formats:

– 8/10/12/14-bit progressive video: either monochrome or raw Bayer
– YCbCr 4:2:2 progressive video
– RGB 565 progressive video
– Compressed data: JPEG

 

I recommend you to look at AN5020 precisely DCMI examples based on STM32CubeMx and get inspired from these examples to check your project.

 

Thank you.

Kaouthar

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Thank you for the answer,

Sorry, yes i mean Y only, wich produces a greyscale image. I don't want a video, i just want to capture 1 image.

I have read the manual and folowed the sugested configurations, however the image is not captured. I have not found any DCMI examples for STM32F446 nucleo board and the one using the eval board has no ioc file so its hard to adapt.

Regards


KDJEM.1
ST Employee

Hello @Marcomech;

 

Make sure that CAPTURE bit is enabled in DCMI control register (DCMI_CR).
Note that he DMA controller and all DCMI configuration registers must be programmed correctly before enabling the CAPTURE bit.

You can get inspired by the Camera example available under the STM32CubeF4 firmware package.

..\Repository\STM32Cube_FW_F4_V1.28.1\Projects\STM32446E_EVAL\Applications\Camera\Camera_To_USBDisk

..\Repository\STM32Cube_FW_F4_V1.28.1\Projects\STM32446E_EVAL\Examples\DCMI\DCMI_CaptureMode

..\Repository\STM32Cube_FW_F4_V1.28.1\Projects\STM32446E_EVAL\Examples\DCMI\DCMI_SnapshotMode

 

I think AN5020 precisely 8.3.5 Y only data capture section may help you.

 

Thank you.

Kaouthar

 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.