Digital Camera Interface (DCMI) For STM32: What Is It and How Does It Work?

Millions of devices are powered by STM32 microcontroller, but no DCMI support before 2017, during that time Arducam’s SPI camera solution filled the gap of connecting a camera to these microcontrollers. Ever since the 2017 ST-electronics added the DCMI to the new STM32 families to address this issue for the IoT devices enabling the machine vision abilities the official way.

DCMI is an abbreviation of “Digital Camera Memory Interface”, a term coined by STmicrocontrollers. To put it another way, DCMI is a synchronous parallel data bus that is made available for certain STM32 MCUs to directly communicate with 8/10/12/14-bit CMOS camera modules. It provides an official solution that allows image sensors to be incorporated in many STM32 based applications.

Features of the Digital Camera Interface (DCMI)

  • Configurable parallel data interface that supports up to 14 data lines (D13-D0).
  • Support for two capture modes: Snapshot mode for a single frame, Continuous grab for all frames.
  • Support for 8-bit/YCbCr 4:2:2/RGB565 progressive video, or JPEG compressed data without input limitations.
  • Support for crop & image resizing on received data.
  • Support for low power modes for different operations (Run, Sleep, Stop/Standby).

Conventional Camera Interfaces

DVP Interface: Digital Video Port (DVP) is a parallel camera interface commonly composed of an 8~16-bits data bus, with HSYNC and VSYNC signals for frame synchronization, and a PCLK which is center-aligned to the data bus for the receiver. The DVP type of camera is fully compatible with STM32’s DCMI.

MIPI CSI-2 interface: MIPI stands for Mobile Industry Processor Interface, a Camera Serial Interface composed of a pair of clock lanes and 1~4 data lanes. It is a widely adopted, simple, high-speed protocol primarily intended for point-to-point image and video transmission between cameras and host devices. So MIPI Cameras are not natively compatible with the DCMI interface for STM32, Arducam still makes it possible to use these MIPI cameras with a regular DCMI interface, please talk to our camera specialist for detail

LVDS Interface: LVDS means Low-voltage differential signaling, it offers very high rates-gigabit/second speeds at very low power and commonly seen from Sony cameras. It is also composed of a pair of clock lanes and 1~4 data lanes. Same as the MIPI interface, it is also not natively supported by DCMI on STM32, please talk to our camera specialist about how to connect an LVDS camera to an STM32 microcontroller.

How DCMI works

block diagram of STM32s DCMI interface
  • A synchronizer in DCMI controls how data from a camera module goes into the data extractor, FIFO, and the 32-bit data register.
  • The data extractor in DCMI takes care of the data and packs it in the 4-word FIFO, which will be later placed in the 32-bit register.
  • Each time the 32-bit data block is full, the system sends a DMA request.
  • DMA pulls data from the register and transfers it to the corresponding memory destination.
  • The developer decides how the data will be processed as per their project requirements.

For detailed features of the DCMI interface, please refer to the AN5020 Application note from ST.

DCMI and Camera Integration on STM32: 2 Types of STM32 MCUs

there are currently 3 types of STM32 development boards 1

On the bright side, adding camera support with DCMI has brought some of the STM32 boards into the computer vision field. And to back it up, STmicrocontroller has also added a function pack named FP-AI-VISION1, with built-in examples like food recognition and person presence detection,  to their software tools (STM32Cube).

But it’s hard to say if the DCMI is a well-done job for the 32-bit STM32 platform, as it splits the whole family of 1168 microcontrollers into 2 groups of boards:

1. STM32 MCUs That Support DCMI

These boards are all applicable for DCMI, some of them even feature onboard image sensors that are ready for development, good for building fast camera projects, but are quite expensive. Additional camera modules are required for those that don’t have onboard cameras.

2. STM32 MCUs That Do Not Support DCMI

These boards are released before DCMI, they don’t have any camera interfaces.

How to Use Cameras With STM32 MCUs That Don’t Have DCMI

arducam spi camera solutions for stm32 boards that doesnt have DCMI

Our SPI camera modules are the best alternative solutions to DCMI, for two major reasons:

  1. They add camera support for those STM32 boards that don’t have a DCMI interface.
  2. For DCMI-ready STM32 microcontrollers, they can work as a great supplement when you need to use multiple cameras on one board.

More about our SPI Camera solutions:

spi camera series for stm32

Novel SPI Camera Solutions for STM32 Boards without DCMI: 2MP Arducam Mini & 5MP OV5642

No Camera Interface in Early STM32 Development Boards Starting from 2007, STMicroelectronics has expanded their 32-bit Arm Cortex-based MCUs from the STM32 F1 to a whole catalog of 17 series with nearly 1100+ dev boards, the overwhelming number of products have scared so many hobbyists and developers away, especially those who have zero experience with […]

0 comments

Arducam DCMI-Ready Parallel Camera Modules for STM32 Development Boards

arducam DCMI compatible Parallel camera modules

For high-end STM32 boards that do have DCMI support, we also made a big collection of DCMI-compatible camera modules featuring dozens of image sensors that can be tailored to meet the requirements of any application.

Supportted Image Sensors:

  • OV2640
  • OV9655
  • OV5640
  • OV5642
  • S5k5CAGA
  • NT99141
  • MT9D111
  • OV3640
  • OV3660
  • OV5642
  • MT9P111
  • S5K4ECGX

We also offer customization services based on any image sensors and lenses.

ov2640 thumbnail

OV2640 – Specs, Datasheets, Cameras, Features, Alternatives

OV2640, an evergreen image sensor from OmniVision. It was released in 2005 and discontinued in 2009, yet still used a lot in today’s products. While this image sensor remains popular, there are also uncertainties ahead. You may have questions like the followings: What’s good about it?  What makes it so popular?  How to deal with […]

3 comments

Arducam STM32 Cameras: The Blueprint

best camera module solutions for the STM32 platform

We are not stopping with just a dozen of STM32 cameras, we will be more focused on creating one complete camera SDK with APIs that offer advanced camera controls (exposure/gain/frame rate/resolution/pixel format) and smooth integrations for any of our parallel camera modules, we look to improve the whole experience of project-building with cameras on every STM32 series, at the end of the day, interfacing with an image sensor should be as easy as connecting it to the board, downloading our SDK, and from there you are all set for making things happen, you don’t have to waste time on fixing compatibility issues, long gone are the days of frustration.

Our STM32 cameras will be eventually better than any other camera solutions, there will be an entire DCMI camera family, accompanied by a well-supported development environment, ready for an extensive amount of IoT applications that can potentially benefit from embedded machine vision.

0
Your Cart is empty!

It looks like you haven't added any items to your cart yet.

Browse Products