Macros | Functions | Variables
Mcu_Adc.c File Reference
#include "Mcu_Adc_Handle.h"
#include "BCDS_MCU_DMA_Handle.h"
#include "Mcu_Adc.h"
#include "em_adc.h"
#include "em_cmu.h"
#include "em_timer.h"
#include "em_prs.h"
#include "BSP_Adc.h"
#include "XdkCommonInfo.h"
+ Include dependency graph for Mcu_Adc.c:

Macros

#define ADC_MAX_SAMPLING_FREQUENCY   UINT32_C(45000)
 
#define ADC_MIN_SAMPLING_FREQUENCY   UINT32_C(6)
 
#define MASK_IEN_ADC_SCAN   UINT32_C(0x02)
 
#define MASK_IEN_ADC_SINGLE   UINT32_C(0x01)
 
#define PRS_CHANNEL_NO_ADC_FROM_TIMER0   (adcPRSSELCh0)
 
#define PRS_CHANNEL_NO_TIMER0_TO_ADC   (0)
 

Functions

void Adc_McuIrqCallback (ADC_T adc)
 
static void Adc_PrsChannelSetup (void)
 
static Retcode_T Adc_SamplingTimerSetup (uint32_t samplingFreqInHz)
 
static uint8_t findNoOfScanChannel (uint32_t channelMask)
 
Retcode_T Mcu_Adc_DeInitialize (ADC_T adc)
 See interface function description in Mcu_Adc.h. More...
 
Retcode_T Mcu_Adc_Initialize (ADC_T adc, Mcu_Adc_Callback_T callback)
 See interface function description in Mcu_Adc.h. More...
 
Retcode_T Mcu_Adc_StartScan (ADC_T adc, Mcu_Adc_ConfigScanPtr_T configScan)
 See interface function description in Mcu_Adc.h. More...
 
Retcode_T Mcu_Adc_StartSingle (ADC_T adc, Mcu_Adc_ConfigSinglePtr_T configStart)
 See interface function description in Mcu_Adc.h. More...
 
Retcode_T Mcu_Adc_StopScan (ADC_T adc)
 See interface function description in Mcu_Adc.h. More...
 
static void McuAdcDmaScanChannelCb (ADC_T adc)
 
static void McuAdcDmaSingleChannelCb (ADC_T adc)
 

Variables

static uint16_t * globalBufferSwitchPtr = NULL
 
static uint16_t ReqNoOfSamplesInScan = 0
 
const ADC_SingleInput_TypeDef singleChannelArray [ADC_ENABLE_CH_MAX]
 

Macro Definition Documentation

#define ADC_MAX_SAMPLING_FREQUENCY   UINT32_C(45000)
#define ADC_MIN_SAMPLING_FREQUENCY   UINT32_C(6)
#define MASK_IEN_ADC_SCAN   UINT32_C(0x02)
#define MASK_IEN_ADC_SINGLE   UINT32_C(0x01)
#define PRS_CHANNEL_NO_ADC_FROM_TIMER0   (adcPRSSELCh0)
#define PRS_CHANNEL_NO_TIMER0_TO_ADC   (0)

Function Documentation

void Adc_McuIrqCallback ( ADC_T  adc)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void Adc_PrsChannelSetup ( void  )
static

+ Here is the caller graph for this function:

static Retcode_T Adc_SamplingTimerSetup ( uint32_t  samplingFreqInHz)
static

+ Here is the caller graph for this function:

static uint8_t findNoOfScanChannel ( uint32_t  channelMask)
static

+ Here is the caller graph for this function:

Retcode_T Mcu_Adc_DeInitialize ( ADC_T  adc)

De-initialize and powers down the ADC interface.

+ Here is the caller graph for this function:

Retcode_T Mcu_Adc_Initialize ( ADC_T  adc,
Mcu_Adc_Callback_T  callback 
)

Initialize the ADC Interface.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Retcode_T Mcu_Adc_StartScan ( ADC_T  adc,
Mcu_Adc_ConfigScanPtr_T  configScan 
)

Start Scan Mode on ADC Interface & Start the PRS Timer as producer.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Retcode_T Mcu_Adc_StartSingle ( ADC_T  adc,
Mcu_Adc_ConfigSinglePtr_T  configStart 
)

Start Single Mode on ADC Interface.

+ Here is the caller graph for this function:

Retcode_T Mcu_Adc_StopScan ( ADC_T  adc)

Stop the Scan mode on ADC Interface and stops the PRS timer used for sampling adc channels.

+ Here is the caller graph for this function:

static void McuAdcDmaScanChannelCb ( ADC_T  adc)
static

+ Here is the caller graph for this function:

static void McuAdcDmaSingleChannelCb ( ADC_T  adc)
static

+ Here is the caller graph for this function:

Variable Documentation

uint16_t* globalBufferSwitchPtr = NULL
static
uint16_t ReqNoOfSamplesInScan = 0
static
const ADC_SingleInput_TypeDef singleChannelArray[ADC_ENABLE_CH_MAX]
Initial value:
= { adcSingleInpCh4, adcSingleInpCh5, adcSingleInpCh6, adcSingleInpCh7,
adcSingleInpTemp, adcSingleInpVDDDiv3, adcSingleInpVDD, adcSingleInpVSS, adcSingleInpVrefDiv2 }

This documentation file has been automatically generated on Wed May 6 2020 20:45:06 by doxygen 1.8.8