Bar Logo Dual Active Bridge Development Board (Part-No. )
 
Content
     
Loading...
Searching...
No Matches
pwrctrl_typedef.h
1
7#ifndef DEV_PWRCTRL_TYPEDEF_H
8#define DEV_PWRCTRL_TYPEDEF_H
9
10#include "fault/fault_typedef.h"
11
12
26typedef enum PWR_CTRL_STATES_e PWR_CTRL_STATE_t;
27
28
48typedef struct SWITCH_NODE_s SWITCH_NODE_t;
49
50
58{
59 uint16_t VPriVoltage;
60 uint16_t VSecVoltage;
61 uint16_t ISensePrimary;
62 uint16_t ISenseSecondary;
63 uint16_t ISecAverage;
65 int16_t SecPower;
66 uint16_t Temperature;
67 uint16_t VRail_5V;
69};
71
72
80 union {
81 struct {
82 unsigned Running : 1;
83 unsigned FaultActive : 1;
84 unsigned notUsed : 13;
85 } __attribute__((packed)) bits;
86 uint16_t value;
87 };
88};
89typedef struct STATUS_FLAGS_s STATUS_FLAGS_t;
90
91
99{
100 uint16_t Counter;
101 uint16_t Delay;
102 uint16_t StepSize;
103 uint16_t* ptrReference;
106};
107typedef struct START_UP_RAMP_s START_UP_RAMP_t;
108
109
110
119{
120 int16_t Reference;
121 uint16_t Feedback;
122 uint16_t Output;
123 int16_t AgcFactor;
124 bool Enable;
125};
126typedef struct CONTROLLER_s CONTROLLER_t;
127
128
140typedef enum PWR_CTRL_CHARGE_STATE_e PWR_CTRL_CHARGE_STATE_t;
141
142
150{
151 uint16_t VSecReference;
152 uint16_t VPriReference;
153 int16_t IReference;
154 uint16_t PwrReference;
155
156 //bool ChargingState; ///< Control Flag: When set, enables PWM output while keeping control loop disabled; Skips closed loop ramp up states and directly jumps to state Online
157 bool Enable;
158
159};
161
162
183typedef struct POWER_CONTROL_s POWER_CONTROL_t;
184
185#endif /* DEV_PWRCTRL_TYPEDEF_H */
186
void __attribute__((weak))
Definition adc1.c:569
Contains fault data types.
PWR_CTRL_STATES_e
Enumeration of power controller state machine states.
PWR_CTRL_CHARGE_STATE_e
Enumeration of power controller charging state.
@ PWRCTRL_STATE_ONLINE
power converter control state #4: output is in regulation and power is OK (normal continuous operatio...
@ PWRCTRL_STATE_STANDBY
power converter control state #2: waiting for status bits allowing power supply to run
@ PWRCTRL_STATE_INITIALIZE
power converter control state #0: initializes object properties and clears status bits
@ PWRCTRL_STATE_SOFT_START
power converter control state #3: performs soft-start sequence
@ PWRCTRL_STATE_FAULT_DETECTION
power converter control state #1: checks if a fault occurs
@ PWR_CTRL_CHARGING
power converter is in charging mode
@ PWR_CTRL_DISCHARGING
power converter is in discharging mode
@ PWR_CTRL_STOP
Contains Fault settings.
Power converter switch-node specifications.
uint16_t ControlPhase_P2S_Target
Control phase value from control loop in degrees.
uint16_t ControlPeriod
Control period value from control loop.
uint16_t ControlPhase_P2S_Degreex10
Control phase value from control loop in 10 x degree, integer.
uint16_t DeadTimeHigh
Deadtime High settings for PWM.
uint16_t ControlDutyCycle
Control Duty Cycle calculation based on Control Period.
uint16_t DeadTimeLow
Deadtime High settings for PWM.
uint16_t LowPowerSlowMode
future development
uint16_t PBVPeriodTarget
Power Board Visualizer Set Control target.
uint16_t ControlPhase
Control phase value from control loop.
uint16_t PBVControlPhaseTarget
Power Board Visualizer Set Control phase.
Publicly accessible data buffer of most recent runtime data values.
uint16_t VPriVoltage
Data value for input voltage.
uint16_t ISecAverageRectified
Data value for average secondary current rectified.
uint16_t ISensePrimary
Data value for primary current as measured with CT.
uint16_t VSecVoltage
Data value for output voltage.
int16_t SecPower
Data value for Secondary power (Watt)
uint16_t ISecAverage
Data value for average secondary current as measured with isolated current sensor.
uint16_t ISecSensorOffset
Offset of the secondary current sensor.
uint16_t ISenseSecondary
Data value for secondary current as measured with CT.
uint16_t VRail_5V
Data value for 5V auxiliary rail.
uint16_t Temperature
Data value for temperature.
Power converter status flags.
unsigned notUsed
Bit 2 - 15: Not used.
unsigned Running
Bit 0: Power converter is running.
unsigned FaultActive
Bit 1: Power converter fault is active.
Stores data related to the ramping up/down of the reference.
bool RampComplete
indicates when ramp-up is complete
uint16_t Delay
Soft-Start Period (POD, RAMP PERIOD, PGD, etc.)
uint16_t * ptrReferenceTarget
pointer to the ramp-up reference target
uint16_t * ptrReference
pointer the reference variable
uint16_t Counter
Soft-Start Execution Counter. This setting is set/cleared by the device driver and is 'read only'.
uint16_t StepSize
Size/value of one reference increment/decrement or this period.
Stores data related to the control loop properties.
uint16_t Output
controller output
bool Enable
Enable control loop.
int16_t Reference
actual reference
uint16_t Feedback
coming
int16_t AgcFactor
Adaptive gain control.
Collection of power control properties.
uint16_t PwrReference
User power reference setting used to control the converter controller.
bool Enable
Control Flag: When set, enables the converter triggering a startup sequence; When cleared,...
int16_t IReference
User current reference setting used to control the converter controller.
uint16_t VPriReference
User primary-voltage port reference setting used to control the power converter output voltage in boo...
uint16_t VSecReference
User secondary-voltage port reference setting used to control the power converter output voltage in b...
Power control API structure.
CONTROLLER_t ILoop
structure for current controller data
SWITCH_NODE_t Pwm
Switch node settings.
CONTROLLER_t PLoop
structure for power controller data
PWR_CTRL_PROPERTIES_t Properties
Power Control properties
CONTROLLER_t VLoop
structure for voltage controller data
START_UP_RAMP_t PRamp
Power ramp-up settings.
PWR_CTRL_STATE_t State
Power Control SM State ID.
FEEDBACK_SETTINGS_t Data
Feedback channel settings.
PWR_CTRL_CHARGE_STATE_t PowerDirection
defines if the power converter is in charging or discharging mode
STATUS_FLAGS_t Status
Power Supply status flags, running or fault.
FAULT_SETTINGS_t Fault
Fault flags and settings.
START_UP_RAMP_t VRamp
Voltage ramp-up settings.
START_UP_RAMP_t IRamp
Current ramp-up settings.