The STM32MP1-BSB board provides the DCMI connector for cameras. This Application Notes describe how to attach such a camera to the board and obtain a video from the camera using the STM32MP1 BSP software.
The Waveshare OV5640 Camera Board (A) or (C) is used to demonstrate the camera support. For the camera software and manuals refer to:
The Waveshare OV5640 Camera Board (A) or (C) must be attached to connector P13
of the STM32MP1-BSB as follows:
Use a 18 Position Ribbon Cable Assembly Socket to Socket with 2.54mm pitch 2row connectors:
Samtec HCSD-09-D-08.00-01-T or similar is acceptable
Make the cable as short as possible, no more than 1 cm length:
Test the camera interface as below:
Boot the system to the shell prompt.
Verify that the camera is detected on the I2C bus at address 0x3c:
root@stm32mp15-bsb:~# i2cdetect -y 2 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- UU -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- --
Verify that the Linux video stack is configured properly:
root@stm32mp15-bsb:~# v4l2-ctl --list-devices STM32 Camera Memory Interface (platform:dcmi): /dev/video0
Verify that the camera is able to stream (interrupt with ^C):
root@stm32mp15-som:~# v4l2-ctl --set-fmt-video=width=320,height=240,pixelformat=RGBP root@stm32mp15-som:~# v4l2-ctl -d /dev/video0 --stream-mmap <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.02 fps <<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.02 fps <<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.02 fps <<<<<<<<<<<<
Attach an HDMI display to the system as described in Using of the MIPI DSI Interface. Stream the video to the display (interrupt with ^C) using the following command:
root@stm32mp15-som:~# gst-launch-1.0 v4l2src ! "video/x-raw, width=320, height=240, framerate=(fraction)15/1" ! queue ! autovideosink Setting pipeline to PAUSED ... Pipeline is live and does not need PREROLL ... Pipeline is PREROLLED ... Setting pipeline to PLAYING ... New clock: GstSystemClock Redistribute latency... 0:00:06.6 / 99:99:99. ....