Search by Tags

Temperature Sensor (Linux)

 

Compare with Revision




Subscribe for this article updates

NVIDIA Tegra based modules

The temperature sensor is able to report the PCB's temperature as temp1 and the NVIDIA Tegra T20/T30 chip's internal temperature as temp2. The output is provided in 1000ths of degrees Celsius (Colibri T20 V1.x BSPs provided it in degrees Celsius). Therefore it must be divided by 1000 to obtain degrees.

root@colibri_t20:~# cat /sys/bus/i2c/devices/4-004c/temp1_input
29625
root@colibri_t20:~# cat /sys/bus/i2c/devices/4-004c/temp2_input
31125
root@colibri-t30:~# cat /sys/bus/i2c/devices/4-004c/temp1_input
52468
root@colibri-t30:~# cat /sys/bus/i2c/devices/4-004c/temp2_input
45625

NVIDIA Tegra K1 based modules

The Apalis TK1 module comes with 2 temperature sensors, one which measures the temperature of the CPU die and another on the Apalis PCB. To read these temperatures, the hwmon subsystem is consulted. The output is provided in 1000ths of degrees Celsius. Therefore it must be divided by 1000 to obtain degrees.

watch cat /sys/class/hwmon/hwmon?/temp1_input

Every 2.0s: cat /sys/class/hwmon/hwmon0/temp1_input /sys/class/hwmon/hwmon1/temp1_input /sys/class/hwmon/hwmo...  apalis-tk1: Thu Mar  8 13:45:59 2018

47500
49500
45000
46500
35000
46000

To verify where temperatures are being measured

root@apalis-tk1:~# cat /sys/class/hwmon/hwmon?/name
CPU-therm
GPU-therm
MEM-therm
PLL-therm
Tboard_tegra
Tdiode_tegra

The last two refer to the sensors previously mentioned.

NXP/Freescale iMX6 based modules

The iMX6 provides a temperature reading of the SoC's internal temperature plus the board temperature is available via ADC/touch chip albeit with a much lesser accuracy. The output is in 1000ths of degrees Celsius. Therefore it must be divided by 1000 to obtain degrees.

root@colibri-imx6:~# cat /sys/devices/virtual/thermal/thermal_zone0/temp
54325
root@colibri-imx6:~# cat /sys/bus/iio/devices/iio\:device0/in_temp8_raw
35318

NXP/Freescale iMX7 and iMX6ULL based modules

Both iMX6ULL and iMX7 modules have an integrated sensor for monitoring the temperature of the CPU. The output is in 1000ths of degrees Celsius. Therefore it must be divided by 1000 to obtain degrees.

root@colibri-imx6ull:~# cat /sys/devices/virtual/thermal/thermal_zone0/temp 
57140

NXP/Freescale Vybrid based modules

The Vybrid's internal temperature sensor is connected internally to its ADC module's analogue input channel, the readout of temperature is given by in_temp_input. The output is in 1000ths of degrees Celsius. Therefore it must be divided by 1000 to obtain degrees.

root@colibri-vf:~# cat /sys/bus/iio/devices/iio:device1/in_temp_input
40760