🛠 Surveillance thermique et fréquence des quatre Cortex-A53
Objectives
Monitor temperature and frequency of the Raspberry Pi 3 A+ under load. Watch the terminology: the board does NOT have a big.LITTLE architecture — the BCM2837B0 features 4 strictly identical Cortex-A53 cores @ 1.4 GHz; therefore, we monitor a single cluster, its thermal sensor, and throttling.
Hardware
- Raspberry Pi 3 A+ running Raspberry Pi OS, heatsink or ventilated case recommended (65 × 56 mm, no stock heatsink)
sudo apt install stress-ng vcgencmd(vcgencmd is provided by Raspberry Pi OS)- Manufacturer operating range: 0–50 °C ambient
- >
Full Code
#!/usr/bin/env bash
# surveille_temp.sh — température + fréquence + drapeaux de bridage
while true; do
t=$(</sys/class/thermal/thermal_zone0/temp) # milli-°C
f=$(</sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq) # kHz
printf '%s %d.%d C %6.0f MHz %s\n' "$(date +%T) " \
$((t/1000)) $((t%1000)) $((f/1000)) "$(vcgencmd get_throttled)"
sleep 2
done
# Terminal 1 : journal ; terminal 2 : contrainte des 4 cœurs
./surveille_temp.sh
stress-ng --cpu 4 --timeout 300 # puis observer la montée vers ~60-70 °C
# Historique des événements de bridage depuis le boot :
dmesg | grep -i -e thermal -e throttle
Expected Verification
At idle: 35–45 °C, 1400 MHz, throttled=0x0. At the end of the stress test: temperature plateaus and frequency drops below 1.4 GHz, with non-zero throttling flags (under-voltage or down-softmax bit). A fan or heatsink significantly lowers the plateau.
Common Errors
- Talking about "performance/efficiency cores": the 3 A+ is a homogeneous 4× Cortex-A53 cluster, no big.LITTLE.
- Using a 5 V/0.5 A phone charger: under load, this causes undervoltage (bit 0x1 of
get_throttled) and throttling — 5 V/2.5 A is required. - Confusing °C and milli-°C:
/sys/.../tempreturns 45123 for 45.1 °C. - Closed case without ventilation: the datasheet requires well-ventilated operation; the SoC can take it, the plastic cannot.
Other tutorials for this board
Code examples for this board
led_blink.pyPythonbutton_led.pyPythonservo_sweep.pyPythondht_temp.pyPythonoled_i2c.pyPythonmcp3008_read.pyPython