|
PFC:800WPSUC7-4pin
|
Control related interrupts code. More...
#include <DAVE.h>#include "LLD_conf_code/adc.h"#include "control_interrupts.h"#include "init_bckgnd_funct.h"Functions | |
| void | current_loop_ISR (void) |
| Current loop interrupt. CR2 while counting up in CCU80 (Boost PWM) triggers the ADC queue. A result event of the queue triggers this interrupt. More... | |
| void | voltage_loop_ISR (void) |
| Voltage control interrupt. Timer CCU40.CC41 triggers this interrupt in the period match event. IIR low-pass filter of the AC voltage to obtain the RMS value. IIR notch filter of the DC voltage to remove 100/120 Hz component. Voltage loop and voltage monitoring. More... | |
Variables | |
| volatile PFC_coefs_t | PFC |
| static volatile uint32_t | Vrms2 = 0 |
| volatile uint16_t | time_count_65kHz = 0 |
| static volatile bool | current_loop = false |
| static volatile uint8_t | DC_start = 0 |
| static volatile uint16_t | offset_duty_openloop = 376 |
| static volatile uint32_t | softstart_closeloop = 0 |
| static volatile int16_t | Vout_offset = 0 |
| static volatile int16_t | offset_pos_neg = 1 |
| static volatile int16_t | offset_detected = 0 |
| __I uint32_t * | DCM_capture |
| static uint16_t | counter_fifo = 0 |
| static uint8_t | acok_counter = 0 |
| static bool | acok = false |
| static volatile int32_t | debug_filter = 7 |
ADC results | |
| volatile uint32_t * | ADCResult_iL |
| volatile uint32_t * | ADCResult_DCBus |
| volatile uint32_t * | ADCResult_VAC |
| volatile uint32_t * | ADCResult_Temp |
| volatile uint32_t * | ADCResult_BOP |
| static volatile uint32_t | k_iL_DCM = 32767 |
Bus voltage filter variables | |
| static volatile uint8_t | i_filter = 0 |
| static volatile int32_t | DCfilt_output [] = {0,0} |
| static volatile int32_t | DCfilt_input [] = {0,0,0,0,0,0,0,0} |
| static volatile uint8_t | DCfilt_index = 0 |
Control and Fault status registers | |
| volatile state_t | status_reg = ST_INIT |
| volatile fault_t | fault_reg = F_INIT |
Soft start. | |
| static volatile uint8_t | stb_bop_count = 0 |
| static volatile uint8_t | xtra_step_sftstrt = 0 |
Input frequency check. | |
Variables that can be used for frequency detection before starting phase. Not used in the current implementation | |
| volatile uint16_t | freq_in_count = 0 |
| volatile uint8_t | freq_in_OK = 0 |
UART variables | |
| static volatile bool | UART_power_off = false |
| static volatile uint8_t | i_send = 0 |
| static volatile uint16_t | UART_rx_type = 0xFF |
| static volatile uint8_t | UART_rx_index = 0xFF |
| static volatile uint16_t | retval |
| static volatile uint16_t | Iout_received [] = {0,0} |
DCM variables | |
Variables used during the debugging phase for DCM detection by duty calculation | |
| static volatile int32_t | dccm = 0 |
| static volatile int32_t | Vin_calc = 0 |
| static volatile int32_t | Vin_dccm = 0 |
| static volatile int32_t | Lf_iL = 0 |
| static volatile int32_t | Vbulk_shift = 0 |
| static volatile int32_t | Vdiff = 0 |
| static volatile int32_t | Vbulk_Vdiff = 0 |
| static volatile int32_t | PR_pu = 0 |
| static volatile int32_t | dcm_time = 0 |
OVP variables | |
| static volatile uint8_t | count_Vout_OVP_stop = 0 |
| static volatile uint8_t | count_Vout_OVP_resume = 0 |
Control related interrupts code.