Project

General

Profile

Query - Example Baseboard I2C Power Monitor

Added by Sandeep Sivadas over 1 year ago

Hi,

We tested the i2C power monitor as per the below link and got the result as shown below.
https://support.criticallink.com/redmine/projects/mitysom_am57x/wiki/Example_Baseboard_I2C_Power_Monitor

root@mitysom-am57x:/sys/class/hwmon/hwmon1# tail *input
> curr1_input <
7300
> in1_input <
5000
> in2_input <
988
> power1_input <
36500000

As per the calculation provided in the wiki page the current drawn is 7300/1000 = 7.3A

Please clarify the Note: provided in the wiki page
Note: An early version of the LTC2945 driver assumed a resistor value different from the actual resistor value used on the development kit. This difference resulted in values for the current and power which were 10 times larger than the actual values. A change to the driver was made and committed to Linux to correct this. The formulas shown below assume the newer driver is being used.

With regards

Sandeep S


Replies (1)

RE: Query - Example Baseboard I2C Power Monitor - Added by Michael Williamson over 1 year ago

The original linux kernel driver for the LTC2945 has a 0.001 Ohm resistor value hardcoded in the logic that converts measured voltage across the sense resistor to current.

Our current / released board design has been using 0.01 Ohms as the sense resistor. So the original driver was computing the current with a 10x error (it was reporting a current value that was 10x higher than what is actually passing through the current resistor).

We have pushed a patch into the mainline (and our latest kernel sources on our git server) that allows the value of the resistor to be loaded out of the device tree, so that you can program in the 0.01 Ohm value instead of the 0.001 value that is assumed by the driver. This will result in the correct current / power readback (if you have the patch applied).

With regards,
Mike

    (1-1/1)
    Go to top
    Add picture from clipboard (Maximum size: 1 GB)