Bar Logo 3.8/7.6 kw Totem pole Demonstration Application (Part-No. (not specified))
 
Content
     
Loading...
Searching...
No Matches
dev_TPBLPFC_typedef.c
Go to the documentation of this file.
1
11/*
12� [2024] Microchip Technology Inc. and its subsidiaries.
13
14 Subject to your compliance with these terms, you may use Microchip
15 software and any derivatives exclusively with Microchip products.
16 You are responsible for complying with 3rd party license terms
17 applicable to your use of 3rd party software (including open source
18 software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
19 NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
20 SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
21 MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
22 WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
23 INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
24 KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
25 MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
26 FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
27 TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
28 EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
29 THIS SOFTWARE.
30*/
31
36#include <p33CH512MP506S1.h>
37#include "dev_TPBLPFC_typedef.h"
38#include "../../sources_common/PFC_frameworkSetup.h"
39
40//------------------------------------------------------------------------------
48
49//------------------------------------------------------------------------------
50//<<
51//------------------------------------------------------------------------------
52
53void Init_pwr_ctrl (void)
54{
55 //Vout -----------------------------------------------------------------------
64
65 //Control reference ----------------------------------------------------------
66 Vout_Control.Reference.Reference_Set = VOUT_REF; //preset reference to configured value
68
69 //PH1 voltages ---------------------------------------------------------------
77
78 //PH1 currents ---------------------------------------------------------------
85
86 //PH1 flags ------------------------------------------------------------------
98
99 //PH1 controller numbers -----------------------------------------------------
108 //----------------------------------------------------------------------------
109
110 //PH2 voltages ---------------------------------------------------------------
118
119 //PH2 currents ---------------------------------------------------------------
126
127 //PH2 flags ------------------------------------------------------------------
139
140 //PH2 controller numbers -----------------------------------------------------
149 //----------------------------------------------------------------------------
150
151 //PFC common Flags
152 PFC_Flags.value = 0x00000000;
153 PFC_Flags.bits.AGOn = 1;
154 PFC_Flags.bits.Stop = 1;
155}
156
157//------------------------------------------------------------------------------
158//------------------------------------------------------------------------------
159
PHASE_VALUES_t AC_N
uint16_t OpenLoopStartupDuration
PHASE_VALUES_t Phase_Values_PH2
Primary_Data_Handling primary_vac_values
PWR_CTRL_STATE_e pwr_ctrl_state
uint16_t Adaptive_Gain_Factor
VMC_VALUES_t Vout_Control
PHASE_VALUES_t Phase_Values_PH1
void Init_pwr_ctrl(void)
PFC_FLAGS_t PFC_Flags
This is the typedef file for power controller.
PWR_CTRL_STATE_e
#define VOUT_REF
volatile int16_t Rectified
volatile uint16_t Filtered
volatile uint16_t PreviousValue
volatile uint16_t FilterCounter
volatile int16_t Raw
volatile int16_t Vin_div_Averaged2
volatile uint16_t Rectified_Shift
volatile uint16_t Max_Peak
volatile uint16_t Voltage_Loop_Output
volatile uint16_t Reference_Internal
volatile uint16_t BurstModeCycleCounter
volatile uint16_t PWM_Counter
volatile uint32_t IAC_Reference_l
volatile uint16_t IAC_Reference
volatile uint16_t Duty_Cycle_Set_Value
volatile uint16_t CCM_Counter
volatile unsigned Control_Freeze
volatile uint16_t DFF_Value
struct CONTROL_STATUS_FLAGS_s::@24::@26 bits
volatile unsigned Reference_Changed
volatile unsigned VAC_Polarity_last
volatile unsigned VAC_Polarity_Changed
volatile unsigned BurstModeDetected
volatile unsigned BurstModeLatched
volatile unsigned Soft_Start_Zero_Cross
volatile unsigned VAC_Polarity_Changed_last
ANALOG_VALUES_t Phase_Voltage
CONTROLLER_VALUES_t Controller_Values
ANALOG_VALUES_t Phase_Current
CONTROL_STATUS_FLAGS_t Control_Status_Flags
CONTROL_REFERENCE_VALUES_t Reference
ANALOG_VALUES_t Vout
volatile uint16_t value
struct PFC_FLAGS_s::@30::@32 bits
volatile unsigned AGOn
volatile unsigned Stop