J7 系列 SoC 上有多个片上传感器。如何使用 Linux 读取温度?
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
J7 系列 SoC 具有多个片上传感器,可读取不同域中的 SoC 温度。
这些传感器包含在 VTM 模块中。VTM 表示电压热管理模块。
所有传感器基本上都通过执行 ADC 转换来读出温度并输出数字值,
并且我们使用多项式方程来生成 ADC 值与温度的查找表,反之亦然。
例如,在 J721e/TDA4VM 上:
在 Linux SDK 上: https://www.ti.com/tool/download/PROCESSOR-SDK-LINUX-J721E
我们需要在上面添加 2 个补丁来使用 Linux 获取温度读数。
下表列出了 J721e 和 J7200 多个 Linux SDK 版本的补丁 zip 文件。当我们有更新的 SDK 和更新的 J7 SoC 系列器件时,此信息将更新。
添加补丁、编译映像并将更新的映像复制到 SD 卡的步骤:
Download the specific SDK/SOC zip file that is required & rename it as vtm.zip Unzip the vtm.zip to the $PSDK_Linux/board-support/linux-* folder cd $PSDK_PATH/board-support/linux-* git am vtm/* cd ../.. make linux Insert the Linux SDK SD card. Edit the file $PSDK_PATH/Rules.make Set DESTDIR=/media/$USER/rootfs cd $PSDK_PATH sudo make linux_install
SoC |
SDK 8.0 上的补丁 |
SDK 7.3 上的补丁 |
SDK 7.1 上的补丁 |
SDK 7.0 上的补丁 |
J721e/TDA4VM |
||||
J7200 |
不适用 |
不适用 |
不适用 |
使用更新的映像引导 Linux 后,我们可以使用以下命令读取温度:
cat cat /sys/class/thermal/thermal_zone*/temp
报告的温度将以毫摄氏度为单位。