cancel
Showing results for 
Search instead for 
Did you mean: 

Interfacing raspberry pi camera with stm32

Shubham08
Associate III

Can we interface the Raspberry Pi camera with the STM32 that has a camera interface feature? 

1 REPLY 1
mƎALLEm
ST Employee

Hello,

This is an answer from STM32 Sidekick

mALLEm_0-1766490723853.png:

1. STM32 Camera Interface (DCMI) Capabilities and Raspberry Pi Camera Compatibility

The STM32 DCMI (Digital Camera Interface) is designed to connect with camera modules and CMOS sensors that use an 8- to 14-bit parallel interface. It supports various video formats and data rates up to 140 Mbyte/s with an 80 MHz pixel clock. However, the Raspberry Pi camera typically uses a MIPI CSI-2 serial interface, which is not directly compatible with the parallel DCMI interface of STM32 MCUs. There is no direct mention or example in the official documentation of interfacing a Raspberry Pi camera with STM32 DCMI, and thus, direct connection is not supported.


2. Compatible Camera Modules for STM32 DCMI

The STM32 DCMI interface is compatible with a wide range of camera modules that provide a parallel output. Examples include:

  • MT9D111 (ArduCAM 2MP, 10-bit)
  • MT9P111 (5MP, 8-bit)
  • NT99141 (1MP, 8-bit)
  • OV2640 (2MP, 8/10-bit)
  • OV3660 (3MP, 8/10-bit)
  • OV5640 (5MP, 8/10-bit)
  • OV5642 (5MP, 8/10-bit)
  • OV9655 (1.3MP, 8-bit)
  • S5k4ECGX (5MP, 10-bit)
  • S5k5CAGA (3MP, 10-bit)

Always verify the camera module's specifications for compatibility with the DCMI interface.


3. MIPI CSI-2 Camera Modules and STM32

The STM32 DCMI does not natively support MIPI CSI-2 camera modules, such as the Raspberry Pi camera, because it is a parallel interface, not a serial one. However, it is possible to use a MIPI CSI-2 to parallel bridge, such as the STMIPID02 from STMicroelectronics. This bridge converts the MIPI CSI-2 output to a parallel format compatible with the DCMI. Some STM32MP13 Discovery kits include such a bridge, enabling the use of MIPI CSI-2 cameras with STM32 DCMI.


Summary

  • The Raspberry Pi camera (MIPI CSI-2) cannot be directly interfaced with STM32 DCMI (parallel interface).
  • STM32 DCMI supports a variety of parallel-output camera modules.
  • To use a MIPI CSI-2 camera with STM32, a MIPI-to-parallel bridge (e.g., STMIPID02) is required.

For additional support or to discuss your specific application with ST experts, you’re welcome to join conversations in STM32 forums.

Please also refer to the AN5020 "Introduction to digital camera interface (DCMI) for STM32 MCUs"

and the wiki: Camera bridges hardware components

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.