🛠 Remplacer un CM4 par un CM5 : audit des incompatibilités (Annexe B)
Objectives
The CM5 retains the 40 × 55 mm form factor and the 2 × 100-pin connectors of the CM4 — Raspberry Pi describes this as "mostly compatible", not fully compatible. Before soldering a CM5 into an existing fleet of CM4 boards, you must audit the three documented discrepancies in Appendix B of the datasheet: (1) the CAM0/DSI0 MIPI pairs have become USB 3.0 and no longer work on a CM4 board; (2) the ESD protection present on HDMI, SDA, SCL, HPD, and CEC on the CM4 has been removed; (3) power consumption shifts from a typical ~1.4 A to a design requirement of 5 V / 2.5 A. This tutorial produces a reproducible audit script.
Hardware
- 1 × CM5 mounted on the CM4 motherboard to be audited (IO Board or product board)
- The product's original power supply (this is precisely suspect #1)
- HDMI display, and if relevant: camera on CSI0, DSI0 display panel
- SSH session or serial console for recovery (boot may fail depending on the DTB)
Complete Code
#!/usr/bin/env bash
# audit-cm5-sur-cm4.sh — ce qui survit au remplacement CM4 -> CM5.
echo "== 1. Sous-tensions (alim prévue pour 1,4 A ?) =="
dmesg | grep -iE 'under-voltage|underpower' || echo "OK : aucune sous-tension enregistrée"
vcgencmd get_throttled
echo "== 2. Caméra sur l'ancien port CAM0 (paires devenues USB3) =="
libcamera-hello --list-cameras 2>/dev/null || echo "AUCUNE caméra : attendu sur brochage CM4"
echo "== 3. Premier afficheur DSI0 (paires devenues USB3) =="
ls /sys/class/drm/ | grep -i dsi || echo "pas de connecteur DSI0 exposé"
echo "== 4. Périphériques USB3 apparus à la place des MIPI =="
lsusb -t | grep 5000M || echo "aucun périphérique 5000M branché"
echo "== 5. Chaîne thermique et EEPROM =="
vcgencmd measure_temp; vcgencmd bootloader_version | head -1
Expected Verification
The report must conclude: no undervoltage under load (otherwise review the power supply — the datasheet suggests lowering the CPU clock as a fallback); CSI0 camera and DSI0 display panel absent (expected behavior, not a defect); eMMC, Ethernet, the second HDMI, and the HAT footprint remain functional. Document the decision: migrate the motherboard to a CM5 pinout if the camera/DSI0 is required.
Common Errors
- Reusing the CM4 product's power supply: intermittent brown-outs during peak load; Appendix B.3 mandates a 5 V / 2.5 A design.
- Attributing the silent camera on CSI0 to a "defect": this is a structural pinout incompatibility; no software fix exists.
- Forgetting ESD: on exposed connectors (front-panel HDMI, I2C), re-add the protection that the CM4 included and the CM5 no longer has.
- Confusing "mostly compatible" with "pin-compatible": for designs requiring 100% CM4 compatibility, the product page reminds us that the CM4 remains in production until at least January 2034.
Other tutorials for this board
- Alimenter un CM5 comme il faut : USB-C PD 5 V / 5 A et bouton d'alimentation
- La première RTC des Compute Modules : câbler et vérifier la VBAT du CM5
- Accès distant sans VPN : enregistrer un CM5 dans Raspberry Pi Connect
- GPIO du CM5 côté RP1 : force de conduite, budget 50 mA et broches pièges
- Refroidir le CM5 : ventilateur PWM sur le connecteur JST-SH et tachymétrie
- Deux ports USB 3.0 simultanés : le CM5 fait du stockage rapide, pas sur une carte CM4
Code examples for this board
clignotante.pyPythonbouton-gpio.pyPythoncapteur-i2c.shBashsurveillance-temperature.shBashcapteur-dht11.pyPythonservo-pwm-sysfs.shBash