|  | Dual Active Bridge Development Board (Part-No. ) |
Content |  |  |  |  |  |

Loading...
Searching...
No Matches
Files | Data Structures | Functions | Variables
Current Sensor Calibration
Device Layer

The Current Sensor Calibration device layer is a proprietary user code utilized for configuring the sensor properties. More...

Collaboration diagram for Current Sensor Calibration:

## Files
file | dev_current_sensor.c
| Contains current sensor initialization and calibration evaluation.
file | dev_current_sensor.h
| Contains current sensor public functions.

## Data Structures
struct | SENSOR_OFFSET_CAL_s
| Stores data related to sensor calibration, including data related to sensor offset. More...

## Functions
static void __inline__ | Dev_SensorOffsetCal (SENSOR_OFFSET_CAL_t *sensor, uint16_t adcReading)
| Measure the sensor offset.
void | Dev_CurrentSensorOffsetCal (void)
| Measures the currents sensor offset.
uint16_t | Dev_CurrentSensor_Get_CalibrationStatus (void)
| API function to get the calibration status.
uint16_t | Dev_CurrentSensor_Get_Offset (void)
| API function to get the sensor offset.
void | Dev_CurrentSensor_Clr_Offset (void)
| API function to clear the sensor offset.

## Variables
SENSOR_OFFSET_CAL_t | isecAvgCurrentSensor
| Data Object of sensor offset calibration.

## Detailed Description

## Function Documentation

## ◆ Dev_CurrentSensor_Clr_Offset()

void Dev_CurrentSensor_Clr_Offset | ( | void |  | ) |

Returns
  none

Definition at line 121 of file dev_current_sensor.c.

Here is the caller graph for this function:

## ◆ Dev_CurrentSensor_Get_CalibrationStatus()

uint16_t Dev_CurrentSensor_Get_CalibrationStatus | ( | void |  | ) |

Returns
  true calibration complete
  false calibration is not complete

Definition at line 101 of file dev_current_sensor.c.

Here is the caller graph for this function:

## ◆ Dev_CurrentSensor_Get_Offset()

uint16_t Dev_CurrentSensor_Get_Offset | ( | void |  | ) |

Returns
  value current sensor offset value

Definition at line 111 of file dev_current_sensor.c.

Here is the caller graph for this function:

## ◆ Dev_CurrentSensorOffsetCal()

void Dev_CurrentSensorOffsetCal | ( | void |  | ) |

Returns
  void

This function continuously evaluate the current sensor ADC value until the calibration has been completed.

Definition at line 87 of file dev_current_sensor.c.

Here is the call graph for this function:
Here is the caller graph for this function:

## ◆ Dev_SensorOffsetCal()

static void __inline__ Dev_SensorOffsetCal | ( | SENSOR_OFFSET_CAL_t * | sensor,
|  | uint16_t | adcReading
| ) |  |
| static

Parameters

  sensor | pointer to object of type SENSOR_OFFSET_CAL_t
  adcReading | most recent ADC reading

Returns
  void

This function takes number of samples of adc sample for averaging before acquiring the sensor offset value and checks if it is in the acceptable range before setting the calibration bit complete.

Definition at line 57 of file dev_current_sensor.c.

Here is the caller graph for this function:

## Variable Documentation

## ◆ isecAvgCurrentSensor

SENSOR_OFFSET_CAL_t isecAvgCurrentSensor

Initial value:
= {.CalibrationComplete = false,
.Accumulator = 0,
.MeasurementCounter = 0,
.LimitHigh = ISEC_AVG_SENSOR_OFFSET_LIMIT_HIGH,
.LimitLow = ISEC_AVG_SENSOR_OFFSET_LIMIT_LOW}
ISEC_AVG_SENSOR_OFFSET_LIMIT_LOW
#define ISEC_AVG_SENSOR_OFFSET_LIMIT_LOW
Definition macros.h:84
ISEC_AVG_SENSOR_OFFSET_LIMIT_HIGH
#define ISEC_AVG_SENSOR_OFFSET_LIMIT_HIGH
Definition macros.h:83

The 'isecAvgCurrentSensor' data object holds the averaging parameter of the sensor offset calibration.

Definition at line 40 of file dev_current_sensor.c.