![]() |
Kinetis SDK v.1.2 Demo Applications User's Guide
Rev. 0
Freescale Semiconductor, Inc.
|
#include <stdlib.h>
#include <stdint.h>
#include <stdio.h>
#include "fsl_adc16_driver.h"
#include "fsl_pit_driver.h"
#include "fsl_clock_manager.h"
#include "fsl_pmc_hal.h"
#include "board.h"
#include "lpm_rtos.h"
Go to the source code of this file.
Macros | |
#define | CHANNEL_0 |
#define | INPUT_SIGNAL_FREQ |
#define | NR_SAMPLES |
#define | ADCR_VDD |
These values are used to get the temperature. DO NOT MODIFY The method used in this demo to calculate temperature of chip is mapped to Temperature Sensor for the HCS08 Microcontroller Family document (Document Number: AN3031) More... | |
#define | V_BG |
#define | V_TEMP25 |
#define | M |
#define | STANDARD_TEMP |
#define | ADC16_TEMPERATURE_CHN |
#define | ADC16_BANDGAP_CHN |
Functions | |
void | adc1IrqHandler (void) |
ADC1 IRQ handler. More... | |
void | adc16CalibrateParams (void) |
calibrate param for adc. More... | |
int32_t | adc16GetCurrentTempValue (void) |
Getting current temperature value. More... | |
int | adc16Init (adc16_converter_config_t *adcUserConfig, adc16_chn_config_t *adcChnConfig, adc16_calibration_param_t *adcCalibraitionParam) |
Initialize the ADCx for HW trigger. More... | |
void | adc16PrintTemperature (void) |
Print temperature got from adc. More... | |
void | adc16InitPitTriggerSource (uint32_t adcInstance) |
void | adc16DeinitPitTriggerSource (uint32_t adcInstance) |
void | ADC_InstallCallback (uint32_t instance, uint32_t chnGroup, void(*callbackFunc)(void)) |
User-defined function to install callbach. More... | |
uint16_t | ADC_GetConvValueRAWInt (uint32_t instance, uint32_t chnGroup) |
User-defined function to read conversion value in ADC ISR. More... | |
Variables | |
int32_t | gTemperature |
const uint32_t | gSimBaseAddr [] |
volatile uint8_t | gConversionCompleteFlag |
#define ADC16_BANDGAP_CHN |
#define ADC16_TEMPERATURE_CHN |
#define ADCR_VDD |
#define CHANNEL_0 |
#define INPUT_SIGNAL_FREQ |
#define M |
#define NR_SAMPLES |
number of samples in one period
#define STANDARD_TEMP |
#define V_BG |
#define V_TEMP25 |
void adc16CalibrateParams | ( | void | ) |
ADC value of BANDGAP
VDD in mV
void adc16DeinitPitTriggerSource | ( | uint32_t | adcInstance | ) |
disable the trigger source
int32_t adc16GetCurrentTempValue | ( | void | ) |
int adc16Init | ( | adc16_converter_config_t * | adcUserConfig, |
adc16_chn_config_t * | adcChnConfig, | ||
adc16_calibration_param_t * | adcCalibraitionParam | ||
) |
void adc16InitPitTriggerSource | ( | uint32_t | adcInstance | ) |
enable the trigger source
instance | The ADC instance number |
disable the trigger source
enable the trigger source
instance | The ADC instance number |
enable the trigger source
instance | The ADC instance number |
void adc16PrintTemperature | ( | void | ) |
void adc1IrqHandler | ( | void | ) |
ADC1 IRQ handler.
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.
volatile uint8_t gConversionCompleteFlag |
const uint32_t gSimBaseAddr[] |
Temperature.
int32_t gTemperature |