Contain functions and data types as MCC extension for ADC. More...
Files | |
file | drv_custom_config_adc.h |
Contains ADC initialization that was not supported by MCC generated code. | |
file | drv_mcc_extension_adc.h |
Contains public functions and defines for the MCC code extension for ADC. | |
Enumerations | |
enum | ADC_FILTER_MODE_e { ADC_FILTER_MODE_OVERSAMPLING = 0 , ADC_FILTER_MODE_AVERAGING = 3 } |
ADC Filter Modes of operation. More... | |
enum | ADC_FILTER_OVRSAM_AVG_e { ADC_FILTER_OVRSAM_AVG_2x = 0 , ADC_FILTER_OVRSAM_AVG_4x = 1 , ADC_FILTER_OVRSAM_AVG_8x = 2 , ADC_FILTER_OVRSAM_AVG_16x = 3 , ADC_FILTER_OVRSAM_AVG_32x = 4 , ADC_FILTER_OVRSAM_AVG_64x = 5 , ADC_FILTER_OVRSAM_AVG_128x = 6 , ADC_FILTER_OVRSAM_AVG_256x = 7 } |
ADC Filter Oversampling Ratio when in averaging mode. More... | |
Functions | |
static __inline__ void | DRV_Config_Custom_ADC (void) |
Customize configuration for ADC. | |
static void | ADC_Filter_Enable (uint16_t filterIndex, bool enable) |
Enables the ADC filter feature of the ADC. | |
static void | ADC_Filter_Mode (uint16_t filterIndex, ADC_FILTER_MODE_t mode) |
Sets the ADC instance filter mode. | |
static void | ADC_Filter_Averaging (uint16_t filterIndex, ADC_FILTER_OVRSAM_AVG_t averagingRatio) |
Sets the ADC instance number of samples to average. | |
static void | ADC_Filter_Input (uint16_t filterIndex, uint16_t channelIndex) |
Sets the ADC instance to be filtered. | |
static uint16_t | ADC_Filter_GetResult (uint16_t filterIndex) |
Gets the ADC filter result. | |
#define | ADC_CHANNEL_VSEC (2) |
ADC2 is routed to Secondary Voltage. | |
#define | ADC_CHANNEL_IPRI_CT (7) |
ADC7 is routed to Primary CT Current. | |
#define | ADC_CHANNEL_VPRI (10) |
ADC10 is routed to Primary Voltage. | |
#define | ADC_CHANNEL_TEMP (14) |
ADC14 is routed to Temperature. | |
#define | ADC_CHANNEL_VRAIL_5V (19) |
ADC19 is routed to 5V rail. | |
#define | ADC_CHANNEL_ISEC_CT (0) |
ADC0 is routed to Secondary CT Current. | |
#define | ADC_CHANNEL_ISEC_AVG (1) |
ADC1 is routed to Secondary Average Current. | |
This documentation includes functions and data types for the ADC peripheral as an enhancement to the MCC Code Configurator. It provides application-specific ADC functions and includes essential ADC initialization that is not supported by the code generated by MCC.
#define ADC_CHANNEL_IPRI_CT (7) |
Definition at line 21 of file drv_custom_config_adc.h.
#define ADC_CHANNEL_ISEC_AVG (1) |
Definition at line 28 of file drv_custom_config_adc.h.
#define ADC_CHANNEL_ISEC_CT (0) |
Definition at line 27 of file drv_custom_config_adc.h.
#define ADC_CHANNEL_TEMP (14) |
Definition at line 23 of file drv_custom_config_adc.h.
#define ADC_CHANNEL_VPRI (10) |
Definition at line 22 of file drv_custom_config_adc.h.
#define ADC_CHANNEL_VRAIL_5V (19) |
Definition at line 24 of file drv_custom_config_adc.h.
#define ADC_CHANNEL_VSEC (2) |
Definition at line 20 of file drv_custom_config_adc.h.
enum ADC_FILTER_MODE_e |
<>
Enumerator | |
---|---|
ADC_FILTER_MODE_OVERSAMPLING | |
ADC_FILTER_MODE_AVERAGING |
Definition at line 20 of file drv_mcc_extension_adc.h.
<>
Definition at line 32 of file drv_mcc_extension_adc.h.
|
inlinestatic |
<>
filterIndex | ADC filter index (four indexes available for ADC filter) |
averagingRatio | Pointer to a power control data object of type ADC_FILTER_OVRSAM_AVG_t |
This function sets the number of samples to average in the particular ADC instance.
Definition at line 116 of file drv_mcc_extension_adc.h.
|
inlinestatic |
<>
filterIndex | ADC filter index (four indexes available for ADC filter) |
enable | ADC filter enable |
This function enables the ADC feature of the ADC instance.
Definition at line 54 of file drv_mcc_extension_adc.h.
|
inlinestatic |
<>
filterIndex | ADC filter index (four indexes available for ADC filter) |
This function gives the value of the ADC filter output.
Definition at line 178 of file drv_mcc_extension_adc.h.
|
inlinestatic |
<>
filterIndex | ADC filter index (four indexes available for ADC filter) |
channelIndex | ADC channel |
This function sets up the ADC filter for the specific ADC instance.
Definition at line 146 of file drv_mcc_extension_adc.h.
|
inlinestatic |
<>
filterIndex | ADC filter index (four indexes available for ADC filter) |
mode | Pointer to a power control data object of type ADC_FILTER_MODE_t |
This function set the ADC instance filter mode either OverSampling mode or Averaging mode.
Definition at line 85 of file drv_mcc_extension_adc.h.
|
static |
This function initializes the ADC module to use the ADC Filter mode (averaging mode) to some of the ADC being sampled in the application.
Definition at line 39 of file drv_custom_config_adc.h.