XMC42_800WPSU_LLC
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
ADC configuration

Files

file  adc.c
 ADC peripheral configuration.
 
file  adc.h
 ADC peripheral configuration header.
 

Functions

void VADC_Init (void)
 Configuration and initialization of the ADC peripheral.
Global, group, channels and results are configured. Queue is configured and initialize. Pointer to the ADC measurements are defined. More...
 

Global ADC configuration

const XMC_VADC_GLOBAL_CONFIG_t g_global_config
 

Group ADC configuration

const XMC_VADC_GROUP_CONFIG_t g_group0_config
 
const XMC_VADC_GROUP_CONFIG_t g_group1_config
 

Channel ADC configuration

const XMC_VADC_CHANNEL_CONFIG_t g0_channel6_config
 
const XMC_VADC_CHANNEL_CONFIG_t g1_channel6_config
 
const XMC_VADC_CHANNEL_CONFIG_t g0_channel3_config
 
const XMC_VADC_CHANNEL_CONFIG_t g0_channel5_config
 

Result ADC configuration

const XMC_VADC_RESULT_CONFIG_t g_result3_handle
 
const XMC_VADC_RESULT_CONFIG_t g_result7_handle
 
const XMC_VADC_RESULT_CONFIG_t g_result15_handle
 

Queue ADC configuration

const XMC_VADC_QUEUE_CONFIG_t g_queue_config
 
const XMC_VADC_QUEUE_ENTRY_t g_queue_entry1
 
const XMC_VADC_QUEUE_ENTRY_t g_queue_entry2
 

Detailed Description

Function Documentation

void VADC_Init ( void  )

Configuration and initialization of the ADC peripheral.
Global, group, channels and results are configured. Queue is configured and initialize. Pointer to the ADC measurements are defined.

Returns
None

LLC_ADC_concept.png
800W server power supply LLC ADC scheduling

Definition at line 241 of file adc.c.

References ADCResult_12V, ADCResult_12VOr, ADCResult_iOut, ADCResult_iR, CH3, CH5, CH6, g0_channel3_config, g0_channel5_config, g0_channel6_config, g1_channel6_config, g_global_config, g_group0_config, g_group1_config, g_queue_config, g_queue_entry1, g_queue_entry2, g_result15_handle, g_result3_handle, g_result7_handle, MASTER, RES15_CH5, RES3_CH3, RES7_CHx, and SLAVE.

Referenced by main().

Variable Documentation

const XMC_VADC_CHANNEL_CONFIG_t g0_channel3_config
Initial value:
=
{
.input_class = XMC_VADC_CHANNEL_CONV_GROUP_CLASS0,
.result_reg_number = RES3_CH3,
.channel_priority = true,
.alias_channel = XMC_VADC_CHANNEL_ALIAS_DISABLED,
.alternate_reference = XMC_VADC_CHANNEL_REF_ALT_CH0
}

G0 Channel3 (Iout) configuration data

Definition at line 138 of file adc.c.

Referenced by VADC_Init().

const XMC_VADC_CHANNEL_CONFIG_t g0_channel5_config
Initial value:
=
{
.input_class = XMC_VADC_CHANNEL_CONV_GROUP_CLASS0,
.result_reg_number = RES15_CH5,
.channel_priority = true,
.alias_channel = XMC_VADC_CHANNEL_ALIAS_DISABLED,
.alternate_reference = XMC_VADC_CHANNEL_REF_ALT_CH0
}

G0 Channel5 (resonat current) configuration data

Definition at line 148 of file adc.c.

Referenced by VADC_Init().

const XMC_VADC_CHANNEL_CONFIG_t g0_channel6_config
Initial value:
=
{
.input_class = XMC_VADC_CHANNEL_CONV_GROUP_CLASS0,
.result_reg_number = RES7_CHx,
.channel_priority = true,
.alias_channel = XMC_VADC_CHANNEL_ALIAS_DISABLED,
.sync_conversion = SYNC_REQUIRED,
.alternate_reference = XMC_VADC_CHANNEL_REF_ALT_CH0
}

G0 Channel6 (12VDC-Oring) configuration data

Definition at line 117 of file adc.c.

Referenced by VADC_Init().

const XMC_VADC_CHANNEL_CONFIG_t g1_channel6_config
Initial value:
=
{
.input_class = XMC_VADC_CHANNEL_CONV_GROUP_CLASS0,
.result_reg_number = RES7_CHx,
.channel_priority = true,
.alias_channel = XMC_VADC_CHANNEL_ALIAS_DISABLED,
.alternate_reference = XMC_VADC_CHANNEL_REF_ALT_CH0
}

