Astra 开发套件的功率测量
Later revisions of Astra RDK contain the two power monitor ICs which can be used to measure the current and voltage of the system. Values can be read using the Linux Kernel’s Hardware Monitoring Interface .
Astra RDK uses the TI INA220 Current and Power Monitor and TI INA3221 Shunt and Bus Voltage Monitor ICs.
Documentation for the hwmon kernel drivers can be found here: ina220 and ina3221 .
执行测量
Here is an example of reading Current (mA) channels on SL1640:
cat /sys/class/hwmon/hwmon0/curr1_input (ina322)
856
cat /sys/class/hwmon/hwmon0/curr2_input (ina322)
32
cat /sys/class/hwmon/hwmon0/curr3_input (ina322)
60
cat /sys/class/hwmon/hwmon1/curr1_input (ina2xx)
7
cat /sys/class/hwmon/hwmon2/curr1_input (ina2xx)
67
cat /sys/class/hwmon/hwmon3/curr1_input(ina2xx)
63
Here is an example of reading Bus voltage (mV) channels on SL1640:
cat /sys/class/hwmon/hwmon0/in1_input (ina322)
800
cat /sys/class/hwmon/hwmon0/in2_input (ina322)
840
cat /sys/class/hwmon/hwmon0/in3_input (ina322)
1104
cat /sys/class/hwmon/hwmon1/in1_input (ina2xx)
624
cat /sys/class/hwmon/hwmon2/in1_input (ina2xx)
3384
cat /sys/class/hwmon/hwmon3/in1_input (ina2xx)
1860
Here is an example of reading Power (uW) channels on SL1640:
cat /sys/class/hwmon/hwmon1/power1_input
0
cat /sys/class/hwmon/hwmon2/power1_input
220000
class/hwmon/hwmon3/power1_input
140000
In this example we can calculate total power:
856 * 800 = 684800 uW
32 * 840 = 26880 uW
60 * 1104 = 66240 uW
Total Power = 1137920uW = 1138mW
已支持的板卡
Initial versions of Astra RDK did not contain the power monitor ICs. The following table shows the Core Modules and I/O boards which can be used for power measurement.
SoC
Core Module
I/O Board
SL1620
Rev D or later
Rev D or later
SL1640
Rev B or later
Rev D or later
SL1680
Rev C or later
Rev D or later