🛠 Surveiller température et fréquence CPU, piloter le ventilateur PWM

Radxa ROCK 3B (Rockchip RK3568) · intermediaire · Schéma : IMG-radxa-rock-3b-intermediaire-3-rock3b-thermique.svg — Radxa ROCK 3B avec dissipateur et ventilateur 2 broches, courbes de température et fréquence des quatre Cortex-A55

Objectives

Instrument the ROCK 3B (4× Cortex-A55 up to 2.0 GHz, RK3568 at 22 nm): read thermal zone temperatures, observe the actual frequency under load, and understand the 2-pin 1.25 mm fan connector (5 V PWM). Official temperature references: Community edition 0–60 °C, Industrial edition (RK3568J) −40–85 °C. >

Hardware

Full code

# 1. Zones thermiques et températures (milli-°C)
paste <(for z in /sys/class/thermal/thermal_zone*/type; do cat $z; done) \
      <(for z in /sys/class/thermal/thermal_zone*/temp; do echo "scale=1;$(cat $z)/1000"|bc; done)

# 2. Fréquence réelle des cœurs sous charge
(stress-ng --cpu 4 --timeout 60s &) ; sleep 5
while sleep 2; do grep -H . /sys/devices/system/cpu/cpufreq/policy*/scaling_cur_freq; done

# 3. Politiques et seuils thermiques
grep . /sys/class/thermal/thermal_zone*/policy 2>/dev/null
sudo dmesg | grep -i -e thermal -e throttle

# 4. Ventilateur 2 broches : sous Radxa OS, vérifier rsetup (fan/thermal) ou
#    le contrôle PWM manuel du bus correspondant (pwmchip) — > 
#    l'exposition exacte du connecteur fan varie entre images constructeur.
ls /sys/class/pwm/

Expected verification

Under stress-ng --cpu 4, scaling_cur_freq rises towards 2.0 GHz and then stabilizes; without a heatsink, the frequency drops and dmesg may display throttling messages. With a heatsink/fan, the temperature caps lower and the frequency holds longer. Raw temp values are in milli-degrees (53000 = 53 °C).

Common errors

Other tutorials for this board

Code examples for this board

← Back to the board 🛠 All tutorials