G1 Channel6 (12VDC) configuration data

Definition at line 128 of file adc.c.

Referenced by VADC_Init().

const XMC_VADC_GLOBAL_CONFIG_t g_global_config
Initial value:
=
{
.disable_sleep_mode_control = true,
.module_disable = false,
.class0 =
{
.conversion_mode_standard = XMC_VADC_CONVMODE_12BIT,
.sample_time_std_conv = 3U,
.conversion_mode_emux = XMC_VADC_CONVMODE_12BIT,
.sampling_phase_emux_channel = 3U,
},
.class1 = {
.conversion_mode_standard = XMC_VADC_CONVMODE_12BIT,
.sample_time_std_conv = 3U,
.conversion_mode_emux = XMC_VADC_CONVMODE_12BIT,
.sampling_phase_emux_channel = 3U
},
.clock_config =
{
.analog_clock_divider = 0,
.msb_conversion_clock = 0,
.arbiter_clock_divider = 0
},
}

Initialization data of VADC Global resources

Definition at line 61 of file adc.c.

Referenced by VADC_Init().

const XMC_VADC_GROUP_CONFIG_t g_group0_config
Initial value:
=
{
.class0 =
{
.conversion_mode_standard = XMC_VADC_CONVMODE_12BIT,
.sample_time_std_conv = 3U,
}
}

Initialization data of VADC group 0

Definition at line 92 of file adc.c.

Referenced by VADC_Init().

const XMC_VADC_GROUP_CONFIG_t g_group1_config
Initial value:
=
{
.class0 =
{
.conversion_mode_standard = XMC_VADC_CONVMODE_12BIT,
.sample_time_std_conv = 3U,
}
}

Initialization data of VADC group 1

Definition at line 102 of file adc.c.

Referenced by VADC_Init().

const XMC_VADC_QUEUE_CONFIG_t g_queue_config
Initial value:
=
{
.conv_start_mode = XMC_VADC_STARTMODE_CIR,
.req_src_priority = XMC_VADC_GROUP_RS_PRIORITY_3,
.src_specific_result_reg = INDIVIDUAL_RESULT_REGISTERS,
.trigger_signal = XMC_VADC_REQ_TR_J,
.trigger_edge = XMC_VADC_TRIGGER_EDGE_RISING,
.external_trigger = TRIGGER_ENABLE
}

Queue configuration

Definition at line 195 of file adc.c.

Referenced by VADC_Init().

const XMC_VADC_QUEUE_ENTRY_t g_queue_entry1
Initial value:
=
{
.channel_num = CH6,
.refill_needed = true,
.generate_interrupt = false,
.external_trigger = true
}

Queue Entry 1: 12VDC and 12VDC-Oring (synchronized)

Definition at line 206 of file adc.c.

Referenced by VADC_Init().

const XMC_VADC_QUEUE_ENTRY_t g_queue_entry2
Initial value:
=
{
.channel_num = CH3,
.refill_needed = true,
.generate_interrupt = false,
.external_trigger = false
}

Queue Entry 2: output current

Definition at line 215 of file adc.c.

Referenced by VADC_Init().

const XMC_VADC_RESULT_CONFIG_t g_result15_handle
Initial value:
= {
.post_processing_mode = XMC_VADC_DMM_REDUCTION_MODE,
.data_reduction_control = 0,
.part_of_fifo = 0,
.wait_for_read_mode = (bool) false,
.event_gen_enable = (bool) false
}

Resonant current Result configuration data

Definition at line 181 of file adc.c.

Referenced by VADC_Init().

const XMC_VADC_RESULT_CONFIG_t g_result3_handle
Initial value:
= {
.post_processing_mode = XMC_VADC_DMM_REDUCTION_MODE,
.data_reduction_control = 0,
.part_of_fifo = 0,
.wait_for_read_mode = (bool) false,
.event_gen_enable = (bool) false
}

Output current Result configuration data

Definition at line 163 of file adc.c.

Referenced by VADC_Init().

const XMC_VADC_RESULT_CONFIG_t g_result7_handle
Initial value:
= {
.post_processing_mode = XMC_VADC_DMM_REDUCTION_MODE,
.data_reduction_control = 0,
.part_of_fifo = 0,
.wait_for_read_mode = (bool) false,
.event_gen_enable = (bool) false
}

Output voltages (output and oring) Result configuration data

Definition at line 172 of file adc.c.

Referenced by VADC_Init().