🛠 Caméra CSI OV5640 via fdtoverlays dans extlinux.conf
Objectives
Enable the 22-pin CSI camera port on the BeaglePlay and connect an OV5640 module, the recommended sensor because the CSI connector is wired without an ISP: there is no image processing pipeline on the AM625 for this connector, so the sensor must provide a pre-processed stream at its output (the OV5640 does this, many raw RAW sensors do not). Activation is done via device tree overlays declared in the fdtoverlays line of /boot/firmware/extlinux/extlinux.conf.
Hardware
- A BeaglePlay board
- An OV5640 camera module (22-pin CSI ribbon cable, recommended sensor)
- Access to the FAT boot partition
Complete code
# 1. Vérifier la présence de l'overlay dans l'image
find /usr/lib/linux-image* -name '*ov5640*'
ls /boot/firmware/overlays/ 2>/dev/null
# 2. Éditer la config extlinux (sauvegarde d'abord)
sudo cp /boot/firmware/extlinux/extlinux.conf ~/extlinux.conf.bak
sudo nano /boot/firmware/extlinux/extlinux.conf
# ajouter dans le bloc linux :
# fdtoverlays /overlays/k3-am625-beagleplay-csi-ov5640.dtbo
sudo reboot
# 3. Après reboot : le subdev est apparu
media-ctl -p | grep -i ov5640
yavta -l --enum-formats --enum-inputs /dev/video0
Expected verification
After reboot, media-ctl -p shows the chain ov5640 -> csi2 -> video, and yavta --enum-frame-sizes /dev/video0 lists the sensor resolutions. A capture: yavta -c1 -f UYVY -s 1280x720 -F /dev/video0 writes an image file. If fdtoverlays is ignored, verify that the path is relative to the boot partition.
Common errors
- Connecting a pure RAW sensor: without an ISP on the 22 pins, no usable image; the OV5640 is recommended precisely for its embedded processing.
- Using an absolute path in
fdtoverlays: extlinux resolves paths from the root of the boot filesystem. - Improperly inserted CSI ribbon cable or reversed connector orientation: the sensor does not appear at all in the media graph.
- Editing
extlinux.confon the eMMC partition while booting from SD (or vice versa). - Forgetting
sync/proper reboot: the boot FAT gets corrupted and the board fails to restart.
Other tutorials for this board
- Flasher l'image Debian sur la microSD puis l'eMMC 16 Go
- LED et bouton USER : triggers kernel et gpio-keys
- OLED Qwiic sur le bus I2C 5 (mcu_i2c0)
- Capteurs Grove sur le bus I2C 1 et inventaire du bus
- Double Ethernet : GbE RTL8211F et 10BASE-T1L sur RJ11
- Reflasher le CC1352P7 en BSL depuis le processeur hôte
Code examples for this board
clignotante.pyPythonbouton-gpio.pyPythoncapteur-i2c.shBashsurveillance-temperature.shBashcapteur-dht11.pyPythonservo-pwm-sysfs.shBash