Digital Power Starter Kit 3 Firmware
dsPIC33C Boost Converter Voltage Mode Control Example
dev_boost_substates.c
1 /*
2  * File: dev_boost_substates.c
3  * Author: M91406
4  * Comments: Boost converter operation sub-states header file
5  * Revision history:
6  * 10/28/20 1.0 initial version
7  */
8 
9 #include <xc.h> // include processor files - each processor file is guarded.
10 #include <stdint.h> // include standard integer data types
11 #include <stdbool.h> // include standard boolean data types
12 #include <stdlib.h> // include C standard library header
13 
14 #include "dev_boost_pconfig.h" // include boost converter
15 #include "dev_boost_typedef.h" // include boost converter data object declarations
16 
17 // Private function prototypes of sub-state functions
18 volatile uint16_t __attribute__((always_inline)) SubState_PowerOnDelay(volatile struct BOOST_CONVERTER_s *boostInstance);
19 volatile uint16_t __attribute__((always_inline)) Substate_VCapMonitor(volatile struct BOOST_CONVERTER_s *boostInstance);
20 volatile uint16_t __attribute__((always_inline)) SubState_PrepareVRampUp(volatile struct BOOST_CONVERTER_s *boostInstance);
21 volatile uint16_t __attribute__((always_inline)) SubState_VRampUp(volatile struct BOOST_CONVERTER_s *boostInstance);
22 volatile uint16_t __attribute__((always_inline)) SubState_IRampUp(volatile struct BOOST_CONVERTER_s *boostInstance);
23 volatile uint16_t __attribute__((always_inline)) SubState_PowerGoodDelay(volatile struct BOOST_CONVERTER_s *boostInstance);
24 
25 
26 // Declaration of function pointer array listing sub-state functions in order of execution
27 volatile uint16_t (*BoostConverterRampUpSubStateMachine[])(volatile struct BOOST_CONVERTER_s *boostInstance) =
28 {
29  SubState_PowerOnDelay,
30  Substate_VCapMonitor,
31  SubState_PrepareVRampUp,
32  SubState_VRampUp,
33  SubState_IRampUp,
34  SubState_PowerGoodDelay
35 };
36 
37 // Declaration variable capturing the size of the sub-state function pointer array
38 volatile uint16_t BoostRampUpSubStateList_size = (sizeof(BoostConverterRampUpSubStateMachine)/sizeof(BoostConverterRampUpSubStateMachine[0]));
39 
40 
41 /***********************************************************************************
42  * @fn uint16_t Substate_VCapMonitor(volatile struct BOOST_CONVERTER_s *boostInstance)
43  * @ingroup lib-layer-boost-state-machine-functions
44  * @brief This function monitors the output capacitor voltage waiting until the voltage has settled
45  * @param boostInstance Pointer to a Boost Converter data object of type struct BOOST_CONVERTER_s
46  * @return unsigned integer (0=failure, 1=success)
47  *
48  * @details
49  * The boost converter output capacitor is by default automatically charged
50  * through the boost rectifier resp. the high-side MOSFET body diode. Before
51  * the power supply is started, the state machine waits for the output
52  * capacitor voltage to settle to reduce component stress during startup.
53  **********************************************************************************/
54 
55 volatile uint16_t Substate_VCapMonitor(volatile struct BOOST_CONVERTER_s *boostInstance)
56 {
57  volatile uint16_t _source=0;
58 
59  // Set BUSY bit until process is complete
60  boostInstance->status.bits.busy = true;
61 
62  // Capture compare value
63  _source = abs(boostInstance->data.v_in - boostInstance->data.v_out);
64 
65  if((_source > boostInstance->startup.vcap_monitor.v_drop) &&
66  (boostInstance->startup.vcap_monitor.period > 0))
67  boostInstance->startup.vcap_monitor.counter = 0; // Reset counter if voltage is not tuned in yet
68 
69  // Monitor settled voltage for the given period of time
70  if (++boostInstance->startup.vcap_monitor.counter >
71  boostInstance->startup.vcap_monitor.period)
72  {
73  boostInstance->startup.vcap_monitor.counter = 0;
74  boostInstance->startup.vcap_monitor.timeout_counter = 0;
75 
76  Nop(); // Please Debugging Breakpoint
77  Nop();
78  Nop();
79 
80  return(BOOST_OPSRET_COMPLETE);
81 
82  }
83 
84  // In case of a timeout, reset state machine and try again
85  if (boostInstance->startup.vcap_monitor.timeout_counter++ >
86  boostInstance->startup.vcap_monitor.timeout)
87  {
88  boostInstance->startup.vcap_monitor.counter = 0;
89  boostInstance->startup.vcap_monitor.timeout_counter = 0;
90 
91  Nop(); // Please Debugging Breakpoint
92  Nop();
93  Nop();
94 
95  return (BOOST_OPSRET_ERROR);
96 
97  }
98 
99  // Recall this sub-state
100  return(BOOST_OPSRET_REPEAT);
101 
102 }
103 
104 /***********************************************************************************
105  * @fn uint16_t SubState_PowerOnDelay(volatile struct BOOST_CONVERTER_s *boostInstance)
106  * @ingroup lib-layer-boost-state-machine-functions
107  * @brief This function delays the startup until the Power-on Delay has expired
108  * @param boostInstance Pointer to a Boost Converter data object of type struct BOOST_CONVERTER_s
109  * @return unsigned integer (0=failure, 1=success)
110  *
111  * @details
112  * After the converter has been cleared to get started, the power-on
113  * delay counter is incremented until the defined power-on delay period
114  * has expired.
115  **********************************************************************************/
116 
117 volatile uint16_t SubState_PowerOnDelay(volatile struct BOOST_CONVERTER_s *boostInstance)
118 {
119  volatile uint16_t retval=0;
120 
121  // Set BUSY bit until process is complete
122  boostInstance->status.bits.busy = true;
123 
124  // delay startup until POWER ON DELAY has expired
125  if(boostInstance->startup.power_on_delay.counter++ > boostInstance->startup.power_on_delay.period)
126  {
127  // Clamp POD counter to EXPIRED
128  boostInstance->startup.power_on_delay.counter =
129  (boostInstance->startup.power_on_delay.period + 1); // Saturate power on counter
130 
131  retval = BOOST_OPSRET_COMPLETE;
132  }
133  else
134  // When the period has not expired yet, return to this function
135  {
136  retval = BOOST_OPSRET_REPEAT;
137  }
138 
139  return(retval);
140 }
141 
142 /***********************************************************************************
143  * @fn uint16_t SubState_PrepareVRampUp(volatile struct BOOST_CONVERTER_s *boostInstance)
144  * @ingroup lib-layer-boost-state-machine-functions
145  * @brief This function calculate and pre-charge PWM outputs with ideal duty cycle
146  * @param boostInstance Pointer to a Boost Converter data object of type struct BOOST_CONVERTER_s
147  * @return unsigned integer (0=failure, 1=success)
148  *
149  * @details
150  * After the POWER ON DELAY has expired, the ramp up starting point is determined
151  * by measuring the input and output voltage and calculates the ideal duty ratio
152  * of the PWM. This value is then programmed into the PWM module duty cycle register
153  * and is also used to pre-charge the control loop output history. In addition the
154  * measured output voltage also set as reference to ensure the loop starts without
155  * jerks and jumps.
156  *
157  * When voltage mode control is enabled, the voltage loop control history is
158  * charged, when average current mode control is enabled, the current loop control
159  * history is charged.
160  **********************************************************************************/
161 
162 volatile uint16_t SubState_PrepareVRampUp(volatile struct BOOST_CONVERTER_s *boostInstance)
163 {
164  volatile uint16_t _i=0;
165  volatile uint32_t _vout=0;
166  volatile uint32_t _vin=0;
167  volatile uint32_t _start_dc=0;
168 
169  // Set BUSY bit until process is complete
170  boostInstance->status.bits.busy = true;
171 
172  // Copy user setting for voltage reference
173  boostInstance->v_loop.reference = boostInstance->set_values.v_ref;
174 
175  // Hijack voltage loop controller reference
176  boostInstance->startup.v_ramp.reference = 0; // Reset Soft-Start Voltage Reference
177  boostInstance->startup.i_ramp.reference = 0; // Reset Soft-Start Current Reference
178  boostInstance->v_loop.controller->Ports.ptrControlReference =
179  &boostInstance->startup.v_ramp.reference; // Voltage loop is pointing to Soft-Start Reference
180 
181  // Pre-charge reference
182  // Never start above the pre-biased output voltage.
183  // Always start at or slightly below the pre-biased output voltage
184  boostInstance->startup.v_ramp.reference = boostInstance->data.v_out;
185 
186  // In average current mode, set current reference limit to max startup current level
187  if (boostInstance->set_values.control_mode == BOOST_CONTROL_MODE_ACMC)
188  { // Disable all current control loops and reset control loop histories
189  boostInstance->v_loop.maximum = boostInstance->set_values.i_ref_startup;
190  boostInstance->v_loop.controller->Limits.MaxOutput = boostInstance->v_loop.maximum;
191  }
192 
193  // Pre-charge PWM and control loop history
194  if(((boostInstance->data.v_in - boostInstance->feedback.ad_vin.scaling.offset) > 0) &&
195  ((boostInstance->data.v_out - boostInstance->feedback.ad_vout.scaling.offset) > 0) )
196  {
197  _vout = __builtin_muluu(
198  (boostInstance->data.v_out - boostInstance->feedback.ad_vout.scaling.offset),
199  boostInstance->feedback.ad_vout.scaling.factor);
200  _vout >>= (16 - boostInstance->feedback.ad_vout.scaling.scaler);
201 
202  _vin = __builtin_muluu(
203  (boostInstance->data.v_in - boostInstance->feedback.ad_vin.scaling.offset),
204  boostInstance->feedback.ad_vin.scaling.factor);
205  _vin >>= (16 - boostInstance->feedback.ad_vin.scaling.scaler);
206 
207  // Protect against negative duty cycle results
208  if (_vout < _vin) _vout = _vin;
209 
210  // CALCULATE BOOST CONVERTER STARTUP DUTY RATIO
211  // DC = (VOUT-VIN) / VOUT, where DC = D * PERIOD
212 
213  if(_vin > 0)
214  {
215  _start_dc = __builtin_muluu((_vout-_vin), boostInstance->sw_node[0].period);
216  _start_dc = __builtin_divud(_start_dc, (uint16_t)_vout);
217  }
218  else
219  { _start_dc = (uint16_t)boostInstance->sw_node[_i].duty_ratio_min; }
220  }
221  else
222  // If there is no input voltage or no output voltage, start with minimum duty ratio
223  {
224  for (_i=0; _i<boostInstance->set_values.no_of_phases; _i++) {
225  _start_dc = (uint16_t)boostInstance->sw_node[_i].duty_ratio_min;
226  }
227  }
228 
229  // Program PWM module and pre-charge control loop
230  if (boostInstance->set_values.control_mode == BOOST_CONTROL_MODE_VMC)
231  {
232  if(_start_dc < boostInstance->v_loop.minimum)
233  { _start_dc = boostInstance->v_loop.minimum; }
234  else if(_start_dc > boostInstance->v_loop.maximum)
235  { _start_dc = boostInstance->v_loop.maximum; }
236  else { /* continue */ }
237 
238  boostInstance->v_loop.ctrl_Precharge(boostInstance->v_loop.controller, 0, _start_dc);
239  *boostInstance->v_loop.controller->Ports.Target.ptrAddress = _start_dc; // set initial PWM duty ratio
240  if(boostInstance->v_loop.controller->Ports.AltTarget.ptrAddress != NULL)
241  *boostInstance->v_loop.controller->Ports.AltTarget.ptrAddress = _start_dc; // set initial PWM duty ratio
242  else { /* continue */ }
243 
244  }
245  else if (boostInstance->set_values.control_mode == BOOST_CONTROL_MODE_ACMC)
246  {
247  // Limit startup duty cycle to largest minimum/smallest maximum
248  for (_i=0; _i<boostInstance->set_values.no_of_phases; _i++) {
249 
250  if(_start_dc < boostInstance->i_loop[_i].minimum)
251  { _start_dc = boostInstance->i_loop[_i].minimum; }
252  else if(_start_dc > boostInstance->i_loop[_i].maximum)
253  { _start_dc = boostInstance->i_loop[_i].maximum; }
254  else { /* continue */ }
255  }
256 
257  // Set initial duty cycle
258  for (_i=0; _i<boostInstance->set_values.no_of_phases; _i++)
259  {
260  // pre-charge current loop control histories with ideal duty cycle
261  boostInstance->i_loop[_i].ctrl_Precharge(
262  boostInstance->i_loop[_i].controller, 0, _start_dc
263  );
264 
265  // pre-charge PWM outputs with ideal duty cycle
266  *boostInstance->i_loop[_i].controller->Ports.Target.ptrAddress = _start_dc; // set initial PWM duty ratio
267  if(boostInstance->i_loop[_i].controller->Ports.AltTarget.ptrAddress != NULL)
268  *boostInstance->i_loop[_i].controller->Ports.AltTarget.ptrAddress = _start_dc; // set initial PWM duty ratio
269  else { /* continue */ }
270  }
271  }
272  else
273  {
274  return(BOOST_OPSRET_ERROR);
275  }
276 
277  return(BOOST_OPSRET_COMPLETE);
278 
279 }
280 
281 /***********************************************************************************
282  * @fn uint16_t SubState_VRampUp(volatile struct BOOST_CONVERTER_s *boostInstance)
283  * @ingroup lib-layer-boost-state-machine-functions
284  * @brief This function ramps up the output voltage to its nominal regulation point
285  * @param boostInstance Pointer to a Boost Converter data object of type struct BOOST_CONVERTER_s
286  * @return unsigned integer (0=failure, 1=success)
287  *
288  * @details
289  * This is the essential step in which the output voltage is ramped up by
290  * incrementing the outer control loop reference. In voltage mode the output
291  * voltage will ramp up to the nominal regulation point.
292  * In average current mode the inner loop will limit the voltage as soon as the
293  * current reference limit is hit and the output is switched to constant current
294  * mode.
295  **********************************************************************************/
296 
297 volatile uint16_t SubState_VRampUp(volatile struct BOOST_CONVERTER_s *boostInstance)
298 {
299  volatile uint16_t retval=1;
300  volatile uint16_t _i=0;
301 
302  // Set BUSY bit until process is complete
303  boostInstance->status.bits.busy = true;
304 
305  // ensure control loop is enabled
306  if(!boostInstance->v_loop.controller->status.bits.enabled) {
307 
308  // Enable all PWM channels
309  retval &= boostPWM_Resume(boostInstance); // Enable PWM outputs
310 
311  // In voltage mode control...
312  if (boostInstance->set_values.control_mode == BOOST_CONTROL_MODE_VMC)
313  { // only enable voltage loop
314  boostInstance->v_loop.controller->status.bits.enabled = true; // enable voltage loop controller
315  }
316  // In average current mode control...
317  else if (boostInstance->set_values.control_mode == BOOST_CONTROL_MODE_ACMC)
318  {
319  // enable voltage loop controller
320  boostInstance->v_loop.controller->status.bits.enabled = true;
321 
322  // enable all phase current loop controllers
323  for (_i=0; _i<boostInstance->set_values.no_of_phases; _i++) {
324  boostInstance->i_loop[_i].controller->status.bits.enabled = true;
325  }
326  }
327  // IF control mode is set to unsupported control mode, return error
328  else
329  {
330  return(BOOST_OPSRET_ERROR);
331  }
332 
333  }
334 
335  // increment reference
336  boostInstance->startup.v_ramp.reference += boostInstance->startup.v_ramp.ref_inc_step;
337 
338  // check if ramp is complete
339  if (boostInstance->startup.v_ramp.reference > boostInstance->v_loop.reference)
340  {
341  // Set reference to the desired level
342  boostInstance->startup.v_ramp.reference = boostInstance->v_loop.reference;
343 
344  // Reconnect API reference to controller
345  boostInstance->v_loop.controller->Ports.ptrControlReference = &boostInstance->v_loop.reference;
346 
347  retval = BOOST_OPSRET_COMPLETE;
348 
349  }
350  else
351  // remain in this state until ramp is complete
352  {
353  retval = BOOST_OPSRET_REPEAT;
354  }
355 
356 
357  return(retval);
358 
359 }
360 
361 /***********************************************************************************
362  * @fn uint16_t SubState_IRampUp(volatile struct BOOST_CONVERTER_s *boostInstance)
363  * @ingroup lib-layer-boost-state-machine-functions
364  * @brief This function is for the average current mode control where the output current is ramped up to nominal current
365  * @param boostInstance Pointer to a Boost Converter data object of type struct BOOST_CONVERTER_s
366  * @return unsigned integer (0=failure, 1=success)
367  *
368  * @details
369  * This phase of the soft-start ramp is only executed in average current mode and
370  * will only take effect when the declared current limit is hit before the nominal
371  * voltage regulation point. In this case the outer voltage loop will clamp the
372  * current reference value and the state will be switched to IRampUp, where the
373  * clamping value of the voltage loop output is ramped up to the declared maximum
374  * current reference value.
375  * This additional state allows powering up the power converter against highly
376  * capacitive loads preventing overshoots caused by down-stream capacitor inrush
377  * currents or when the converter is used as battery charger, where this state
378  * will tune into the constant current charging mode.
379  **********************************************************************************/
380 volatile uint16_t SubState_IRampUp(volatile struct BOOST_CONVERTER_s *boostInstance)
381 {
382  volatile uint16_t retval=0;
383 
384  // Set BUSY bit until process is complete
385  boostInstance->status.bits.busy = true;
386 
387  // in average current mode if voltage limit is hit, increment
388  // voltage loop limit to ramp up current loop
389  if (boostInstance->set_values.control_mode == BOOST_CONTROL_MODE_ACMC)
390  {
391  // Increment maximum current limit
392  boostInstance->v_loop.controller->Limits.MaxOutput += boostInstance->startup.i_ramp.ref_inc_step;
393 
394  if (boostInstance->v_loop.controller->Limits.MaxOutput >= boostInstance->set_values.i_ref_startup)
395  // check if ramp is complete
396  {
397  boostInstance->v_loop.maximum = boostInstance->set_values.i_ref_startup;
398  boostInstance->v_loop.controller->Limits.MaxOutput = boostInstance->v_loop.maximum;
399  retval = BOOST_OPSRET_COMPLETE;
400  }
401  else
402  // if ramp is not complete yet, remain in this state
403  {
404  retval = BOOST_OPSRET_REPEAT;
405  }
406  }
407  else // Non-Current Loops Ending up here need to be lifted to PG_DELAY
408  {
409  boostInstance->v_loop.controller->Limits.MaxOutput = boostInstance->v_loop.maximum;
410  retval = BOOST_OPSRET_COMPLETE;
411  }
412 
413  return(retval);
414 
415 }
416 
417 /***********************************************************************************
418  * @fn uint16_t SubState_PowerGoodDelay(volatile struct BOOST_CONVERTER_s *boostInstance)
419  * @ingroup lib-layer-boost-state-machine-functions
420  * @brief In this function, a counter is incremented until the power good delay has expired.
421  * @param boostInstance Pointer to a Boost Converter data object of type struct BOOST_CONVERTER_s
422  * @return unsigned integer (0=failure, 1=success)
423  *
424  * @details
425  * In this phase of the soft-start procedure a counter is incremented until the
426  * power good delay has expired before the soft-start process is marked as COMPLETED.
427  * If option for driving a user-defined general purpose output (PG output) is enabled
428  * in proprietary user code, this pin will be set automatically.
429  **********************************************************************************/
430 volatile uint16_t SubState_PowerGoodDelay(volatile struct BOOST_CONVERTER_s *boostInstance)
431 {
432  volatile uint16_t retval=0;
433 
434  // Set BUSY bit until process is complete
435  boostInstance->status.bits.busy = true;
436 
437  // increment delay counter until the GOWER GOOD delay has expired
438  if(boostInstance->startup.power_good_delay.counter++ > boostInstance->startup.power_good_delay.period)
439  {
440  boostInstance->startup.power_good_delay.counter =
441  (boostInstance->startup.power_good_delay.period + 1); // Clamp to PERIOD_EXPIRED for future startups
442 
443  // If defined, set POWER_GOOD output
444  if(boostInstance->gpio.PowerGood.enabled)
445  {
446  retval = boostGPIO_Set(&boostInstance->gpio.PowerGood);
447 
448  if(!retval)
449  { retval = BOOST_OPSTATE_ERROR; }
450  }
451 
452  retval = BOOST_OPSRET_COMPLETE;
453 
454  }
455  else
456  // if period has not expired yet, remain in this state
457  {
458  retval = BOOST_OPSRET_REPEAT;
459  }
460 
461  return(retval);
462 
463 }
464 
465 // end of file
enum BOOST_CONTROL_MODE_e control_mode
Fundamental control mode.
volatile struct NPNZ_PORTS_s Ports
Controller input and output ports.
Definition: npnz16b.h:505
volatile struct NPNZ16b_s * controller
pointer to control loop object data structure
volatile int16_t factor
Fractional scaling factor (range -1 ... 0.99969)
volatile uint16_t timeout
Soft-Start VCAP Charge-Up Monitor Period Counter Timeout (state machine fault state trigger)
volatile struct BOOST_STARTUP_PERIOD_HANDLER_s v_ramp
Voltage Ramp-Up period deinitions.
volatile uint16_t period
Soft-Start Period (POD, RAMP PERIOD, PGD, etc.)
volatile uint16_t i_ref_startup
User setting of the initial current reference at startup (used to limit startup currents)
volatile struct BOOST_SWITCH_NODE_SETTINGS_s sw_node[BOOST_MPHASE_COUNT]
BOOST converter switch node settings.
volatile struct BOOST_ADC_INPUT_SETTINGS_s ad_vout
ADC input sampling output voltage.
volatile uint16_t v_ref
User reference setting used to control the power converter controller.
volatile struct NPNZ_PORT_s Target
Primary data output port declaration.
Definition: npnz16b.h:263
volatile struct BOOST_LOOP_SETTINGS_s v_loop
BOOST voltage control loop object.
volatile uint16_t period
Soft-Start VCAP Charge-Up Period (minimum time to wait when voltage has settled)
volatile struct NPNZ_LIMITS_s Limits
Input and output clamping values.
Definition: npnz16b.h:508
volatile uint16_t counter
Soft-Start VCAP Charge-Up Period Counter.
volatile uint16_t ref_inc_step
Size/value of one reference increment/decrement or this period.
volatile uint16_t no_of_phases
number of converter phases
volatile uint16_t period
Switching period.
volatile uint16_t minimum
output clamping value (minimum)
volatile uint16_t v_in
BOOST input voltage.
volatile struct BOOST_CONVERTER_STARTUP_s startup
BOOST startup timing settings.
volatile bool busy
Bit #7: Flag bit indicating that the state machine is executing a process (e.g. startup-ramp)
volatile struct BOOST_STARTUP_PERIOD_HANDLER_s power_good_delay
Power-Good Delay period deinitions.
volatile bool enabled
Specifies, if this IO is used or not.
volatile struct BOOST_ADC_INPUT_SETTINGS_s ad_vin
ADC input sampling input voltage.
void(* ctrl_Precharge)(volatile struct NPNZ16b_s *, volatile fractional, volatile fractional)
Function pointer to PRECHARGE routine.
volatile struct BOOST_GPIO_INSTANCE_s PowerGood
Power Good Output.
volatile uint16_t reference
Control loop reference variable.
volatile uint16_t counter
Soft-Start Execution Counter (read only)
volatile struct BOOST_STARTUP_VCAP_PRECHARGE_s vcap_monitor
Output Capacitor Charging Time period deinitions.
volatile struct BOOST_CONVERTER_DATA_s data
BOOST runtime data.
volatile uint16_t v_drop
Acceptable voltage drop between input and output voltage when output capacitor is charging up.
volatile struct BOOST_LOOP_SETTINGS_s i_loop[BOOST_MPHASE_COUNT]
BOOST Current control loop objects.
volatile struct NPNZ_STATUS_s status
Control Loop Status and Control flags.
Definition: npnz16b.h:504
volatile uint16_t timeout_counter
Soft-Start VCAP Charge-Up Timeout Counter.
volatile int16_t MaxOutput
Maximum output value used for clamping (R/W)
Definition: npnz16b.h:330
volatile struct BOOST_ADC_INPUT_SCALING_s scaling
normalization scaling settings
volatile struct NPNZ_PORT_s AltTarget
Secondary data output port declaration.
Definition: npnz16b.h:264
volatile uint16_t * ptrAddress
Pointer to register or variable where the value is read from (e.g. ADCBUFx) or written to (e....
Definition: npnz16b.h:228
volatile uint16_t maximum
output clamping value (maximum)
volatile uint16_t v_out
BOOST output voltage.
volatile struct BOOST_FEEDBACK_SETTINGS_s feedback
BOOST converter feedback settings.
volatile struct BOOST_CONVERTER_STATUS_s status
BOOST operation status bits.
volatile uint16_t reference
Internal dummy reference used to increment/decrement controller reference.
volatile int16_t offset
Signal offset as signed integer to be subtracted from ADC input.
volatile uint16_t duty_ratio_min
Absolute duty cycle minimum during normal operation.
volatile struct BOOST_GPIO_SETTINGS_s gpio
BOOST converter additional GPIO specification.
volatile uint16_t * ptrControlReference
Pointer to global variable of input register holding the controller reference value (e....
Definition: npnz16b.h:265
volatile struct BOOST_STARTUP_PERIOD_HANDLER_s power_on_delay
Power-On Delay period deinitions.
volatile struct BOOST_STARTUP_PERIOD_HANDLER_s i_ramp
Current Ramp-Up period deinitions.
BOOST control & monitoring data structure.
volatile struct BOOST_CONVERTER_SETTINGS_s set_values
Control field for global access to references.
volatile bool enabled
Bit 15: enables/disables control loop execution.
Definition: npnz16b.h:202
volatile int16_t scaler
Feedback bit-shift scaler used for number normalization.