Get the temperature of i.mx6

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Get the temperature of i.mx6

跳至解决方案
22,718 次查看
carmilili
Contributor III

Hello,

     How can I get the temperature of the kernel of i.mx6q? The linux code is LTIB.

     Thank you.

标签 (3)
1 解答
9,685 次查看
justin_jiang
NXP Employee
NXP Employee

you can use "cat /sys/class/thermal/thermal_zone0/temp" to get the CPU temperature.

在原帖中查看解决方案

10 回复数
9,685 次查看
justin_jiang
NXP Employee
NXP Employee

The internal thermal sensor need calibration data which is burned in fuse to get an accurate temperature..

0 项奖励
回复
9,685 次查看
justin_jiang
NXP Employee
NXP Employee

This is not real degrees for temp. All the chip will get calibrations and you can use this data to get real temp with calibration data.

0 项奖励
回复
9,685 次查看
jonathanjuges
Contributor I

Hi,

Whenever I run: 

"cat /sys/class/thermal/thermal_zone0/temp"

I get:

42932

or similar numbers (42334).

Can anybody tell me what's going on? Thanks! 

0 项奖励
回复
9,685 次查看
himanshugusain
Contributor III

Hi

I am using kernel 3.10.53

How can temperature be determined here

since i can see below entries in

/sys/devices/virtual/thermal

cooling_device0

cooling_device1

thermal_zone0

thermal_zone1

Regards

Himanshu

0 项奖励
回复
9,685 次查看
justin_jiang
NXP Employee
NXP Employee

check the entry of thermal_zone0

9,686 次查看
justin_jiang
NXP Employee
NXP Employee

you can use "cat /sys/class/thermal/thermal_zone0/temp" to get the CPU temperature.

9,685 次查看
anjalikkrishna
Contributor III

Hi ,

 I recently did a short study on the temperature related stuffs and I saw when my yocto BSP is booting in i.MX6 Solo it shows the temperature as 41 degree Celsius and the print comes from the U-boot code which handles the temperature sensor part  So I believe it is the temperature sensor value which is nothing but the on-die temperature

Then I checked the /sys/class/thermal/thermalzone1/temp  value which is 43 degree Celsius . According to your answer, the sysfs shows CPU temperature. I can across various kind of temperature such as case temperature, junction temperature, die-temperature  when the actual CPU temperature is considered. Can you be specific  which temperature /sys/class/thermal/thermalzone1/temp actually points to .

Thanks & Regards,

Anjali

0 项奖励
回复
9,685 次查看
SantiagoVillafu
Contributor II

Hello, is that temperature given in Celsius degrees or Fahrenheit degrees? Thanks!

cat /sys/class/thermal/thermal_zone0/temp

53

0 项奖励
回复
9,685 次查看
justin_jiang
NXP Employee
NXP Employee

Celsius degrees

9,685 次查看
carmilili
Contributor III

Thank you for your help.

0 项奖励
回复