🛠 Piloter un écran parallèle 24 bits en DPI sur le CM3
Objectives
Output the display on the DPI bus (24-bit parallel RGB) of the SODIMM instead of HDMI: this is the native interface for industrial panels without an HDMI controller, and one of the I/O features that distinguish the CM3 from a classic Pi 3 (datasheet RP-008161-DS §2.2). DPI is mapped to alternate functions of bank0 GPIOs — it therefore consumes a large part of this bank. This tutorial configures the display controller via config.txt and service mode, then verifies the wiring.
Hardware
- CM3 on a carrier board with a connector suitable for the DPI panel (the CMIO3 does not break out DPI on a standard header: plan for a custom board or an adapter like the Acme CM3-PANEL)
- 24-bit parallel RGB panel (R0-R7, G0-G7, B0-B5, PCLK, DE, HSYNC, VSYNC), backlight powered separately
- Note the VREF voltage of bank0: DPI outputs at the voltage of the bank's VREF rail (1.8-3.3 V) — match it to the panel's logic level
Complete code
# 1. Réserver le DPI via config.txt. Exemple pour une dalle 800x480 7" classique :
sudo tee -a /boot/firmware/config.txt <<'EOF'
# mode vidéo personnalisé 800x480 @ 60 Hz routé vers le DPI
hdmi_cvt=800 480 60 6 0 0 0
hdmi_group=2
hdmi_mode=87
EOF
sudo reboot
# 2. Vérifier la sortie vidéo côté firmware
/opt/vc/bin/tvservice -s # affiche le mode actif résolu
# 3. Tester un affichage
sudo apt install -y fbv
ls /dev/fb* # /dev/fb0 doit exister
fbv test.png
Expected verification
tvservice -s indicates an active 800x480 mode and the test image appears on the panel. ls /dev/fb* shows /dev/fb0. On recent images using KMS, modetest (libdrm-tests package) lists the DPI encoder and allows pushing solid colors to verify the R/G/B wiring pin by pin.
Common errors
- Using GPIOs already used by other peripherals: 24-bit DPI occupies a good twenty pins of bank0 — cross-reference with the alternate functions table in datasheet §6 before any wiring.
- Incorrect VREF voltage for bank0: a panel with 1.8 V logic driven by a bank0 at 3.3 V receives overvoltage; DPI follows the VREF rail, which is a carrier board design decision.
- Forgetting the dedicated power supply for the backlight (often a separate LED driver): the image is present but the screen remains black.
- Confusing DPI and SMI: SMI is the NAND bus/Intel mode 80 bus for memories and displays, not an RGB video bus.
- Expecting hot-plug detection: the HDMI_HPD_N_1V8 pin is reserved for the firmware and does not exist on DPI — the panel is assumed to be always connected.
Other tutorials for this board
Code examples for this board
clignotante.pyPythonbouton-gpio.pyPythoncapteur-i2c.shBashsurveillance-temperature.shBashcapteur-dht11.pyPythonservo-pwm-sysfs.shBash