Bar Logo Dual Active Bridge Development Board (Part-No. )
 
Content
     
Loading...
Searching...
No Matches
drv_custom_config_adc.h
Go to the documentation of this file.
1
8#ifndef DRV_CUSTOM_CONFIG_ADC_H
9#define DRV_CUSTOM_CONFIG_ADC_H
10
11
12#include "adc/adc1.h"
14
15
19// ADC channels numbers for shared ADC
20#define ADC_CHANNEL_VSEC (2)
21#define ADC_CHANNEL_IPRI_CT (7)
22#define ADC_CHANNEL_VPRI (10)
23#define ADC_CHANNEL_TEMP (14)
24#define ADC_CHANNEL_VRAIL_5V (19)
25
26// ADC channel numbers for dedicated ADC
27#define ADC_CHANNEL_ISEC_CT (0)
28#define ADC_CHANNEL_ISEC_AVG (1)
// end of group ~~~~~~~~~~~~~~~~~~~~
30
31
39static __inline__ void DRV_Config_Custom_ADC(void)
40{
41
42 // use ADC filter 1 for primary voltage averaging
46 ADC_Filter_Enable(0, true);
47
48 // use ADC filter 1 for secondary voltage averaging
52 ADC_Filter_Enable(1, true);
53
54}
55
56
57#endif /* DRV_CUSTOM_CONFIG_ADC_H */
58
This is the generated driver header file for the ADC1 driver.
Contains public functions and defines for the MCC code extension for ADC.
static void ADC_Filter_Input(uint16_t filterIndex, uint16_t channelIndex)
Sets the ADC instance to be filtered.
#define ADC_CHANNEL_VSEC
ADC2 is routed to Secondary Voltage.
static void ADC_Filter_Mode(uint16_t filterIndex, ADC_FILTER_MODE_t mode)
Sets the ADC instance filter mode.
static void ADC_Filter_Enable(uint16_t filterIndex, bool enable)
Enables the ADC filter feature of the ADC.
static void ADC_Filter_Averaging(uint16_t filterIndex, ADC_FILTER_OVRSAM_AVG_t averagingRatio)
Sets the ADC instance number of samples to average.
static __inline__ void DRV_Config_Custom_ADC(void)
Customize configuration for ADC.
#define ADC_CHANNEL_VPRI
ADC10 is routed to Primary Voltage.
@ ADC_FILTER_MODE_AVERAGING
@ ADC_FILTER_OVRSAM_AVG_4x