Changes

Jump to: navigation, search

DESK-XZ7-L/Peripherals/Temperature sensor

2,293 bytes added, 24 January
Created page with "<section begin=History/> {| style="border-collapse:collapse; " !colspan="4" style="width:100%; text-align:left"; border-bottom:solid 2px #ededed"|History |- !style="border-le..."
<section begin=History/>
{| style="border-collapse:collapse; "
!colspan="4" style="width:100%; text-align:left"; border-bottom:solid 2px #ededed"|History
|-
!style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#73B2C7; padding:5px; color:white"|Issue Date
!style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#73B2C7; padding:5px; color:white"|Notes
|-
|style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#ededed; padding:5px; color:#000000"|2023/01/23
|style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#ededed; padding:5px; color:#000000"|DESK-XZ7-L-1.0.1 release
|-
|}
<section end=History/>
<section begin=Body/>

== Temperature sensors ==
Bora and BoraX SOMs has a [http://www.ti.com/lit/ds/symlink/tmp422.pdf TMP421AIDCN] temperature sensor onboard.

The following commands can be issued from command line in order to get the SOM temperatue:
* read the PCB temperature
<pre>
root@bora:~# cat /sys/devices/soc0/axi/e0004000.i2c/i2c-0/0-004f/hwmon/hwmon1/temp1_input
</pre>
the returned value has to be divided by 1000 for a °C temperature
* read the CPU temperature
<pre>
root@bora:~# cat /sys/devices/soc0/axi/e0004000.i2c/i2c-0/0-004f/hwmon/hwmon1/temp2_input
</pre>
the returned value has to be divided by 1000 for a °C temperature

Moreover, the SOC has an internal temperature sensor device which can be read using the following shell script:
<pre>
root@bora:~# cat temp.sh
#!/bin/sh

# Tcpu
TEMP_RAW=`cat /sys/devices/soc0/axi/f8007100.adc//iio\:device1/in_temp0_raw`
TEMP_OFFSET=`cat /sys/devices/soc0/axi/f8007100.adc//iio\:device1/in_temp0_offset`
TEMP_SCALE=`cat /sys/devices/soc0/axi/f8007100.adc//iio\:device1/in_temp0_scale`
TEMP=`awk "BEGIN {print (($TEMP_RAW+$TEMP_OFFSET)*$TEMP_SCALE)/1000}"`

echo "Cpu Temp: ${TEMP}"
root@bora:~# chmod u+x temp.sh
root@bora:~# ./temp.sh
Cpu Temp: 46.0172
</pre>
<section end=Temperature sensors/>

<section end=Body/>

----

[[Category:BORA]]
dave_user
427
edits

Navigation menu