7#ifndef DEV_PWRCTRL_TYPEDEF_H
8#define DEV_PWRCTRL_TYPEDEF_H
208#define ROLLING_AVG_SAMPLE_POINTS 3
Contains fault data types.
void __attribute__((__interrupt__, auto_psv))
Executes the power converter control loop.
PWR_CTRL_STATES_e
Enumeration of power controller state machine states.
@ PWRCTRL_STATE_STANDBY
power converter control state #2: waiting for status bits allowing power supply to run
@ PWRCTRL_STATE_PRECHARGE
power converter control state #1: charging output caps
@ PWRCTRL_STATE_INITIALIZE
power converter control state #0: initializes object properties and clears status bits
@ PWRCTRL_STATE_SOFT_START
power converter control state #4: performs soft-start sequence
@ PWRCTRL_STATE_UP_AND_RUNNING
power converter control state #5: output is in regulation and power is OK (normal continuous operatio...
@ PWRCTRL_STATE_FAULT_DETECTION
power converter control state #6: checks if a fault occurs
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 Channel_AN15
Channel 15.
uint16_t VCapVoltage
Data value for capacitor.
uint16_t ISecAverageRectified
Data value for average secondary current rectified.
uint16_t ISensePrimary
Data value for primary current as measured with CT.
int16_t SecPower
Data value for Secondary power (Watt)
uint16_t ISecAverage
Data value for average secondary current.
uint16_t IPriSensorOffset
Offset of the primary current sensor.
uint16_t VInVoltage
Data value for input voltage.
uint16_t ISecSensorOffset
Offset of the secondary current sensor.
uint16_t ISenseSecondary
Data value for secondary current as measured with shunt.
uint16_t VRail_5V
Data value for 5V auxiliary rail.
uint16_t Temperature
Data value for temperature.
uint16_t VOutVoltage
Data value for output voltage.
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
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...
bool Precharged
placeholder for precharge. false when not precharged. true when charged
Collection of Precharge Properties.
Collection of Secondary Rectifier Properties.
uint16_t samples[ROLLING_AVG_SAMPLE_POINTS]
Collection of Secondary Rectifier Properties.
uint16_t Droop_Voltage_Reference_from_PBV
uint16_t Droop_New_Voltage_Reference
uint16_t Droop_Delay_Counter
Collection of calibrate Properties.
uint16_t calculated_value
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
PRECHARGE_t Precharge
structure for precharge data
DROOP_t Droop
droop controller data
AVERAGING_t VoutCalibratingAveraging
structure for averaging Vout during Droop
SEC_REC_t SecRec
structure for secondary rectification data
CALIBRATE_t VoutCalibrate
structure for Calibrating Vout during Droop using Averaged value
CONTROLLER_t VLoop
structure for voltage controller data
START_UP_RAMP_t PRamp
Power ramp-up settings.
PWR_CTRL_STATE_t State
Power Control State ID.
AVERAGING_t SecondarySh_Offset
structure for averaging secondary sensor offset
FEEDBACK_SETTINGS_t Data
Feedback channel settings.
AVERAGING_t ISecAveraging
secondary current average
STATUS_FLAGS_t Status
Power Supply status flags.
START_UP_RAMP_t PhRamp
Phase ramp-up settings (for open loop)
FAULT_SETTINGS_t Fault
Fault flags and settings.
uint16_t Secondary_Rolling_val
Secondary Current Rolling Average Value.
AVERAGING_t PrimaryCT_Offset
structure for averaging primary CT offset
START_UP_RAMP_t VRamp
Voltage ramp-up settings.
START_UP_RAMP_t IRamp
Current ramp-up settings.
AVERAGING_ROLLING_t Secondary_Rolling
structure for Secondary current rolling average