|
XMC42_800WPSU_LLC
|
Control interrupts header file. More...
Go to the source code of this file.
Data Structures | |
| union | msg_t |
| struct | LLC_t |
| struct | controller_t |
Macros | |
| #define | CSG_rise_ISR IRQ_Hdlr_75 |
PWM and SR timing related definitions | |
| #define | LLC_PERIOD_MAX 1600 |
| #define | LLC_PERIOD_MIN 266 |
| #define | LINEAR_PR_STEP 3 |
| #define | LLC_COMP_TIME 22 |
| #define | DEADTIME_TEST 12 |
| #define | MIN_DEADTIME 13U |
| #define | DEADTIME_SLOPE 2457 |
| #define | DEADTIME_0Hz 43 |
| #define | DEADTIME_BURST 28 |
| #define | START_FREQ 177 |
| #define | PR_START 152 |
| #define | DUTY_START 28 |
| #define | PR_START_SEQ 111 |
| #define | DUTY_START_SEQ1 39 |
| #define | DUTY_START_SEQ2 47 |
| #define | ADC_START 14 |
| #define | DEADTIME_R_COMP 9 |
| #define | DEADTIME_R_START 10 |
| #define | DEADTIME_F_COMP -9 |
| #define | DEADTIME_F_START 10 |
| #define | DRIVER_DELAY_COMP -9 |
| #define | DELAY_SR_ON 26 |
| #define | BELOW_FREQ 888 |
| #define | RES_FREQ 536 |
| #define | DELAY_SR_OFF_BELOW_1 263+26 |
| #define | DELAY_SR_OFF_BELOW_2 225+30 |
| #define | DELAY_SR_OFF_ABOVE 37-24 |
| #define | PERIOD_LLC_TEST 200 |
| #define | SHADOW_TRANSFER_LLC_SR (CCU8_GCSS_S2SE_Msk|CCU8_GCSS_S1SE_Msk|CCU8_GCSS_S0SE_Msk) |
| #define | SHADOW_TRANSFER_LLC_SR_CLEAR (CCU8_GCSC_S2SC_Msk|CCU8_GCSC_S1SC_Msk|CCU8_GCSC_S0SC_Msk) |
Bootstrap capacitor charge | |
| #define | CHARGE_HS_TOTAL 6 |
| #define | CHARGE_HS_LOW 1 |
Input voltage limits | |
| #define | VDC_BUS_START 11288 |
| #define | VDC_BUS_START_HYST 11344 |
| #define | VDC_BUS_STOP 9640 |
| #define | VDC_BUS_DATA_OK 1448 |
Output voltage limits | |
| #define | VOUT_TARGET 16055 |
| #define | VOUT_ORING_ON 15457 |
| #define | VOUT_SR_ON 13248 |
| #define | VOUT_OVP_LATCH 18350 |
| #define | VOUT_BURST_DIFF 197 |
| #define | VOUT_F_JUMP_DIFF 0 |
| #define | VOUT_BURST VOUT_TARGET+VOUT_BURST_DIFF |
| #define | VOUT_F_JUMP VOUT_TARGET+VOUT_F_JUMP_DIFF |
Output current protection | |
| #define | IOUT_OCP_LATCH_HARD 3194 |
| #define | IOUT_OCP_LATCH_MED 3010 |
| #define | IOUT_OCP_LATCH_SOFT 2928 |
| #define | IOUT_OCP_LATCH_SOFT_CLEAR 2887 |
| #define | LS1_HS0_PWM 0x100 |
| #define | LS0_HS1_PWM 0x80 |
Shifting for ADC related variables and calculation | |
| #define | Q15_PRODUCT_SHIFT 15 |
| #define | ADC_TO_Q15 3 |
| #define | V_TARGET_STEP 7 |
Peaking filter (IIR) coefficients | |
| #define | a1_peak -1.98622f |
| #define | a2_peak 0.9862674721f |
| #define | b1_peak 1.99858f |
| #define | b2_peak -0.99862772985841f |
Typedefs | |
| typedef enum fault | fault_t |
| typedef enum burst_mode | burst_mode_t |
| typedef enum ramp_loop_mode | ramp_loop_mode_t |
Enumerations | |
| enum | state_t { ST_INIT = 0x0, ST_STB = 0x01, ST_CHARGE = 0x02, ST_SOFT_START = 0x04, ST_SOFT_START_SR = 0x08, ST_RUNNING = 0x10, ST_BURST = 0x20, ST_OCP = 0x100, ST_LATCH = 0x200 } |
| enum | fault { F_INIT = 0x0, F_OVP = 0x01, F_OCP_H = 0x02, F_OCP_M = 0x04, F_OCP_S = 0x08, F_UVP = 0x10, F_SC = 0x20 } |
| enum | burst_mode { FREQ_OPERATION = 0, BURST_ON = 1 } |
| enum | ramp_loop_mode { ramp = 0, loop = 1 } |
Functions | |
| __STATIC_INLINE void | sync_OFF () |
| __STATIC_INLINE void | sync_ON () |
| __STATIC_INLINE void | PWM_OFF () |
| __STATIC_INLINE void | PWM_ON () |
| __STATIC_INLINE void | ORING_ON () |
| __STATIC_INLINE void | ORING_OFF () |
| __STATIC_INLINE void | LED_ON_DCOK () |
| __STATIC_INLINE void | LED_OFF_DCNOTOK () |
| __STATIC_INLINE void | ENABLE_SEC_ON () |
| __STATIC_INLINE void | ENABLE_SEC_OFF () |
| __STATIC_INLINE void | over_voltage_protection () |
| __STATIC_INLINE void | over_current_protection () |
Variables | |
| __IO uint32_t * | ADCResult_iR |
| __IO uint32_t * | ADCResult_12V |
| __IO uint32_t * | ADCResult_12VOr |
| __IO uint32_t * | ADCResult_iOut |
| volatile controller_t | voltage_int_ctr |
| volatile uint16_t | time_count_100kHz |
| volatile uint16_t | time_IMON_100kHz |
| static volatile uint8_t | OCP_hard_count = 0 |
| volatile uint8_t | start_sequence_count |
| volatile state_t | status_reg |
| volatile fault_t | fault_reg |
| volatile burst_mode_t | burst_status |
| volatile LLC_t | LLC |
| volatile uint16_t | Temp_fan |
| #define a1_peak -1.98622f |
Definition at line 254 of file interrupts_control.h.
| #define a2_peak 0.9862674721f |
Definition at line 255 of file interrupts_control.h.
| #define ADC_START 14 |
ADC trigger of the first pulse in asymmetric PWM.
Definition at line 112 of file interrupts_control.h.
Referenced by main(), and state_control().
| #define ADC_TO_Q15 3 |
ADC normalization shift (Q15)
Definition at line 244 of file interrupts_control.h.
Referenced by control_loop_ISR(), and state_control().
| #define b1_peak 1.99858f |
Definition at line 257 of file interrupts_control.h.
| #define b2_peak -0.99862772985841f |
Definition at line 258 of file interrupts_control.h.
| #define BELOW_FREQ 888 |
Different SR timing at very low frequencies.
Definition at line 133 of file interrupts_control.h.
Referenced by voltage_loop().
| #define CHARGE_HS_LOW 1 |
Number of ISR cycles with low LS during HS cap charging sequence
Definition at line 163 of file interrupts_control.h.
Referenced by state_control().
| #define CHARGE_HS_TOTAL 6 |
Total number of ISR cycles for HS cap charging sequence
Definition at line 160 of file interrupts_control.h.
| #define CSG_rise_ISR IRQ_Hdlr_75 |
Definition of comparator interrupt
Definition at line 59 of file interrupts_control.h.
| #define DEADTIME_0Hz 43 |
Dead time at 0Hz for dead time calculation.
Definition at line 88 of file interrupts_control.h.
Referenced by burst_mode(), and voltage_loop().
| #define DEADTIME_BURST 28 |
Fixed dead time at burst mode operation (300kHz operation).
Definition at line 91 of file interrupts_control.h.
| #define DEADTIME_F_COMP -9 |
Rising edge dead time compensation of different driver. In case of asymmetric driving. Not for C7-4pin version.
Definition at line 121 of file interrupts_control.h.
| #define DEADTIME_F_START 10 |
Falling edge dead time in asymmetric PWM. In case of asymmetric driving. Not for C7-4pin version.
Definition at line 124 of file interrupts_control.h.
Referenced by main(), and state_control().
| #define DEADTIME_R_COMP 9 |
Rising edge dead time compensation of different driver. In case of asymmetric driving. Not for C7-4pin version.
Definition at line 115 of file interrupts_control.h.
| #define DEADTIME_R_START 10 |
Rising edge dead time in asymmetric PWM. In case of asymmetric driving. Not for C7-4pin version.
Definition at line 118 of file interrupts_control.h.
Referenced by main(), and state_control().
| #define DEADTIME_SLOPE 2457 |
Slope for the dead time calculation under 200kHz operation.
Definition at line 85 of file interrupts_control.h.
Referenced by burst_mode(), and voltage_loop().
| #define DEADTIME_TEST 12 |
Dead-time used for pulse debugging.
Definition at line 79 of file interrupts_control.h.
| #define DELAY_SR_OFF_ABOVE 37-24 |
Above resonance turn off delay
Definition at line 143 of file interrupts_control.h.
Referenced by burst_mode(), and voltage_loop().
| #define DELAY_SR_OFF_BELOW_1 263+26 |
SR off delay for under resonance operation Under RES_FREQ
Definition at line 138 of file interrupts_control.h.
Referenced by voltage_loop().
| #define DELAY_SR_OFF_BELOW_2 225+30 |
SR off delay for under resonance operation Under BELOW_FREQ
Definition at line 140 of file interrupts_control.h.
Referenced by voltage_loop().
| #define DELAY_SR_ON 26 |
On delay of SR is constant. Found experimentally.
Definition at line 130 of file interrupts_control.h.
Referenced by voltage_loop().
| #define DRIVER_DELAY_COMP -9 |
Compensation of different driver delay. In case of asymmetric driving. Not for C7-4pin version.
Definition at line 127 of file interrupts_control.h.
| #define DUTY_START 28 |
Duty cycle of the first pulse in asymmetric PWM.
Definition at line 100 of file interrupts_control.h.
Referenced by main(), and state_control().
| #define DUTY_START_SEQ1 39 |
Duty cycle of the following pulses in asymmetric PWM sequence.
Definition at line 106 of file interrupts_control.h.
| #define DUTY_START_SEQ2 47 |
Duty cycle of the following pulses in asymmetric PWM sequence.
Definition at line 109 of file interrupts_control.h.
| #define IOUT_OCP_LATCH_HARD 3194 |
Output current limit for latching protection, fault cleared with input voltage cycle.
Definition at line 218 of file interrupts_control.h.
Referenced by over_current_protection().
| #define IOUT_OCP_LATCH_MED 3010 |
Output current limit for latching protection, fault cleared with input voltage cycle.
Definition at line 221 of file interrupts_control.h.
Referenced by over_current_protection().
| #define IOUT_OCP_LATCH_SOFT 2928 |
Output current limit for latching protection, fault cleared with input voltage cycle.
Definition at line 224 of file interrupts_control.h.
Referenced by over_current_protection().
| #define IOUT_OCP_LATCH_SOFT_CLEAR 2887 |
Output current to clear the possible OCP fault flags.
Definition at line 227 of file interrupts_control.h.
Referenced by over_current_protection().
| #define LINEAR_PR_STEP 3 |
Period step during linear variation until soft-start begins
Definition at line 73 of file interrupts_control.h.
| #define LLC_COMP_TIME 22 |
Waiting time after zero crossing of the current before inverting the PWM signal. For comparison driven start-up.
Definition at line 76 of file interrupts_control.h.
| #define LLC_PERIOD_MAX 1600 |
Minimum frequency allowed, expressed as maximum period
Definition at line 67 of file interrupts_control.h.
Referenced by control_loop_init(), state_control(), and voltage_loop().
| #define LLC_PERIOD_MIN 266 |
Maximum frequency allowed, expressed as minimum period
Definition at line 70 of file interrupts_control.h.
Referenced by burst_mode(), state_control(), and voltage_loop().
| #define LS0_HS1_PWM 0x80 |
Short circuit detection based on iR; LLC PWM output LS='0', HS='1'
Definition at line 233 of file interrupts_control.h.
| #define LS1_HS0_PWM 0x100 |
Short circuit detection based on iR; LLC PWM output LS='1', HS='0'
Definition at line 230 of file interrupts_control.h.
| #define MIN_DEADTIME 13U |
Minimum dead time to be applied.
Definition at line 82 of file interrupts_control.h.
Referenced by main(), state_control(), and voltage_loop().
| #define PERIOD_LLC_TEST 200 |
Debugging frequency
Definition at line 146 of file interrupts_control.h.
| #define PR_START 152 |
Frequency of the first pulse in asymmetric PWM.
Definition at line 97 of file interrupts_control.h.
Referenced by main(), and state_control().
| #define PR_START_SEQ 111 |
Frequency of the following pulses in asymmetric PWM sequence.
Definition at line 103 of file interrupts_control.h.
| #define Q15_PRODUCT_SHIFT 15 |
Q15 product required shift
Definition at line 241 of file interrupts_control.h.
Referenced by burst_mode(), and voltage_loop().
| #define RES_FREQ 536 |
Corner frequencies for SR timing.
Definition at line 135 of file interrupts_control.h.
Referenced by voltage_loop().
| #define SHADOW_TRANSFER_LLC_SR (CCU8_GCSS_S2SE_Msk|CCU8_GCSS_S1SE_Msk|CCU8_GCSS_S0SE_Msk) |
Shadow transfer mask for half-bridge and SR timing update
Definition at line 149 of file interrupts_control.h.
Referenced by burst_mode(), state_control(), and voltage_loop().
| #define SHADOW_TRANSFER_LLC_SR_CLEAR (CCU8_GCSC_S2SC_Msk|CCU8_GCSC_S1SC_Msk|CCU8_GCSC_S0SC_Msk) |
Mask for pending shadow transfer clearing
Definition at line 152 of file interrupts_control.h.
Referenced by state_control().
| #define START_FREQ 177 |
Frequency of the first pulses after asymmetric PWM (450kHz operation).
Definition at line 94 of file interrupts_control.h.
Referenced by start_sequence_ISR(), and state_control().
| #define V_TARGET_STEP 7 |
Shift for step of reference voltage ramp up: step = target/(2^V_TARGET_STEP)
Definition at line 247 of file interrupts_control.h.
| #define VDC_BUS_DATA_OK 1448 |
Difference between two consecutive samples under certain value to be accepted
Definition at line 180 of file interrupts_control.h.
| #define VDC_BUS_START 11288 |
Input voltage limit for starting
Definition at line 171 of file interrupts_control.h.
Referenced by state_control().
| #define VDC_BUS_START_HYST 11344 |
Input voltage limit for starting, hysteresis
Definition at line 174 of file interrupts_control.h.
Referenced by state_control().
| #define VDC_BUS_STOP 9640 |
Input voltage threshold for turn off LLC. It must be the same value than in PFC control.
Definition at line 177 of file interrupts_control.h.
Referenced by state_control().
| #define VOUT_BURST VOUT_TARGET+VOUT_BURST_DIFF |
Output voltage limit for burst operation
Definition at line 207 of file interrupts_control.h.
Referenced by burst_mode().
| #define VOUT_BURST_DIFF 197 |
Output voltage positive difference limit for burst operation
Definition at line 201 of file interrupts_control.h.
| #define VOUT_F_JUMP VOUT_TARGET+VOUT_F_JUMP_DIFF |
Output voltage limit for burst operation
Definition at line 210 of file interrupts_control.h.
| #define VOUT_F_JUMP_DIFF 0 |
Output voltage positive difference limit for burst operation
Definition at line 204 of file interrupts_control.h.
| #define VOUT_ORING_ON 15457 |
Output voltage threshold for Oring switching
Definition at line 192 of file interrupts_control.h.
Referenced by state_control().
| #define VOUT_OVP_LATCH 18350 |
Output voltage limit for latching protection
Definition at line 198 of file interrupts_control.h.
Referenced by over_voltage_protection().
| #define VOUT_SR_ON 13248 |
Output voltage threshold for Oring switching
Definition at line 195 of file interrupts_control.h.
Referenced by state_control().
| #define VOUT_TARGET 16055 |
Output voltage target
Definition at line 189 of file interrupts_control.h.
Referenced by control_loop_init(), and state_control().
| typedef enum burst_mode burst_mode_t |
LLC operation in RUNNING status can be in normal operation (FREQ_OPERATION) or burst mode, according to the load.
| typedef enum ramp_loop_mode ramp_loop_mode_t |
Define if the frequency is ramping in open loop during soft-start or the control loop takes over
| enum burst_mode |
LLC operation in RUNNING status can be in normal operation (FREQ_OPERATION) or burst mode, according to the load.
| Enumerator | |
|---|---|
| FREQ_OPERATION | |
| BURST_ON | |
Definition at line 318 of file interrupts_control.h.
| enum fault |
Defined fault states used to manage the converter protections
| Enumerator | |
|---|---|
| F_INIT | |
| F_OVP | |
| F_OCP_H | |
| F_OCP_M | |
| F_OCP_S | |
| F_UVP | |
| F_SC | |
Definition at line 305 of file interrupts_control.h.
| enum ramp_loop_mode |
Define if the frequency is ramping in open loop during soft-start or the control loop takes over
| Enumerator | |
|---|---|
| ramp | |
| loop | |
Definition at line 325 of file interrupts_control.h.
| enum state_t |
Defined states to be used in the starting sequence and state machine
| Enumerator | |
|---|---|
| ST_INIT | |
| ST_STB | |
| ST_CHARGE | |
| ST_SOFT_START | |
| ST_SOFT_START_SR | |
| ST_RUNNING | |
| ST_BURST | |
| ST_OCP | |
| ST_LATCH | |
Definition at line 287 of file interrupts_control.h.
| __STATIC_INLINE void ENABLE_SEC_OFF | ( | ) |
Definition at line 523 of file interrupts_control.h.
| __STATIC_INLINE void ENABLE_SEC_ON | ( | ) |
Definition at line 513 of file interrupts_control.h.
Referenced by main().
| __STATIC_INLINE void LED_OFF_DCNOTOK | ( | ) |
Definition at line 502 of file interrupts_control.h.
Referenced by CSG_rise_ISR(), main(), and state_control().
| __STATIC_INLINE void LED_ON_DCOK | ( | ) |
Definition at line 491 of file interrupts_control.h.
Referenced by voltage_loop().
| __STATIC_INLINE void ORING_OFF | ( | ) |
Definition at line 481 of file interrupts_control.h.
Referenced by CSG_rise_ISR(), main(), over_current_protection(), over_voltage_protection(), and state_control().
| __STATIC_INLINE void ORING_ON | ( | ) |
Definition at line 471 of file interrupts_control.h.
Referenced by state_control().
| __STATIC_INLINE void over_current_protection | ( | ) |
Definition at line 555 of file interrupts_control.h.
References F_OCP_H, F_OCP_M, F_OCP_S, fault_reg, IOUT_OCP_LATCH_HARD, IOUT_OCP_LATCH_MED, IOUT_OCP_LATCH_SOFT, IOUT_OCP_LATCH_SOFT_CLEAR, OCP_hard_count, ORING_OFF(), PWM_OFF(), LLC_t::qIout, ST_LATCH, ST_RUNNING, ST_SOFT_START, status_reg, sync_OFF(), time_OCP_M_100ms, and time_OCP_S_100ms.
Referenced by control_loop_ISR().
| __STATIC_INLINE void over_voltage_protection | ( | ) |
Definition at line 534 of file interrupts_control.h.
References F_OVP, fault_reg, ORING_OFF(), PWM_OFF(), LLC_t::q12V, LLC_t::q12V_oring, ST_LATCH, status_reg, sync_OFF(), and VOUT_OVP_LATCH.
Referenced by control_loop_ISR().
| __STATIC_INLINE void PWM_OFF | ( | ) |
Definition at line 444 of file interrupts_control.h.
Referenced by main(), over_current_protection(), over_voltage_protection(), and state_control().
| __STATIC_INLINE void PWM_ON | ( | ) |
Definition at line 458 of file interrupts_control.h.
Referenced by state_control().
| __STATIC_INLINE void sync_OFF | ( | ) |
Definition at line 414 of file interrupts_control.h.
Referenced by CSG_rise_ISR(), main(), over_current_protection(), over_voltage_protection(), and state_control().
| __STATIC_INLINE void sync_ON | ( | ) |
Definition at line 430 of file interrupts_control.h.
Referenced by state_control().
|
static |
Definition at line 391 of file interrupts_control.h.
Referenced by over_current_protection().