Thermal Zone
Thermal management is necessary to ensure proper operation of the phyCORE-AM62x SOM, especially when integrated inside an enclosure. The AM62x processor generates considerable heat, so it is important to manage the system’s temperature. The phyCORE-AM62x has a temperature rating of -40°C to 85°C. This guide will show you how to read the junction temperature of the processor on the phyCORE-AM62x SOM. To learn more information about the phyCORE-AM62x thermal management, please see section 4.9 in the Hardware Manual.
Reading the Temperature
The AM62x processor has 1 physical location (thermal zone) where the temperature can be monitored. Thermal zone 0, for example, can be accessed in the Linux directory /sys/class/thermal/thermal_zone0.
To output the temperature of thermal zone 0 run the following command:
phyboard-lyra-am62xx-3:~# cat /sys/class/thermal/thermal_zone0/temp 53470
This output translates to 53.47C
Temperature Trip Points
Each thermal zone includes trip points. You can set the trip points to a temperature that will trigger an event, such as turning on a fan for active cooling. You can also build in a critical trip point; if this temperature is reached, Linux will automatically shutdown the system for protection of the processor.
Trip Point Type |
Description |
---|---|
Passive |
Passive cooling: Mitigate heat by scaling down performance without active cooling. |
Active |
Active cooling: Implement more aggressive cooling methods to prevent the system from reaching critical temperatures. |
Hot |
Reaching operating threshold: Signals a state where the system is getting warm but hasn’t reached critical levels yet. |
Critical |
Exceeding critical threshold: Protect the hardware from potential damage due to extreme temperatures by forcing shutdown. |
Hysteresis refers to a temperature margin before taking corrective actions, such as adjusting cooling mechanisms. Instead of reacting immediately when a certain temperature threshold is crossed, a hysteresis value ensures that the system doesn’t oscillate rapidly between different states due to small temperature fluctuations.
For more details on thermal zone terminology, please refer to the kernel documentation: thermal zones.
To view the type of trip points and the trip point temperatures of thermal zone 0 run the following command:
phyboard-lyra-am62xx-3:~# cat /sys/class/thermal/thermal_zone0/trip_point* 2000 105000 critical
The critical trip point which will cause the system to shutdown will be reached when the temperature reaches 105°C.
Emulate a Temperature
Linux includes an optional thermal emulation mode that allows you to simulate temperature changes via sysfs. This feature is particularly useful for testing various trip points, such as critical thresholds.
Verifying Thermal Emulation Mode
To check if thermal emulation is enabled, run the following command:
phyboard-lyra-am62xx-3:~# zcat /proc/config.gz | grep THERMAL_EMULATION CONFIG_THERMAL_EMULATION=y
If this configuration is not enabled, refer to the Build the BSP guide to include it and build a new BSP. By default, this configuration is enabled in our BSPs.
Example: Testing Critical Trip Points
You can simulate a temperature above the critical trip point to test the system’s automatic shutdown mechanism for hardware protection. For example:
phyboard-lyra-am62xx-3:~# echo 110000 > /sys/class/thermal/thermal_zone0/emul_temp [ 3181.955312] thermal thermal_zone0: main0-thermal: critical temperature reached [ 3181.955409] reboot: HARDWARE PROTECTION shutdown (Temperature too high) phyboard-lyra-am62xx-3:~# Broadcast message from root@phyboard-lyra-am62xx-3 (Thu 2025-01-23 09:02:30 UTC): The system will power off now!
Note
It is not recommended to enable thermal emulation mode in BSPs intended for production use.