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

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
 

Detailed Description

Function Documentation

void fan_temp_control ( void  )

Fan management.

Returns
None

Definition at line 236 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.

Returns
None

Definition at line 285 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

Returns
None

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().

Variable Documentation

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().

int16_t fan_pwm_duty = 0
static

Fan speed timer. 25kHz period (3199 CLK max).

Definition at line 64 of file init_bckgnd.c.

Referenced by fan_temp_control().

uint32_t fan_speed_value
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

Definition at line 77 of file init_bckgnd.c.

Referenced by control_loop_init().

int16_t IMON_DAC_value = 0
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().

uint8_t time_fan_100ms = 1
static

Fan control timer (100ms base).

Definition at line 62 of file init_bckgnd.c.

Referenced by fan_temp_control(), and time_counter().

uint8_t time_IMON_us = 3
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().