|  | 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
18uint16_t PwrCtrl_GetPhase_P2SDegree(void)
19{
20 return(dab.Pwm.ControlPhase_P2S_Degreex10);
21}
22
23
28 void Dev_PwrCtrl_SetState(uint16_t reference)
29{
30 dab.State = reference;
31}
32
33
38 void PwrCtrl_SetIReference(uint16_t reference)
39{
40 dab.Properties.IReference = reference;
41}
42
43
48 void PwrCtrl_SetVSecReference(uint16_t reference)
49{
50 dab.Properties.VSecReference = reference;
51}
52
53
58 void PwrCtrl_SetPwrReference(uint16_t reference)
59{
60 dab.Properties.PwrReference = reference;
61}
62
63
68 void PwrCtrl_SetPeriodTarget(uint16_t reference)
69{
70 dab.Pwm.PBVPeriodTarget = reference;
71}
72
73
78 void PwrCtrl_SetPhaseTarget(uint16_t reference)
79{
80 dab.Pwm.PBVControlPhaseTarget = reference;
81}
82
87 void PwrCtrl_SetP2SPhaseTarget(uint16_t reference)
88{
89 dab.Pwm.ControlPhase_P2S_Target = reference;
90}
91
92
97 void PwrCtrl_SetEnable(bool enable)
98{
99 dab.Properties.Enable = enable;
100}
101
102
103
108uint16_t PwrCtrl_GetAdc_Ipri_ct(void)
109{
110 return(dab.Data.ISensePrimary);
111}
112
113
118uint16_t PwrCtrl_GetAdc_Isec_ct(void)
119{
120 return(dab.Data.ISenseSecondary);
121}
122
123
128uint16_t PwrCtrl_GetAdc_Isec_avg(void)
129{
130 return(dab.Data.ISecAverageRectified);
131}
132
133
138uint16_t PwrCtrl_GetAdc_Temperature(void)
139{
140 return(dab.Data.Temperature);
141}
142
143
148uint16_t PwrCtrl_GetAdc_Vrail_5V(void)
149{
150 return(dab.Data.VRail_5V);
151}
152
153
158uint16_t Dev_PwrCtrl_Get_Period(void)
159{
160 return(dab.Pwm.ControlPeriod);
161}
162
163
168uint16_t Dev_PwrCtrl_Get_DutyCycle(void)
169{
170 return(dab.Pwm.ControlDutyCycle);
171}
172
173
178uint16_t Dev_PwrCtrl_Get_State(void)
179{
180 return(dab.State);
181}
182
183
188uint16_t Dev_PwrCtrl_Get_Status(void)
189{
190 return(dab.Status.value);
191}
192
193
199uint16_t Dev_PwrCtrl_Get_EnableFlag(void)
200{
201 return(dab.Properties.Enable);
202}
203
204
209uint16_t Dev_PwrCtrl_Get_PwmprdTarget(void)
210{
211 return(dab.Pwm.PBVPeriodTarget);
212}
213
214
219uint16_t Dev_PwrCtrl_Get_SecPower(void)
220{
221 return(dab.Data.SecPower);
222}
223
228uint16_t Dev_PwrCtrl_GetAveraging_Vprim(void)
229{
230 return(vPrimAveraging.AverageValue);
231}
232
237uint16_t Dev_PwrCtrl_GetAveraging_Vsec(void)
238{
239 return(vSecAveraging.AverageValue);
240}
241
242
247uint16_t Dev_PwrCtrl_GetAveraging_Isec(void)
248{
249 return(iSecAveraging.AverageValue);
250}
dab
POWER_CONTROL_t dab
Global data object for a DAB Converter.
Definition pwrctrl.c:28
iSecAveraging
AVERAGING_t iSecAveraging
Data Object of secondary current averaging.
Definition pwrctrl_isr_extension.c:50
vPrimAveraging
AVERAGING_t vPrimAveraging
Data Object of primary voltage averaging.
Definition pwrctrl_isr_extension.c:34
vSecAveraging
AVERAGING_t vSecAveraging
Data Object of secondary voltage averaging.
Definition pwrctrl_isr_extension.c:42
PwrCtrl_SetEnable
void PwrCtrl_SetEnable(bool enable)
API function to set the power control enable bit.
Definition pwrctrl_comm_interface.c:97
Dev_PwrCtrl_Get_State
uint16_t Dev_PwrCtrl_Get_State(void)
API function to get the current state of the state machine.
Definition pwrctrl_comm_interface.c:178
Dev_PwrCtrl_GetAveraging_Isec
uint16_t Dev_PwrCtrl_GetAveraging_Isec(void)
API function to get the average value of the sampled ADC for secondary current.
Definition pwrctrl_comm_interface.c:247
Dev_PwrCtrl_GetAveraging_Vsec
uint16_t Dev_PwrCtrl_GetAveraging_Vsec(void)
API function to get the average value of the sampled ADC for secondary voltage.
Definition pwrctrl_comm_interface.c:237
PwrCtrl_SetPwrReference
void PwrCtrl_SetPwrReference(uint16_t reference)
API function to set the power controller reference.
Definition pwrctrl_comm_interface.c:58
PwrCtrl_GetPhase_P2SDegree
uint16_t PwrCtrl_GetPhase_P2SDegree(void)
API function to set the power control State.
Definition pwrctrl_comm_interface.c:18
PwrCtrl_GetAdc_Isec_avg
uint16_t PwrCtrl_GetAdc_Isec_avg(void)
API function to get the raw ADC value for secondary average current.
Definition pwrctrl_comm_interface.c:128
PwrCtrl_GetAdc_Ipri_ct
uint16_t PwrCtrl_GetAdc_Ipri_ct(void)
API function to get the raw ADC value for primary current transformer current.
Definition pwrctrl_comm_interface.c:108
Dev_PwrCtrl_Get_Period
uint16_t Dev_PwrCtrl_Get_Period(void)
API function to get the PWM period.
Definition pwrctrl_comm_interface.c:158
Dev_PwrCtrl_GetAveraging_Vprim
uint16_t Dev_PwrCtrl_GetAveraging_Vprim(void)
API function to get the average value of the sampled ADC for primary voltage.
Definition pwrctrl_comm_interface.c:228
PwrCtrl_SetIReference
void PwrCtrl_SetIReference(uint16_t reference)
API function to set the current controller reference.
Definition pwrctrl_comm_interface.c:38
PwrCtrl_SetPeriodTarget
void PwrCtrl_SetPeriodTarget(uint16_t reference)
API function to set the target period.
Definition pwrctrl_comm_interface.c:68
Dev_PwrCtrl_Get_EnableFlag
uint16_t Dev_PwrCtrl_Get_EnableFlag(void)
API function to get the state of the power control enable bit.
Definition pwrctrl_comm_interface.c:199
PwrCtrl_SetP2SPhaseTarget
void PwrCtrl_SetP2SPhaseTarget(uint16_t reference)
API function to set the target prim to sec phase which will steer other modulation.
Definition pwrctrl_comm_interface.c:87
PwrCtrl_SetVSecReference
void PwrCtrl_SetVSecReference(uint16_t reference)
API function to set the secondary voltage controller reference.
Definition pwrctrl_comm_interface.c:48
Dev_PwrCtrl_Get_Status
uint16_t Dev_PwrCtrl_Get_Status(void)
API function to get the power control status.
Definition pwrctrl_comm_interface.c:188
PwrCtrl_GetAdc_Isec_ct
uint16_t PwrCtrl_GetAdc_Isec_ct(void)
API function to get the raw ADC value for secondary current transformer current.
Definition pwrctrl_comm_interface.c:118
PwrCtrl_GetAdc_Temperature
uint16_t PwrCtrl_GetAdc_Temperature(void)
API function to get the raw ADC value for temperature.
Definition pwrctrl_comm_interface.c:138
Dev_PwrCtrl_Get_DutyCycle
uint16_t Dev_PwrCtrl_Get_DutyCycle(void)
API function to get the PWM duty cycle.
Definition pwrctrl_comm_interface.c:168
Dev_PwrCtrl_Get_PwmprdTarget
uint16_t Dev_PwrCtrl_Get_PwmprdTarget(void)
API function to get the PWM period target.
Definition pwrctrl_comm_interface.c:209
Dev_PwrCtrl_SetState
void Dev_PwrCtrl_SetState(uint16_t reference)
API function to set the power control State.
Definition pwrctrl_comm_interface.c:28
PwrCtrl_SetPhaseTarget
void PwrCtrl_SetPhaseTarget(uint16_t reference)
API function to set the target PWM phase.
Definition pwrctrl_comm_interface.c:78
PwrCtrl_GetAdc_Vrail_5V
uint16_t PwrCtrl_GetAdc_Vrail_5V(void)
API function to get the raw ADC value for 5V rail.
Definition pwrctrl_comm_interface.c:148
Dev_PwrCtrl_Get_SecPower
uint16_t Dev_PwrCtrl_Get_SecPower(void)
API function to get the secondary power.
Definition pwrctrl_comm_interface.c:219
AVERAGING_s::AverageValue
uint16_t AverageValue
Definition pwrctrl_common.h:22
SWITCH_NODE_s::ControlPhase_P2S_Target
uint16_t ControlPhase_P2S_Target
Control phase value from control loop in degrees.
Definition pwrctrl_typedef.h:41
SWITCH_NODE_s::ControlPeriod
uint16_t ControlPeriod
Control period value from control loop.
Definition pwrctrl_typedef.h:37
SWITCH_NODE_s::ControlPhase_P2S_Degreex10
uint16_t ControlPhase_P2S_Degreex10
Control phase value from control loop in 10 x degree, integer.
Definition pwrctrl_typedef.h:40
SWITCH_NODE_s::ControlDutyCycle
uint16_t ControlDutyCycle
Control Duty Cycle calculation based on Control Period.
Definition pwrctrl_typedef.h:38
SWITCH_NODE_s::PBVPeriodTarget
uint16_t PBVPeriodTarget
Power Board Visualizer Set Control target.
Definition pwrctrl_typedef.h:44
SWITCH_NODE_s::PBVControlPhaseTarget
uint16_t PBVControlPhaseTarget
Power Board Visualizer Set Control phase.
Definition pwrctrl_typedef.h:45
FEEDBACK_SETTINGS_s::ISecAverageRectified
uint16_t ISecAverageRectified
Data value for average secondary current rectified.
Definition pwrctrl_typedef.h:64
FEEDBACK_SETTINGS_s::ISensePrimary
uint16_t ISensePrimary
Data value for primary current as measured with CT.
Definition pwrctrl_typedef.h:61
FEEDBACK_SETTINGS_s::SecPower
int16_t SecPower
Data value for Secondary power (Watt)
Definition pwrctrl_typedef.h:65
FEEDBACK_SETTINGS_s::ISenseSecondary
uint16_t ISenseSecondary
Data value for secondary current as measured with CT.
Definition pwrctrl_typedef.h:62
FEEDBACK_SETTINGS_s::VRail_5V
uint16_t VRail_5V
Data value for 5V auxiliary rail.
Definition pwrctrl_typedef.h:67
FEEDBACK_SETTINGS_s::Temperature
uint16_t Temperature
Data value for temperature.
Definition pwrctrl_typedef.h:66
STATUS_FLAGS_s::value
uint16_t value
Definition pwrctrl_typedef.h:86
PWR_CTRL_PROPERTIES_s::PwrReference
uint16_t PwrReference
User power reference setting used to control the converter controller.
Definition pwrctrl_typedef.h:153
PWR_CTRL_PROPERTIES_s::Enable
bool Enable
Control Flag: When set, enables the converter triggering a startup sequence; When cleared,...
Definition pwrctrl_typedef.h:156
PWR_CTRL_PROPERTIES_s::IReference
int16_t IReference
User current reference setting used to control the converter controller.
Definition pwrctrl_typedef.h:152
PWR_CTRL_PROPERTIES_s::VSecReference
uint16_t VSecReference
User secondary-voltage port reference setting used to control the power converter output voltage in b...
Definition pwrctrl_typedef.h:150
POWER_CONTROL_s::Pwm
SWITCH_NODE_t Pwm
Switch node settings.
Definition pwrctrl_typedef.h:171
POWER_CONTROL_s::Properties
PWR_CTRL_PROPERTIES_t Properties
Power Control properties
Definition pwrctrl_typedef.h:170
POWER_CONTROL_s::State
PWR_CTRL_STATE_t State
Power Control State ID.
Definition pwrctrl_typedef.h:169
POWER_CONTROL_s::Data
FEEDBACK_SETTINGS_t Data
Feedback channel settings.
Definition pwrctrl_typedef.h:172
POWER_CONTROL_s::Status
STATUS_FLAGS_t Status
Power Supply status flags.
Definition pwrctrl_typedef.h:168