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.

[FAQ] [参考译文] [常见问题解答] TDA4AEN-Q1:如何使用板载 INA226测量 Linux 上的功耗

Guru**** 2455450 points
Other Parts Discussed in Thread: INA226

请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1486644/faq-tda4aen-q1-how-to-measure-power-consumption-on-linux-using-the-on-board-ina226

器件型号:TDA4AEN-Q1
Thread 中讨论的其他器件:INA226

工具与软件:

我们是否可以使用 Linux 来启用板载 INA226实例以测量功耗?

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好!

    使用以下补丁、我们可以启用 INA226来测量 TDA4AEN/AM67-EVM 上的功耗。

    e2e.ti.com/.../0001_2D00_arm64_2D00_dts_2D00_ti_2D00_k3_2D00_j722s_2D00_evm_2D00_Add_2D00_INA226_2D00_nodes_2D00_for_2D00_power.patch

    将上述补丁下载到:

    $SDK_Path/board-support/ti-linux-kernel-6.6.44+git-ti
    cd $SDK_Path/board-support/ti-linux-kernel-6.6.44+git-ti
    git am 0001-arm64-dts-ti-k3-j722s-evm-Add-INA226-nodes-for-power.patch
    cd ../..
    make linux


    安装新 dtb to SD 卡的步骤:

    编辑$SDK_Path/Rules.make 文件 sudh、使其满足 ROOTFS_PART=/media/$USER/root 要求
    插入10.1 SDK 的 SD 卡。

    sudo make linux-install

    在执行上述步骤后使用 SD 引导后、您可以在 Linux 中看到 hwmon 接口、给出了实时功率值:

    root@j722s-evm:~# cat /sys/class/hwmon/hwmon*/power1_input
    1962500
    81250
    12500
    81250
    0
    18750
    18750
    5281250
    181250
    68750
    81250
    
    Above are the power numbers in micro Watts
    
    root@j722s-evm:~# cat /sys/class/hwmon/hwmon*/in1_input                                                                                                          
    863
    850
    3300
    1798
    749
    1800
    1798
    3300
    1099
    3295
    1801
    
    Above are the voltage rails in milli Volts

    注意:我已使用最新的10.1 Linux SDK 来启用此功能。

    此致、
    基尔西