xWRL6432 MMWAVE-L-SDK  05.04.00.01

Introduction

This module contains APIs to program and use the INA Sensor. See INA for more details.

Functions

void SensorConfig228 (I2C_Handle i2cHandle, uint8_t i2cTargetAddress, uint32_t config0Val, uint32_t config1Val, uint32_t shuntTempVal, uint32_t calibVal)
 Configure INA228 sensor. More...
 
float currentRead228 (I2C_Handle i2cHandle, uint8_t i2cTargetAddress, uint32_t currentLsb)
 Read INA228 sensor Current value. More...
 

Macros

#define INA228_CONFIG_REG0   (0x00)
 
#define INA228_CONFIG_REG1   (0x01)
 
#define INA228_CURRENT_REG   (0x7)
 
#define INA228_CALIB_REG   (0x2)
 
#define INA228_SHUNT_TEMP_REG   (0x3)
 
#define INA228_DIE_ID_REG   (0x3f)
 
#define INA228_DIE_ID_REG_VALUE   (552U)
 

Macro Definition Documentation

◆ INA228_CONFIG_REG0

#define INA228_CONFIG_REG0   (0x00)

◆ INA228_CONFIG_REG1

#define INA228_CONFIG_REG1   (0x01)

◆ INA228_CURRENT_REG

#define INA228_CURRENT_REG   (0x7)

◆ INA228_CALIB_REG

#define INA228_CALIB_REG   (0x2)

◆ INA228_SHUNT_TEMP_REG

#define INA228_SHUNT_TEMP_REG   (0x3)

◆ INA228_DIE_ID_REG

#define INA228_DIE_ID_REG   (0x3f)

◆ INA228_DIE_ID_REG_VALUE

#define INA228_DIE_ID_REG_VALUE   (552U)

Function Documentation

◆ SensorConfig228()

void SensorConfig228 ( I2C_Handle  i2cHandle,
uint8_t  i2cTargetAddress,
uint32_t  config0Val,
uint32_t  config1Val,
uint32_t  shuntTempVal,
uint32_t  calibVal 
)

Configure INA228 sensor.

Parameters
i2cHandle[in] Handle to I2C driver
i2cTargetAddress[in] INA Sensor address
config0Val[in] To enable/disable Temperature compensation
config1Val[in] ADC Mode
shuntTempVal[in] Shunt temperature coefficient value to compensate for temperature based effects
calibVal[in] The shunt calibration is a measure of the current resolution for the measurements and is derived based on Max current measurable by the design

◆ currentRead228()

float currentRead228 ( I2C_Handle  i2cHandle,
uint8_t  i2cTargetAddress,
uint32_t  currentLsb 
)

Read INA228 sensor Current value.

Parameters
i2cHandle[in] Handle to I2C driver
i2cTargetAddress[in] INA Sensor address
currentLsb[in] Current resolution for the measurements
Returns
Current value in mA