H4-PFC Infineon 1600W Server PSU
 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. Scan is configured and load event generated. 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_group_config
 

Channel ADC configuration

const XMC_VADC_CHANNEL_CONFIG_t g1_channel3_config
 
const XMC_VADC_CHANNEL_CONFIG_t g1_channel5_config
 
const XMC_VADC_CHANNEL_CONFIG_t g1_channel6_config
 
const XMC_VADC_CHANNEL_CONFIG_t g1_channel7_config
 

Result ADC configuration

const XMC_VADC_RESULT_CONFIG_t g_result0_handle
 
const XMC_VADC_RESULT_CONFIG_t g_result1_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
 

Scan ADC configuration

const XMC_VADC_SCAN_CONFIG_t g_scan_config
 

Background ADC configuration

const XMC_VADC_BACKGROUND_CONFIG_t g_backgnd_config
 

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. Scan is configured and load event generated. Pointer to the ADC measurements are defined.

Returns
None
PFC_ADC_concept.png
1600W server power supply H4-PFC ADC strategy

Variable Documentation

const XMC_VADC_CHANNEL_CONFIG_t g1_channel3_config
Initial value:
=
{
.input_class = XMC_VADC_CHANNEL_CONV_GROUP_CLASS0,
.result_reg_number = RES0_CH3,
.channel_priority = true,
.alias_channel = XMC_VADC_CHANNEL_ALIAS_DISABLED
}
const XMC_VADC_CHANNEL_CONFIG_t g1_channel5_config
Initial value:
=
{
.input_class = XMC_VADC_CHANNEL_CONV_GROUP_CLASS0,
.result_reg_number = RES1_CH5,
.channel_priority = true,
.alias_channel = XMC_VADC_CHANNEL_ALIAS_DISABLED
}
const XMC_VADC_CHANNEL_CONFIG_t g1_channel6_config
Initial value:
=
{
.input_class = XMC_VADC_CHANNEL_CONV_GROUP_CLASS0,
.result_reg_number = RES7_CH6,
.channel_priority = true,
.alias_channel = XMC_VADC_CHANNEL_ALIAS_DISABLED,
}
const XMC_VADC_CHANNEL_CONFIG_t g1_channel7_config
Initial value:
=
{
.input_class = XMC_VADC_CHANNEL_CONV_GROUP_CLASS0,
.result_reg_number = RES15_CH7,
.channel_priority = true,
.alias_channel = XMC_VADC_CHANNEL_ALIAS_DISABLED
}
const XMC_VADC_BACKGROUND_CONFIG_t g_backgnd_config
Initial value:
=
{
.conv_start_mode = XMC_VADC_STARTMODE_CIR,
.req_src_priority = XMC_VADC_GROUP_RS_PRIORITY_2,
.src_specific_result_reg = INDIVIDUAL_RESULT_REGISTERS,
.external_trigger = TRIGGER_ENABLE,
.trigger_signal = XMC_VADC_REQ_TR_J,
.trigger_edge = XMC_VADC_TRIGGER_EDGE_RISING
}
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 = 0U,
.conversion_mode_emux = XMC_VADC_CONVMODE_12BIT,
.sampling_phase_emux_channel = 0U,
},
.class1 = {
.conversion_mode_standard = XMC_VADC_CONVMODE_12BIT,
.sample_time_std_conv = 0U,
.conversion_mode_emux = XMC_VADC_CONVMODE_12BIT,
.sampling_phase_emux_channel = 0U
},
.clock_config =
{
.analog_clock_divider = 1,
.msb_conversion_clock = 0,
.arbiter_clock_divider = 0
},
}
const XMC_VADC_GROUP_CONFIG_t g_group_config
Initial value:
=
{
.class0 =
{
.conversion_mode_standard = XMC_VADC_CONVMODE_12BIT,
.sample_time_std_conv = 0U,
},
.class1 =
{
.conversion_mode_standard = XMC_VADC_CONVMODE_FASTCOMPARE,
.sample_time_std_conv = 0U
},
.boundary0 = DCM_ZERO_UPDELTA,
.boundary1 = DCM_ZERO_LOWDELTA
}
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_I,
.trigger_edge = XMC_VADC_TRIGGER_EDGE_RISING,
.external_trigger = TRIGGER_ENABLE
}
const XMC_VADC_QUEUE_ENTRY_t g_queue_entry1
Initial value:
=
{
.channel_num = CH6,
.refill_needed = true,
.generate_interrupt = true,
.external_trigger = true
}
const XMC_VADC_QUEUE_ENTRY_t g_queue_entry2
Initial value:
=
{
.channel_num = CH5,
.refill_needed = true,
.generate_interrupt = false,
.external_trigger = false
}
const XMC_VADC_RESULT_CONFIG_t g_result0_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
}
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
}
const XMC_VADC_RESULT_CONFIG_t g_result1_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
}
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
}
const XMC_VADC_SCAN_CONFIG_t g_scan_config
Initial value:
=
{
.conv_start_mode = XMC_VADC_STARTMODE_WFS,
.req_src_priority = XMC_VADC_GROUP_RS_PRIORITY_1,
.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
}