SPRAD70 March   2023 AM2631 , AM2631 , AM2631-Q1 , AM2631-Q1 , AM2632 , AM2632 , AM2632-Q1 , AM2632-Q1 , AM2634 , AM2634 , AM2634-Q1 , AM2634-Q1

 

  1.   Abstract
  2.   Trademarks
  3. 1Introduction
  4. 2Applications
  5. 3Usage With AM263X
    1. 3.1 Obtaining the Register Values to Program in INA226
    2. 3.2 Programming the Register Values Using the Provided I2C Code in INA226
    3. 3.3 Obtaining the Register Values to Program in INA228
    4. 3.4 Programming the Register Values Using the Provided I2C Code in INA228
  6. 4References

Programming the Register Values Using the Provided I2C Code in INA226

  1. Input the INA part being used (INA226/INA228) as shown below:
    #define INA226     (0X01) //1 - INAA26 is used, 0 - INA228 is used
  2. Input the voltage rail that needs to be monitored as shown below:

    #define RAIL_1V2 (0x01) //1 - 1.2V rail to be monitored, 0 - 3.3V rail to be monitored
    Note: In this example, 1.2V voltage rail is being monitored using the INA with I2C device address 0x41.To monitor the 3.3V rail, the INA with the device address 0x40 needs to be used.
  3. Input the value of the Calibration Register value obtained in the previous section under the macros “INA226_REG_CALIBRATION_MSB_VALUE” (with the Most significant Byte) and “INA226_REG_CALIBRATION_LSB_VALUE” (with the Least Significant Byte).
    #define INA226_REG_CALIBRATION_MSB_VALUE   (0x14)  /* Input from user */
    #define INA226_REG_CALIBRATION_MSB_VALUE   (0x00)  /* Input from user */
  4. Configuration Register is programmed with the default value of 0x4127 as explained in the previous step.
  5. Run the provided project on CCS and obtain the Current, Shunt Voltage and Bus Voltage and Power value on the console output as shown in the image below.
    GUID-20230228-SS0I-NHGC-P72N-RDKC6MM9KD8M-low.png Figure 3-1 CCS Console Output
  6. Input these values in the excel to calculate the actual Current, Shunt Voltage and Bus Voltage and Power values by multiplying with the corresponding LSB values.
  7. In #GUID-5F367697-D6CF-4472-8A04-C6405C003BB7, the following output values were obtained:
    GUID-20230228-SS0I-BGKF-1HBG-N1RMTLXJXBFL-low.png Figure 3-2 Measurements Obtained Highlighted