🛠 Alimenter un CM5 comme il faut : USB-C PD 5 V / 5 A et bouton d'alimentation
Objectives
The CM5 negotiates its power supply directly on the module: the CC1/CC2 pins of the USB-C connector communicate with the PMIC, which can request up to 5 V / 5 A (25 W) — no external PD controller is required on the motherboard. This tutorial covers: connecting the correct power supply, understanding the limitation of the 3 A position (max 600 mA for peripherals), getting familiar with the PWR_BUT power button (short press = on/off, press > 5 s = forced shutdown), and checking for undervoltage. Reference power consumption (datasheet): ~400 mA at idle, ~900 mA during operation, 1.3 mA in shutdown.
Hardware
- 1 × CM5 on a CM5IO Board (sold separately — the bare module will not boot without a carrier board)
- 1 × official 27 W USB-C power supply (5 V / 5 A PD) + USB-C cable rated for 5 A (e-marker)
- For the comparative test: a standard 5 V / 3 A power supply
- A USB wattmeter or a smart plug is a plus for measuring actual power consumption
Complete code
# 1) Démarrer avec l'alimentation 27 W, puis vérifier l'absence de sous-tension
dmesg | grep -iE 'under-voltage|underpower' || echo "OK : aucune sous-tension enregistrée"
vcgencmd get_throttled # attendu : throttled=0x0
vcgencmd measure_temp # throttle à 85 °C de boîtier
# 2) Charger le système (2 SSD USB3 + CPU à fond) et recontrôler
sudo apt install -y stress-ng
stress-ng --cpu 4 --timeout 60 &
sleep 30; vcgencmd get_throttled; dmesg | tail -5
# 3) Bouton d'alimentation : appui court = extinction douce ; > 5 s = forcée
sudo systemctl poweroff # équivalent logiciel de l'appui court
# 4) Re-tester avec l'alimentation 3 A : les bits de sous-tension doivent apparaître
Expected verification
With the 27 W power supply: vcgencmd get_throttled remains at 0x0 even under stress, no undervoltage messages appear in dmesg, and the wattmeter indicates ~2 W at idle and ~4.5 W during typical operation (900 mA at 5 V). With a 3 A power supply + USB3 peripherals, under-voltage warnings appear — the datasheet requires a motherboard design of 5 V / 2.5 A.
Common errors
- Reusing the power supply from an older CM4: The CM5 consumes significantly more than the CM4; old motherboards/undersized power supplies cause brown-outs (Annex B.3 of the datasheet) — fallback solution: lower the CPU clock.
- USB-C cable without a 5 A e-marker: PD negotiation is limited to 3 A and restricts peripherals to a total of 600 mA.
- Powering via a standard USB-A port: 5 A negotiation only works over USB-C with wired CC pins.
- Confusing shutdown with fan stop: A fan powered at 5 V may continue to spin after shutdown if the motherboard does not cut its power line — this is documented behavior, not a module defect.
Other tutorials for this board
- 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
- Démarrer le CM5 sur un SSD NVMe dans le socket M.2 de la CM5IO
Code examples for this board
clignotante.pyPythonbouton-gpio.pyPythoncapteur-i2c.shBashsurveillance-temperature.shBashcapteur-dht11.pyPythonservo-pwm-sysfs.shBash