Bar Logo Dual Active Bridge Development Board (Part-No. )
 
Content
     
Loading...
Searching...
No Matches
pwrctrl_comm_interface.c
Go to the documentation of this file.
1
8#include "pwrctrl.h"
9
10
11
12
22
23
28void Dev_PwrCtrl_SetState(uint16_t reference)
29{
30 dab.State = reference;
31}
32
33
38void PwrCtrl_SetIReference(uint16_t reference)
39{
40 dab.Properties.IReference = reference;
41}
42
43
48void PwrCtrl_SetVSecReference(uint16_t reference)
49{
50 dab.Properties.VSecReference = reference;
51}
52
53
58void PwrCtrl_SetPwrReference(uint16_t reference)
59{
60 dab.Properties.PwrReference = reference;
61}
62
63
68void PwrCtrl_SetPeriodTarget(uint16_t reference)
69{
70 dab.Pwm.PBVPeriodTarget = reference;
71}
72
73
78void PwrCtrl_SetPhaseTarget(uint16_t reference)
79{
80 dab.Pwm.PBVControlPhaseTarget = reference;
81}
82
87void PwrCtrl_SetP2SPhaseTarget(uint16_t reference)
88{
90}
91
92
97void PwrCtrl_SetEnable(bool enable)
98{
99 dab.Properties.Enable = enable;
100}
101
102
103
109{
110 return(dab.Data.ISensePrimary);
111}
112
113
119{
120 return(dab.Data.ISenseSecondary);
121}
122
123
129{
131}
132
133
139{
140 return(dab.Data.Temperature);
141}
142
143
149{
150 return(dab.Data.VRail_5V);
151}
152
153
159{
160 return(dab.Pwm.ControlPeriod);
161}
162
163
169{
170 return(dab.Pwm.ControlDutyCycle);
171}
172
173
179{
180 return(dab.State);
181}
182
183
189{
190 return(dab.Status.value);
191}
192
193
200{
201 return(dab.Properties.Enable);
202}
203
204
210{
211 return(dab.Pwm.PBVPeriodTarget);
212}
213
214
220{
221 return(dab.Data.SecPower);
222}
223
229{
231}
232
238{
240}
241
242
248{
250}
POWER_CONTROL_t dab
Global data object for a DAB Converter.
Definition pwrctrl.c:28
AVERAGING_t iSecAveraging
Data Object of secondary current averaging.
AVERAGING_t vPrimAveraging
Data Object of primary voltage averaging.
AVERAGING_t vSecAveraging
Data Object of secondary voltage averaging.
void PwrCtrl_SetEnable(bool enable)
API function to set the power control enable bit.
uint16_t Dev_PwrCtrl_Get_State(void)
API function to get the current state of the state machine.
uint16_t Dev_PwrCtrl_GetAveraging_Isec(void)
API function to get the average value of the sampled ADC for secondary current.
uint16_t Dev_PwrCtrl_GetAveraging_Vsec(void)
API function to get the average value of the sampled ADC for secondary voltage.
void PwrCtrl_SetPwrReference(uint16_t reference)
API function to set the power controller reference.
uint16_t PwrCtrl_GetPhase_P2SDegree(void)
API function to set the power control State.
uint16_t PwrCtrl_GetAdc_Isec_avg(void)
API function to get the raw ADC value for secondary average current.
uint16_t PwrCtrl_GetAdc_Ipri_ct(void)
API function to get the raw ADC value for primary current transformer current.
uint16_t Dev_PwrCtrl_Get_Period(void)
API function to get the PWM period.
uint16_t Dev_PwrCtrl_GetAveraging_Vprim(void)
API function to get the average value of the sampled ADC for primary voltage.
void PwrCtrl_SetIReference(uint16_t reference)
API function to set the current controller reference.
void PwrCtrl_SetPeriodTarget(uint16_t reference)
API function to set the target period.
uint16_t Dev_PwrCtrl_Get_EnableFlag(void)
API function to get the state of the power control enable bit.
void PwrCtrl_SetP2SPhaseTarget(uint16_t reference)
API function to set the target prim to sec phase which will steer other modulation.
void PwrCtrl_SetVSecReference(uint16_t reference)
API function to set the secondary voltage controller reference.
uint16_t Dev_PwrCtrl_Get_Status(void)
API function to get the power control status.
uint16_t PwrCtrl_GetAdc_Isec_ct(void)
API function to get the raw ADC value for secondary current transformer current.
uint16_t PwrCtrl_GetAdc_Temperature(void)
API function to get the raw ADC value for temperature.
uint16_t Dev_PwrCtrl_Get_DutyCycle(void)
API function to get the PWM duty cycle.
uint16_t Dev_PwrCtrl_Get_PwmprdTarget(void)
API function to get the PWM period target.
void Dev_PwrCtrl_SetState(uint16_t reference)
API function to set the power control State.
void PwrCtrl_SetPhaseTarget(uint16_t reference)
API function to set the target PWM phase.
uint16_t PwrCtrl_GetAdc_Vrail_5V(void)
API function to get the raw ADC value for 5V rail.
uint16_t Dev_PwrCtrl_Get_SecPower(void)
API function to get the secondary power.
uint16_t AverageValue
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 ControlDutyCycle
Control Duty Cycle calculation based on Control Period.
uint16_t PBVPeriodTarget
Power Board Visualizer Set Control target.
uint16_t PBVControlPhaseTarget
Power Board Visualizer Set Control phase.
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 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.
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 VSecReference
User secondary-voltage port reference setting used to control the power converter output voltage in b...
SWITCH_NODE_t Pwm
Switch node settings.
PWR_CTRL_PROPERTIES_t Properties
Power Control properties
PWR_CTRL_STATE_t State
Power Control State ID.
FEEDBACK_SETTINGS_t Data
Feedback channel settings.
STATUS_FLAGS_t Status
Power Supply status flags.