|
PFC:800WPSUC7-4pin
|
Files | |
| file | init_bckgnd_funct.c |
| Functions for SW initialization and running in the background during operation. | |
| file | init_bckgnd_funct.h |
| Header of the functions for SW initialization and running in the background during operation. | |
Functions | |
| void | MATH_DIV_config () |
| DIV kernel of the MATH co-processor initialization. Used in the input RMS feedforward. More... | |
| void | temperature_sense_enable (void) |
| Enable the internal temperature sensor and set the measurement pointer. More... | |
| void | control_loop_init () |
| Assign value to the coefficients of voltage and current loops. Reset the state and output of both controllers. More... | |
| void | IIR_param_init (void) |
| Filter coefficients initialization. IIR filter of the AC voltage to obtain the RMS value. IIR notch filter of the DC voltage to obtain the DC value. Both filters are two-section second order IIR filters executed at 3250Hz, every 2 cycles of CCU40.CC41 @ 6.5kHz. More... | |
| void | time_counter () |
| Time counter is a background process to count "real-time" in the application. More... | |
| void | delay_100us (uint32_t time) |
| Delay function. More... | |
| void | input_voltage_observer () |
| BOP protection, checking AVG input voltage. The function modifies the control status register and turns off PWM. More... | |
| void | fan_control_temp_protection () |
| Temperature monitoring: protection and fan control. More... | |
Variables | |
| volatile bool | power_stage_ON = false |
AC voltage filter variables | |
| volatile IIR_lowpass_int_t | ACfilter |
| volatile int32_t | auxAC = 0 |
DC-bus voltage filter variables | |
| volatile IIR_lowpass_int_t | DCfilter |
| volatile int32_t | auxDC = 0 |
Controller structures | |
| volatile controller_int_t | voltage_int_ctr |
| volatile controller_PI_t | current_PI_ctr |
Temperature variables | |
| static volatile const uint16_t * | temp_amb_dig |
Time counters | |
| uint8_t | _1ms_count = 0 |
| uint8_t | _100ms_count = 0 |
| uint8_t | time_BOP = 0 |
| uint8_t | time_ACOK = 0 |
| uint8_t | time_PLD_68V = 0 |
| uint8_t | time_PLD_75V = 0 |
| uint8_t | time_V_step = 0 |
| uint8_t | time_INIT = 30 |
Input voltage monitoring flags | |
| static bool | BOP_flag_75V = false |
| static bool | BOP_flag_68V = false |
| void control_loop_init | ( | void | ) |
Assign value to the coefficients of voltage and current loops.
Reset the state and output of both controllers.
| void delay_100us | ( | uint32_t | time | ) |
Delay function.
| time | Wait time in multiples of 100us |
| void fan_control_temp_protection | ( | void | ) |
Temperature monitoring: protection and fan control.
| void IIR_param_init | ( | void | ) |
Filter coefficients initialization.
IIR filter of the AC voltage to obtain the RMS value.
IIR notch filter of the DC voltage to obtain the DC value.
Both filters are two-section second order IIR filters executed at 3250Hz, every 2 cycles of CCU40.CC41 @ 6.5kHz.
| void input_voltage_observer | ( | void | ) |
BOP protection, checking AVG input voltage.
The function modifies the control status register and turns off PWM.
| void MATH_DIV_config | ( | void | ) |
DIV kernel of the MATH co-processor initialization.
Used in the input RMS feedforward.
|
inline |
Enable the internal temperature sensor and set the measurement pointer.
| void time_counter | ( | void | ) |
Time counter is a background process to count "real-time" in the application.
| uint8_t _100ms_count = 0 |
100ms counter.
| uint8_t _1ms_count = 0 |
1ms counter.
| volatile IIR_lowpass_int_t ACfilter |
Filter instance
| volatile int32_t auxAC = 0 |
Scaled AC voltage for filter operation
| volatile int32_t auxDC = 0 |
Scaled DC voltage for filter operation
|
static |
PLD voltage flag.
|
static |
PLD voltage flag.
| volatile controller_PI_t current_PI_ctr |
Current controller.
| volatile IIR_lowpass_int_t DCfilter |
Filter instance
| volatile bool power_stage_ON = false |
State Machine and protection set if the Power Stage (PWM) can be turned on or it must be turned off.
|
static |
Ambient temperature from XMC die.
| uint8_t time_ACOK = 0 |
Not used, debugging of LCDO detection
| uint8_t time_BOP = 0 |
Not used, debugging of start-up sequence
| uint8_t time_INIT = 30 |
Counter to start/resume operation.
| uint8_t time_PLD_68V = 0 |
Counter for PLD timing definition.
| uint8_t time_PLD_75V = 0 |
Counter for PLD timing definition.
| uint8_t time_V_step = 0 |
Counter to define time step between voltage ramp in PFC soft-start.
| volatile controller_int_t voltage_int_ctr |
Voltage controller.