|
XMC42_800WPSU_LLC
|
Files | |
| file | init_bckgnd.c |
| Functions for SW initialization and running in the background during operation. | |
| file | init_bckgnd.h |
| Functions for SW initialization and running in the background during operation. Header file. | |
Functions | |
| void | time_counter () |
| Time counter is a background process to count "real-time" in the application. More... | |
| void | control_loop_init () |
| Assign value to the coefficients of voltage loop. Set the voltage target. Reset the state and output of the compensator. More... | |
| void | fan_temp_control () |
| Fan management. More... | |
| void | I_MON_update () |
| DAC output to report load level. More... | |
Variables | |
| static uint32_t | fan_speed_value |
| static int16_t | IMON_DAC_value = 0 |
| __I uint32_t * | Fsw_capture |
Time counters | |
| uint8_t | _1ms_count = 0 |
| uint16_t | _100ms_count = 0 |
| volatile uint8_t | time_BOP = 1 |
| volatile uint8_t | time_INIT = 50 |
| static uint8_t | time_fan_100ms = 1 |
| static uint8_t | time_IMON_us = 3 |
| static int16_t | fan_pwm_duty = 0 |
| volatile uint16_t | time_OCP_M_100ms = 0 |
| volatile uint16_t | time_OCP_S_100ms = 0 |
| volatile uint8_t | time_send_UART = 6 |
| void control_loop_init | ( | void | ) |
Assign value to the coefficients of voltage loop.
Set the voltage target.
Reset the state and output of the compensator.
Definition at line 158 of file init_bckgnd.c.
References controller_t::a, burst_status, controller_t::error, controller_t::fIn_peak, controller_t::fOut_peak, FREQ_OPERATION, Fsw_capture, controller_t::int_ref, controller_t::int_ref_steady, Kd, Ki, Kp, LLC, LLC_PERIOD_MAX, controller_t::output, controller_t::output_int, controller_t::output_int_limit, LLC_t::q12V_oring, controller_t::qOut_peak, LLC_t::qVout, controller_t::soft_start, controller_t::state, voltage_int_ctr, and VOUT_TARGET.
Referenced by main(), state_control(), and voltage_loop().
| void fan_temp_control | ( | void | ) |
Fan management.
Definition at line 235 of file init_bckgnd.c.
References fan_duty_set(), fan_pwm_duty, fan_speed_value, T_MIN_PWM, T_SLOPE_PWM, Temp_fan, and time_fan_100ms.
Referenced by main().
| void I_MON_update | ( | void | ) |
DAC output to report load level.
Definition at line 284 of file init_bckgnd.c.
References IMON_DAC_value, LLC, LLC_t::qIout, and time_IMON_us.
Referenced by main().
| void time_counter | ( | void | ) |
Time counter is a background process to count "real-time" in the application.
Pointer to the captured time for fan speed
Definition at line 93 of file init_bckgnd.c.
References _100ms_count, _1ms_count, LIMIT_100_MICRO_S, LIMIT_100_MILI_S, LIMIT_1_MILI_S, ST_RUNNING, status_reg, time_BOP, time_count_100kHz, time_fan_100ms, time_IMON_100kHz, time_IMON_us, time_INIT, time_OCP_M_100ms, time_OCP_S_100ms, and time_send_UART.
Referenced by main().
| uint16_t _100ms_count = 0 |
100ms counter (1ms base).
Definition at line 58 of file init_bckgnd.c.
Referenced by time_counter().
| uint8_t _1ms_count = 0 |
1ms counter (100kHz ISR base).
Definition at line 57 of file init_bckgnd.c.
Referenced by time_counter().
|
static |
Fan speed timer. 25kHz period (3199 CLK max).
Definition at line 64 of file init_bckgnd.c.
Referenced by fan_temp_control().
|
static |
Variable to read the fan speed
Definition at line 71 of file init_bckgnd.c.
Referenced by fan_temp_control().
| __I uint32_t* Fsw_capture |
Pointer to the captured time for frequency during start-up. Necessary in comparison driven start-up. Not used in current implementation
Definition at line 77 of file init_bckgnd.c.
Referenced by control_loop_init().
|
static |
Variable to calculate current monitoring DAC value
Definition at line 74 of file init_bckgnd.c.
Referenced by I_MON_update().
| volatile uint8_t time_BOP = 1 |
Defined time to start the converter for the first time (1ms base).
Definition at line 59 of file init_bckgnd.c.
Referenced by state_control(), and time_counter().
|
static |
Fan control timer (100ms base).
Definition at line 62 of file init_bckgnd.c.
Referenced by fan_temp_control(), and time_counter().
|
static |
Current monitoring timer (100us base).
Definition at line 63 of file init_bckgnd.c.
Referenced by I_MON_update(), and time_counter().
| volatile uint8_t time_INIT = 50 |
Defined time to resume converter converter operation after a fault (1ms base).
Definition at line 61 of file init_bckgnd.c.
Referenced by state_control(), and time_counter().
| volatile uint16_t time_OCP_M_100ms = 0 |
Intermediate OCP timer (100ms base).
Definition at line 65 of file init_bckgnd.c.
Referenced by over_current_protection(), and time_counter().
| volatile uint16_t time_OCP_S_100ms = 0 |
Soft OCP timer (100ms base).
Definition at line 66 of file init_bckgnd.c.
Referenced by over_current_protection(), and time_counter().
| volatile uint8_t time_send_UART = 6 |
Period to send information to primary side (100us base)
Definition at line 67 of file init_bckgnd.c.
Referenced by time_counter(), and uart_send().