![]() |
Kinetis SDK v.1.2 Demo Applications User's Guide
Rev. 0
Freescale Semiconductor, Inc.
|
#include <stdint.h>
#include "fsl_os_abstraction.h"
Go to the source code of this file.
Data Structures | |
struct | lowPowerAdcBoundaries_t |
Boundaries struct. More... | |
Functions | |
void | LowPowerTimerIRQHandler (void) |
Low Power Timer Interrupt handler. Clear LPT Compare flag. More... | |
void | ADC1IRQHandler (void) |
ADC Interrupt handler. Get current ADC value and set conversionCompleted flag. More... | |
void | InitLowPowerTmr (void) |
Initialize Low Power Timer. Use 1 kHz LPO with no preescaler and enable LPT interrupt. More... | |
void | calibrateParams (void) |
Parameters calibration: VDD and ADCR_TEMP25. More... | |
int32_t | init_adc (uint32_t instance) |
Initialize the ADCx for HW trigger. More... | |
int32_t | GetCurrentTempValue (void) |
Calculate current temperature. More... | |
lowPowerAdcBoundaries_t | TempSensorCalibration (uint32_t updateBoundariesCounter, int32_t *tempArray) |
Calculate current temperature. More... | |
void | ADC_InstallCallback (uint32_t instance, uint32_t chnGroup, void(*callbackFunc)(void)) |
User-defined function to install callback. More... | |
uint16_t | ADC_GetConvValueRAWInt (uint32_t instance, uint32_t chnGroup) |
User-defined function to read conversion value in ADC ISR. More... | |
void ADC1IRQHandler | ( | void | ) |
uint16_t ADC_GetConvValueRAWInt | ( | uint32_t | instance, |
uint32_t | chnGroup | ||
) |
void ADC_InstallCallback | ( | uint32_t | instance, |
uint32_t | chnGroup, | ||
void(*)(void) | callbackFunc | ||
) |
User-defined function to install callbach.
void calibrateParams | ( | void | ) |
Parameters calibration: VDD and ADCR_TEMP25
This function used BANDGAP as reference voltage to measure vdd and calibrate V_TEMP25 with that vdd value.
This function used BANDGAP as reference voltage to measure vdd and calibrate V_TEMP25 with that vdd value.
Parameters calibration: VDD and ADCR_TEMP25
ADC value of BANDGAP
VDD in mV
ADC value of BANDGAP
VDD in mV
int32_t GetCurrentTempValue | ( | void | ) |
Calculate current temperature.
int32_t init_adc | ( | uint32_t | instance | ) |
instance | The ADC instance number |
void InitLowPowerTmr | ( | void | ) |
void LowPowerTimerIRQHandler | ( | void | ) |
lowPowerAdcBoundaries_t TempSensorCalibration | ( | uint32_t | updateBoundariesCounter, |
int32_t * | tempArray | ||
) |
updateBoundariesCounter | Indicate number of values into tempArray. |
tempArray | Store temperature value. |
Calculate current temperature.