
Digital camera interface (DCMI)
RM0351
DocID024597 Rev 5
20
Digital camera interface (DCMI)
This section applies to STM32L496xx/4A6xx devices.
20.1 DCMI
introduction
The digital camera is a synchronous parallel interface able to receive a high-speed data flow
from an external 8-, 10-, 12- or 14-bit CMOS camera module. It supports different data
formats: YCbCr4:2:2/RGB565 progressive video and compressed data (JPEG).
This interface is for use with black & white cameras, X24 and X5 cameras, and it is
assumed that all preprocessing like resizing is performed in the camera module.
20.2 DCMI
main
features
●
8-, 10-, 12- or 14-bit parallel interface
●
Embedded/external line and frame synchronization
●
Continuous or snapshot mode
●
Crop feature
●
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
20.3 DCMI
clocks
The digital camera interface uses two clock domains, DCMI_PIXCLK and HCLK. The
signals generated with DCMI_PIXCLK are sampled on the rising edge of HCLK once they
are stable. An enable signal is generated in the HCLK domain, to indicate that data coming
from the camera are stable and can be sampled. The maximum DCMI_PIXCLK period must
be higher than 2.5 HCLK periods.
20.4 DCMI
functional
overview
The digital camera interface is a synchronous parallel interface that can receive high-speed
(up to 54 Mbytes/s) data flows. It consists of up to 14 data lines (D13-D0) and a pixel clock
line (DCMI_PIXCLK). The pixel clock has a programmable polarity, so that data can be
captured on either the rising or the falling edge of the pixel clock.
The data are packed into a 32-bit data register (DCMI_DR) and then transferred through a
general-purpose DMA channel. The image buffer is managed by the DMA, not by the
camera interface.
The data received from the camera can be organized in lines/frames (raw YUB/RGB/Bayer
modes) or can be a sequence of JPEG images. To enable JPEG image reception, the JPEG
bit (bit 3 of DCMI_CR register) must be set.