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

Loading...
Searching...
No Matches
Files | Functions | Variables
Temperature Detection
Device Layer

The Temperature device layer is the proprietary user code used to configure and detect the board temperature. More...

Collaboration diagram for Temperature Detection:

## Files
file | dev_temp.h
| Contains temperature initialization and execution functions.

## Functions
void | Dev_Temp_Initialize (void)
| Initializes the temperature data structure.
void | Dev_Temp_Task_100ms (void)
| Executes the Temperature reading every 100ms.
uint16_t | Dev_Temp_AverageValue (void)
| Returns the average adc temperature reading.
int8_t | Dev_Temp_Get_Temperature_Celcius (void)
| This converts the raw values to temperature celcius as per device lookup table.
uint8_t | Dev_Temp_Is_Over_Temperature (void)
| Returns the status of the Over Temperature flag.
void | Dev_Temp_Get_ADC_Sample (void)
| Gets the temperature ADC sample.
static uint16_t | Average_Temp_ADC_Samples (void)
| Returns the temperature average value.
static uint16_t | Temp_Calculate_Average (uint16_t *buffer, uint16_t length)
| Averages the temperature ADC samples.

## Variables
TEMP_SETTINGS_t | devTempData
| Data Object of temperature settings.

## Detailed Description

## Function Documentation

## ◆ Average_Temp_ADC_Samples()

static uint16_t Average_Temp_ADC_Samples | ( | void |  | ) |
| static

Returns
  void

This function returns the average result of the temperature ADC samples.

Definition at line 139 of file dev_temp.c.

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

## ◆ Dev_Temp_AverageValue()

uint16_t Dev_Temp_AverageValue | ( | void |  | ) |

Returns
  void

This function returns the average ADC temperature reading.

Definition at line 73 of file dev_temp.c.

## ◆ Dev_Temp_Get_ADC_Sample()

void Dev_Temp_Get_ADC_Sample | ( | void |  | ) |

Returns
  void

This function gets the temperature ADC sample and adds it to the temperature buffer for averaging use.

< store last 128 values and then average

< flag to monitor if full then do averaging.

Definition at line 117 of file dev_temp.c.

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

## ◆ Dev_Temp_Get_Temperature_Celcius()

int8_t Dev_Temp_Get_Temperature_Celcius | ( | void |  | ) |

Returns
  void

This function takes in the current adc values and get the closest high temperature value in the lookup table. i.e. if the averaged value is 3195, it will return the temperature value corresponding to 3079 i.e. 65. This value is offset by 40 degrees to avoid working with negative.

Definition at line 87 of file dev_temp.c.

Here is the caller graph for this function:

## ◆ Dev_Temp_Initialize()

void Dev_Temp_Initialize | ( | void |  | ) |

Returns
  void

This function initializes the temperature data structure.

< Over temperature flag

< if Sensor is present

< temperature raw

< temperature raw

< temperature celcius.

Definition at line 45 of file dev_temp.c.

## ◆ Dev_Temp_Is_Over_Temperature()

uint8_t Dev_Temp_Is_Over_Temperature | ( | void |  | ) |

Returns
  true Over temperature is detected
  false Over temperature is not detected

This function returns the status of the Over Temperature flag.

Definition at line 105 of file dev_temp.c.

## ◆ Dev_Temp_Task_100ms()

void Dev_Temp_Task_100ms | ( | void |  | ) |

Returns
  void

This function executes temperature reading every 100ms

Definition at line 60 of file dev_temp.c.

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

## ◆ Temp_Calculate_Average()

static uint16_t Temp_Calculate_Average | ( | uint16_t * | buffer,
|  | uint16_t | length
| ) |  |
| static

Returns
  void

This function averages the temperature ADC samples.

Definition at line 153 of file dev_temp.c.

Here is the caller graph for this function:

## Variable Documentation

## ◆ devTempData

TEMP_SETTINGS_t devTempData

The 'devTempData' data object holds the settings for temperature sensor.

Definition at line 30 of file dev_temp.c.