| Digital Power Starter Kit 3 Firmware dsPIC33C Boost Converter Voltage Mode Control Example |

app_power_config.c
1 /*
2 * File: app_power_config.c
3 * Author: M91406
4 *
5 * Created on January 13, 2021, 12:18 PM
6 */
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 <stddef.h> // include standard definition data types
13
14 #include "config/hal.h" // include hardware abstraction layer declarations
15 #include "app_power_control.h"
16
17 #include "devices/dev_boost_converter.h"
18 #include "drivers/v_loop.h"
19
20 /*******************************************************************************
21 * @ingroup app-layer-power-control-functions-private
22 * @fn volatile uint16_t appPowerSupply_ConverterObjectInitialize(void)
23 * @brief This function initializes the boost converter device driver instance
24 * @return unsigned integer (0=failure, 1=success)
25 *
26 * @details
27 * This function initialize the boost converter object status, reset the boost state
28 * machine, set reference values, clear the runtime data, initialize the switch node,
29 * and setup the feedback channels and start-up settings.
30 *********************************************************************************/
31
32 volatile uint16_t appPowerSupply_ConverterObjectInitialize(void)
33 {
34 volatile uint16_t retval = 1;
35
36 // Initialize Boost Converter Object Status
37 boost.status.bits.ready = false; // Clear READY flag
38 boost.status.bits.adc_active = false; // Clear ADC STARTED flag
39 boost.status.bits.pwm_active = false; // clear PWM STARTED flag
40 boost.status.bits.fault_active = true; // Set global FAULT flag
41
42 boost.status.bits.cs_calib_enable = BOOST_ISNS_OFFSET_CALIBRATION_ENABLE; // Disable current sense feedback calibration
43 boost.status.bits.async_mode = false; // Start up converter in synchronous mode
44 boost.status.bits.autorun = true; // Allow the boost converter to start automatically when cleared of faults
45 boost.status.bits.enabled = false; // Disable boost converter
46
47 // Set Initial State Machine State
48 boost.state_id.value = BOOST_OPSTATE_INITIALIZE; // Reset Boost State Machine
49
50 // Set Reference values
51 boost.set_values.control_mode = BOOST_CONTROL_MODE_VMC; // Set Control Mode
52 boost.set_values.no_of_phases = BOOST_NO_OF_PHASES; // Set number of power train phases
53 boost.set_values.i_ref = BOOST_ISNS_REF; // Set current loop reference
54 boost.set_values.i_ref_startup = BOOST_ISNS_REF_STARTUP; // Set current loop reference at startup
55 boost.set_values.v_ref = BOOST_VOUT_REF; // Set voltage loop reference
56
57 // Clear Runtime Data
58 boost.data.v_out = 0; // Reset output voltage value
59 boost.data.i_sns[0] = 0; // Reset output current value
60 boost.data.v_in = 0; // Reset input voltage value
61 boost.data.temp = 0; // Reset output temperature value
62
63 // Initialize Switch Node
64 boost.sw_node[0].pwm_instance = BOOST_PWM_CHANNEL;
65 boost.sw_node[0].gpio_instance = BOOST_PWM_GPIO_INSTANCE;
66 boost.sw_node[0].gpio_high = BOOST_PWM_GPIO_PORT_PINH;
67 boost.sw_node[0].gpio_low = BOOST_PWM_GPIO_PORT_PINL;
68 boost.sw_node[0].swap_outputs = BOOST_PWM_OUTPUT_SWAP;
69 boost.sw_node[0].master_period_enable = false;
70 boost.sw_node[0].sync_drive = false;
71 boost.sw_node[0].period = BOOST_PWM_PERIOD;
72 boost.sw_node[0].phase = BOOST_PWM_PHASE_SHIFT;
73 boost.sw_node[0].duty_ratio_min = BOOST_PWM_DC_MIN;
74 boost.sw_node[0].duty_ratio_init = BOOST_PWM_DC_MIN;
75 boost.sw_node[0].duty_ratio_max = BOOST_PWM_DC_MAX;
76 boost.sw_node[0].dead_time_rising = BOOST_PWM_DEAD_TIME_LE;
77 boost.sw_node[0].dead_time_falling = BOOST_PWM_DEAD_TIME_FE;
78 boost.sw_node[0].leb_period = BOOST_LEB_PERIOD;
79 boost.sw_node[0].trigger_offset = BOOST_PWM_ADTR1OFS;
80 boost.sw_node[0].trigger_scaler = BOOST_PWM_ADTR1PS;
81 boost.sw_node[0].high_resolution_enable = PWM_CLOCK_HIGH_RESOLUTION;
82
83 // Initialize additional GPIOs
84
85 // ~~~ EXTERNAL ENABLE INPUT ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
86 boost.gpio.EnableInput.enabled = false; // this converter doesn't support external enable control
87 // ~~~ EXTERNAL ENABLE INPUT END ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
88
89 // ~~~ POWER GOOD OUTPUT ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
90
91 boost.gpio.PowerGood.enabled = true; // This converter supports an additional POWER GOOD output
92 boost.gpio.PowerGood.port = PWRGOOD_PORT; // Number of the GPIO port (0=A, 1=B, 2=C, etc.)
93 boost.gpio.PowerGood.pin = PWRGOOD_PIN; // Number of the GPIO port pin
94 boost.gpio.PowerGood.polarity = 0; // This pin is ACTIVE HIGH (only required if io_type = OUTPUT)
95 boost.gpio.PowerGood.io_type = 0; // This pin is configured as OUTPUT
96
97 // ~~~ POWER GOOD OUTPUT END ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
98
99
100 // Initialize Feedback Channels
101
102 // ~~~ OUTPUT VOLTAGE FEEDBACK ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
103
104 boost.feedback.ad_vout.enabled = true; // Use this channel
105
106 boost.feedback.ad_vout.adc_input = BOOST_VOUT_ADCIN;
107 boost.feedback.ad_vout.adc_core = BOOST_VOUT_ADCCORE;
108 boost.feedback.ad_vout.adc_buffer = &BOOST_VOUT_ADCBUF;
109 boost.feedback.ad_vout.trigger_source = BOOST_VOUT_TRGSRC;
110
111 boost.feedback.ad_vout.differential_input = false;
112 boost.feedback.ad_vout.interrupt_enable = true;
113 boost.feedback.ad_vout.early_interrupt_enable = true;
114 boost.feedback.ad_vout.level_trigger = true;
115 boost.feedback.ad_vout.signed_result = false;
116
117 boost.feedback.ad_vout.scaling.factor = BOOST_VOUT_NORM_FACTOR;
118 boost.feedback.ad_vout.scaling.scaler = BOOST_VOUT_NORM_SCALER;
119 boost.feedback.ad_vout.scaling.offset = BOOST_VOUT_OFFSET;
120
121 BOOST_VOUT_ANSEL = boost.feedback.ad_vout.enabled;
122
123 // ~~~ OUTPUT VOLTAGE FEEDBACK END ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
124
125 // ~~~ INPUT VOLTAGE FEEDBACK ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
126
127 boost.feedback.ad_vin.enabled = true; // Use this channel
128
129 boost.feedback.ad_vin.adc_input = BOOST_VIN_ADCIN;
130 boost.feedback.ad_vin.adc_core = BOOST_VIN_ADCCORE;
131 boost.feedback.ad_vin.adc_buffer = &BOOST_VIN_ADCBUF;
132 boost.feedback.ad_vin.trigger_source = BOOST_VIN_TRGSRC;
133
134 boost.feedback.ad_vin.differential_input = false;
135 boost.feedback.ad_vin.interrupt_enable = false;
136 boost.feedback.ad_vin.early_interrupt_enable = false;
137 boost.feedback.ad_vin.level_trigger = false;
138 boost.feedback.ad_vin.signed_result = false;
139
140 boost.feedback.ad_vin.scaling.factor = BOOST_VIN_NORM_FACTOR;
141 boost.feedback.ad_vin.scaling.scaler = BOOST_VIN_NORM_SCALER;
142 boost.feedback.ad_vin.scaling.offset = BOOST_VIN_OFFSET;
143
144 BOOST_VIN_ANSEL = boost.feedback.ad_vin.enabled;
145
146 // ~~~ INPUT VOLTAGE FEEDBACK END ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
147
148 // ~~~ OUTPUT CURRENT FEEDBACK ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
149
150 boost.feedback.ad_isns[0].enabled = true; // Use this channel
151
152 boost.feedback.ad_isns[0].adc_input = BOOST_ISNS_ADCIN;
153 boost.feedback.ad_isns[0].adc_core = BOOST_ISNS_ADCCORE;
154 boost.feedback.ad_isns[0].adc_buffer = &BOOST_ISNS_ADCBUF;
155 boost.feedback.ad_isns[0].trigger_source = BOOST_ISNS_TRGSRC;
156
157 boost.feedback.ad_isns[0].differential_input = false;
158 boost.feedback.ad_isns[0].interrupt_enable = false;
159 boost.feedback.ad_isns[0].early_interrupt_enable = false;
160 boost.feedback.ad_isns[0].level_trigger = true;
161 boost.feedback.ad_isns[0].signed_result = false;
162
163 boost.feedback.ad_isns[0].scaling.factor = BOOST_ISNS_NORM_FACTOR;
164 boost.feedback.ad_isns[0].scaling.scaler = BOOST_ISNS_NORM_SCALER;
165 boost.feedback.ad_isns[0].scaling.offset = BOOST_ISNS_FB_OFFSET;
166
167 BOOST_ISNS_ANSEL = boost.feedback.ad_isns[0].enabled;
168
169 // ~~~ OUTPUT CURRENT FEEDBACK END ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
170
171 // ~~~ TEMPERATURE FEEDBACK ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
172
173 boost.feedback.ad_temp.enabled = true; // Use this channel
174
175 boost.feedback.ad_temp.adc_input = TEMP_ADCIN;
176 boost.feedback.ad_temp.adc_core = TEMP_ADCCORE;
177 boost.feedback.ad_temp.adc_buffer = &TEMP_ADCBUF;
178 boost.feedback.ad_temp.trigger_source = TEMP_TRGSRC;
179
180 boost.feedback.ad_temp.differential_input = false;
181 boost.feedback.ad_temp.interrupt_enable = false;
182 boost.feedback.ad_temp.early_interrupt_enable = false;
183 boost.feedback.ad_temp.level_trigger = false;
184 boost.feedback.ad_temp.signed_result = false;
185
186 TEMP_ANSEL = boost.feedback.ad_temp.enabled;
187
188 // ~~~ TEMPERATURE FEEDBACK END ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
189
190 // Initialize Startup Settings
191
192 boost.startup.power_on_delay.counter = 0;
193 boost.startup.power_on_delay.period = BOOST_POD;
194 boost.startup.power_on_delay.ref_inc_step = 0;
195 boost.startup.power_on_delay.reference = 0;
196
197 boost.startup.v_ramp.counter = 0;
198 boost.startup.v_ramp.period = BOOST_VRAMP_PER;
199 boost.startup.v_ramp.ref_inc_step = BOOST_VREF_STEP;
200 if (boost.startup.v_ramp.ref_inc_step == 0)
201 boost.startup.v_ramp.ref_inc_step = 1;
202 boost.startup.v_ramp.reference = 0;
203
204 if (boost.set_values.control_mode == BOOST_CONTROL_MODE_ACMC)
205 {
206 boost.startup.i_ramp.counter = 0;
207 boost.startup.i_ramp.period = BOOST_IRAMP_PER;
208 boost.startup.i_ramp.ref_inc_step = BOOST_IREF_STEP;
209 boost.startup.i_ramp.reference = 0;
210 }
211
212 boost.startup.power_good_delay.counter = 0;
213 boost.startup.power_good_delay.period = BOOST_PGD;
214 boost.startup.power_good_delay.ref_inc_step = 0;
215 boost.startup.power_good_delay.reference = BOOST_VOUT_REF;
216
217 boost.startup.vcap_monitor.counter = 0;
218 boost.startup.vcap_monitor.timeout_counter = 0;
219 boost.startup.vcap_monitor.period = BOOST_CHRG_PER;
220 boost.startup.vcap_monitor.timeout = BOOST_CHRG_TOUT;
221 boost.startup.vcap_monitor.v_drop = BOOST_VOUT_VFWD_DROP;
222
223 return(retval);
224 }
225
226
227 /*******************************************************************************
228 * @ingroup app-layer-power-control-functions-private
229 * @fn volatile uint16_t appPowerSupply_ControllerInitialize(void)
230 * @brief This function initializes the control system feedback loop objects
231 * @return 0=failure
232 * @return 1=success
233 *
234 * @details
235 * This function allows the user to set up and initialize the loop configuration. This
236 * includes the following setup.
237 * - Initialize Default Loop Configuration
238 * - Set Controller Object of Voltage Loop
239 * - Configure Voltage Loop Controller Object
240 * - Configure controller input/output ports
241 * - Data Input/Output Limit Configuration
242 * - ADC Trigger Control Configuration
243 * - Data Provider Configuration
244 * - Cascaded Function Configuration
245 * - Initialize Advanced Control Settings
246 * - Custom Advanced Control Settings
247 *********************************************************************************/
248
249 volatile uint16_t appPowerSupply_ControllerInitialize(void)
250 {
251 volatile uint16_t retval = 1;
252
253 // ~~~ VOLTAGE LOOP CONFIGURATION ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
254
255 // Initialize Default Loop Configuration
256 boost.v_loop.feedback_offset = BOOST_VOUT_OFFSET;
257 boost.v_loop.reference = BOOST_VOUT_REF;
258 boost.v_loop.minimum = BOOST_PWM_DC_MIN;
259 boost.v_loop.maximum = BOOST_PWM_DC_MAX;
260 boost.v_loop.trigger_offset = ((BOOST_PWM_PERIOD >> 1) + BOOST_VOUT_ADC_TRGDLY);
261
262 // Set Controller Object of Voltage Loop
263 boost.v_loop.controller = &v_loop;
264 boost.v_loop.ctrl_Initialize = &v_loop_Initialize;
265 boost.v_loop.ctrl_Update = &v_loop_Update;
266 boost.v_loop.ctrl_Reset = &v_loop_Reset;
267 boost.v_loop.ctrl_Precharge = &v_loop_Precharge;
268
269 // Configure Voltage Loop Controller Object
270 boost.v_loop.ctrl_Initialize(&v_loop); // Call Initialization Routine setting histories and scaling
271
272 // Configure controller input ports
273 boost.v_loop.controller->Ports.Source.ptrAddress = &BOOST_VOUT_ADCBUF; // Output Voltage is Common Source
274 boost.v_loop.controller->Ports.Source.Offset = boost.v_loop.feedback_offset; // Output Voltage feedback signal offset
275 boost.v_loop.controller->Ports.Source.NormScaler = BOOST_VOUT_NORM_SCALER; // Output voltage normalization factor bit-shift scaler
276 boost.v_loop.controller->Ports.Source.NormFactor = BOOST_VOUT_NORM_FACTOR; // Output voltage normalization factor fractional
277
278 boost.v_loop.controller->Ports.AltSource.ptrAddress = &BOOST_VIN_ADCBUF; // Input Voltage Is Alternate Source
279 boost.v_loop.controller->Ports.AltSource.Offset = BOOST_VIN_OFFSET; // Input Voltage feedback signal offset
280 boost.v_loop.controller->Ports.AltSource.NormScaler = BOOST_VIN_NORM_SCALER; // Input voltage normalization factor bit-shift scaler
281 boost.v_loop.controller->Ports.AltSource.NormFactor = BOOST_VIN_NORM_FACTOR; // Input voltage normalization factor fractional
282
283 // Configure controller output ports
284 boost.v_loop.controller->Ports.Target.ptrAddress = &BOOST_PWM_PDC; // PWM Duty Cycle is Control Target
285 boost.v_loop.controller->Ports.Target.Offset = 0; // Static primary output value offset
286 boost.v_loop.controller->Ports.Target.NormScaler = 0; // Primary control output normalization factor bit-shift scaler
287 boost.v_loop.controller->Ports.Target.NormFactor = 0x7FFF; // Primary control output normalization factor fractional
288
289 boost.v_loop.controller->Ports.AltTarget.ptrAddress = NULL; // No alternate target used
290 boost.v_loop.controller->Ports.AltTarget.Offset = 0; // Static secondary output value offset
291 boost.v_loop.controller->Ports.AltTarget.NormScaler = 0; // Secondary control output normalization factor bit-shift scaler
292 boost.v_loop.controller->Ports.AltTarget.NormFactor = 0x7FFF; // Secondary control output normalization factor fractional
293
294 // Configure controller control ports
295 boost.v_loop.controller->Ports.ptrControlReference = &boost.v_loop.reference; // Set pointer to Reference
296
297 // Data Input/Output Limit Configuration
298 boost.v_loop.controller->Limits.MinOutput = boost.v_loop.minimum;
299 boost.v_loop.controller->Limits.MaxOutput = boost.v_loop.maximum;
300 boost.v_loop.controller->Limits.AltMinOutput = 0; // not used
301 boost.v_loop.controller->Limits.AltMaxOutput = 0; // not used
302
303 // ADC Trigger Control Configuration
304 boost.v_loop.controller->ADCTriggerControl.ptrADCTriggerARegister = &BOOST_VOUT_ADCTRIG;
305 boost.v_loop.controller->ADCTriggerControl.ADCTriggerAOffset = boost.v_loop.trigger_offset;
306 boost.v_loop.controller->ADCTriggerControl.ptrADCTriggerBRegister = &BOOST_VIN_ADCTRIG;
307 boost.v_loop.controller->ADCTriggerControl.ADCTriggerBOffset = BOOST_ISNS_ADC_TRGDLY;
308
309 // Data Provider Configuration
310 boost.v_loop.controller->DataProviders.ptrDProvControlInput = &boost.data.control_input;
311 boost.v_loop.controller->DataProviders.ptrDProvControlInputCompensated = &boost.data.v_out;
312 boost.v_loop.controller->DataProviders.ptrDProvControlError = &boost.data.control_error;
313 boost.v_loop.controller->DataProviders.ptrDProvControlOutput = &boost.data.control_output;
314
315 // User Extension Function Configuration
316 /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
317 *
318 * PowerSmart DCLD allows users to create and call user extension
319 * functions from specific locations of the main control loop to
320 * cover design-specific requirements and features which are not
321 * supported by the main controller by default.
322 *
323 * Control Loop User Extension Declaration Example:
324 *
325 * boost.v_loop.controller->ExtensionHooks.ptrExtHookStartFunction = (uint16_t)&my_function;
326 *
327 * Control Loop User Extension Parameter Declaration Example (optional):
328 *
329 * boost.v_loop.controller->ExtensionHooks.ExtHookStartFunctionParam = 512;
330 *
331 * Please refer to the PowerSmart DCLD User Guide for more details about
332 * how to use this feature, its requirements and limitations.
333 *
334 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
335 */
336
337 boost.v_loop.controller->ExtensionHooks.ptrExtHookStartFunction = (uint16_t)NULL;
338 boost.v_loop.controller->ExtensionHooks.ExtHookStartFunctionParam = 0;
339 boost.v_loop.controller->ExtensionHooks.ptrExtHookSourceFunction = (uint16_t)NULL;
340 boost.v_loop.controller->ExtensionHooks.ExtHookSourceFunctionParam = 0;
341 boost.v_loop.controller->ExtensionHooks.ptrExtHookPreAntiWindupFunction = (uint16_t)NULL;
342 boost.v_loop.controller->ExtensionHooks.ExtHookPreAntiWindupFunctionParam = 0;
343 boost.v_loop.controller->ExtensionHooks.ptrExtHookPreTargetWriteFunction = (uint16_t)NULL;
344 boost.v_loop.controller->ExtensionHooks.ExtHookPreTargetWriteFunctionParam = 0;
345 boost.v_loop.controller->ExtensionHooks.ptrExtHookEndOfLoopFunction = (uint16_t)NULL;
346 boost.v_loop.controller->ExtensionHooks.ExtHookEndOfLoopFunctionParam = 0;
347 boost.v_loop.controller->ExtensionHooks.ptrExtHookExitFunction = (uint16_t)NULL;
348 boost.v_loop.controller->ExtensionHooks.ExtHookExitFunctionParam = 0;
349
350 // Initialize Advanced Control Settings (not used in this code example)
351 boost.v_loop.controller->GainControl.AgcFactor = 0x7FFF; // Adaptive Gain Control factor fractional
352 boost.v_loop.controller->GainControl.AgcScaler = 0x0000; // Adaptive Gain Control factor bit-shift scaler
353 boost.v_loop.controller->GainControl.AgcMedian = 0x0000; // Q15 number representing normalized Nominal Operating Point
354
355 // Custom Advanced Control Settings
356 boost.v_loop.controller->Advanced.usrParam0 = 0; // No additional advanced control options used
357 boost.v_loop.controller->Advanced.usrParam1 = 0; // No additional advanced control options used
358 boost.v_loop.controller->Advanced.usrParam2 = 0; // No additional advanced control options used
359 boost.v_loop.controller->Advanced.usrParam3 = 0; // No additional advanced control options used
360 boost.v_loop.controller->Advanced.usrParam4 = 0; // No additional advanced control options used
361 boost.v_loop.controller->Advanced.usrParam5 = 0; // No additional advanced control options used
362 boost.v_loop.controller->Advanced.usrParam6 = 0; // No additional advanced control options used
363 boost.v_loop.controller->Advanced.usrParam7 = 0; // No additional advanced control options used
364
365 // Reset Controller Status
366 boost.v_loop.controller->status.bits.enabled = false; // Keep controller disabled
367 boost.v_loop.controller->status.bits.swap_source = false; // use SOURCE as major control input
368 boost.v_loop.controller->status.bits.swap_target = false; // use TARGET as major control output
369 boost.v_loop.controller->status.bits.invert_input = false; // Do not invert input value
370 boost.v_loop.controller->status.bits.lower_saturation_event = false; // Reset Anti-Windup Minimum Status bit
371 boost.v_loop.controller->status.bits.upper_saturation_event = false; // Reset Anti-Windup Minimum Status bits
372 boost.v_loop.controller->status.bits.agc_enabled = false; // Enable Adaptive Gain Modulation by default
373
374 // ~~~ VOLTAGE LOOP CONFIGURATION END ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
375
376
377 return(retval);
378 }
379
380 /*******************************************************************************
381 * @ingroup app-layer-power-control-functions-private
382 * @fn volatile uint16_t appPowerSupply_PeripheralsInitialize(void)
383 * @brief This function is used to load peripheral configuration templates from the power controller device driver
384 * @return 0=failure
385 * @return 1=success
386 *
387 * @details
388 * This function hand over the peripheral configuration to the boost converter driver
389 *********************************************************************************/
390
391 volatile uint16_t appPowerSupply_PeripheralsInitialize(void)
392 {
393 volatile uint16_t retval=1;
394
395 retval &= drv_BoostConverter_Initialize(&boost);
396
397 return(retval);
398 }
399
400
401 // end of file
BOOST_VOUT_VFWD_DROP
#define BOOST_VOUT_VFWD_DROP
Macro calculating the integer number equivalent of the maximum forward voltage drop across teh rectif...
Definition: dpsk3_hwdescr.h:1153
NPNZ_EXTENSION_HOOKS_s::ptrExtHookSourceFunction
volatile uint16_t ptrExtHookSourceFunction
Pointer to Function which will be called after the source has been read and compensated....
Definition: npnz16b.h:415
BOOST_CONVERTER_SETTINGS_s::control_mode
enum BOOST_CONTROL_MODE_e control_mode
Fundamental control mode.
Definition: dev_boost_typedef.h:350
BOOST_ADC_INPUT_SETTINGS_s::trigger_source
volatile uint8_t trigger_source
input channel trigger source
Definition: dev_boost_typedef.h:459
BOOST_SWITCH_NODE_SETTINGS_s::pwm_instance
volatile uint16_t pwm_instance
number of the PWM channel used
Definition: dev_boost_typedef.h:404
BOOST_PWM_ADTR1PS
#define BOOST_PWM_ADTR1PS
ADC Trigger 1 Postscaler: 0...31.
Definition: dpsk3_hwdescr.h:964
NPNZ_LIMITS_s::MinOutput
volatile int16_t MinOutput
Minimum output value used for clamping (R/W)
Definition: npnz16b.h:329
NPNZ_DATA_PROVIDERS_s::ptrDProvControlInput
volatile uint16_t * ptrDProvControlInput
Pointer to external data buffer of most recent, raw control input.
Definition: npnz16b.h:383
NPNZ_PORTS_s::AltSource
volatile struct NPNZ_PORT_s AltSource
Secondary data input port declaration.
Definition: npnz16b.h:262
NPNZ_EXTENSION_HOOKS_s::ExtHookSourceFunctionParam
volatile uint16_t ExtHookSourceFunctionParam
Parameter of function called (can be a variable or a pointer to a data structure)....
Definition: npnz16b.h:416
NPNZ16b_s::Ports
volatile struct NPNZ_PORTS_s Ports
Controller input and output ports.
Definition: npnz16b.h:505
NPNZ_DATA_PROVIDERS_s::ptrDProvControlError
volatile uint16_t * ptrDProvControlError
Pointer to external data buffer of most recent control error.
Definition: npnz16b.h:385
BOOST_LOOP_SETTINGS_s::controller
volatile struct NPNZ16b_s * controller
pointer to control loop object data structure
Definition: dev_boost_typedef.h:380
BOOST_ADC_INPUT_SCALING_s::factor
volatile int16_t factor
Fractional scaling factor (range -1 ... 0.99969)
Definition: dev_boost_typedef.h:439
NPNZ_PORT_s::Offset
volatile int16_t Offset
Value/signal offset of this port.
Definition: npnz16b.h:231
BOOST_LOOP_SETTINGS_s::ctrl_Update
void(* ctrl_Update)(volatile struct NPNZ16b_s *)
Function pointer to UPDATE routine.
Definition: dev_boost_typedef.h:384
BOOST_STARTUP_VCAP_PRECHARGE_s::timeout
volatile uint16_t timeout
Soft-Start VCAP Charge-Up Monitor Period Counter Timeout (state machine fault state trigger)
Definition: dev_boost_typedef.h:292
BOOST_CONVERTER_STARTUP_s::v_ramp
volatile struct BOOST_STARTUP_PERIOD_HANDLER_s v_ramp
Voltage Ramp-Up period deinitions.
Definition: dev_boost_typedef.h:309
BOOST_SWITCH_NODE_SETTINGS_s::dead_time_falling
volatile uint16_t dead_time_falling
Dead time setting at falling edge of a half-bridge drive.
Definition: dev_boost_typedef.h:418
NPNZ_EXTENSION_HOOKS_s::ExtHookExitFunctionParam
volatile uint16_t ExtHookExitFunctionParam
Parameter of function called (can be a variable or a pointer to a data structure)....
Definition: npnz16b.h:428
BOOST_VOUT_NORM_FACTOR
#define BOOST_VOUT_NORM_FACTOR
VOUT normalization factor scaled in Q15.
Definition: dpsk3_hwdescr.h:1157
BOOST_PWM_GPIO_INSTANCE
#define BOOST_PWM_GPIO_INSTANCE
Number indicating device port, where 0=Port RA, 0=Port RB, 0=Port RC, etc.
Definition: dpsk3_hwdescr.h:938
BOOST_SWITCH_NODE_SETTINGS_s::leb_period
volatile uint16_t leb_period
Leading-Edge Blanking period.
Definition: dev_boost_typedef.h:419
BOOST_CONVERTER_STATUS_s::adc_active
volatile bool adc_active
Bit #1: indicating that ADC has been started and samples are taken.
Definition: dev_boost_typedef.h:210
BOOST_SWITCH_NODE_SETTINGS_s::swap_outputs
volatile bool swap_outputs
Selecting if PWMxH (default) or PWMxL should be the leading PWM output.
Definition: dev_boost_typedef.h:408
BOOST_CONVERTER_STATUS_s::fault_active
volatile bool fault_active
Bit #5: Flag bit indicating system is in enforced shut down mode (usually due to a fault condition)
Definition: dev_boost_typedef.h:214
BOOST_SWITCH_NODE_SETTINGS_s::trigger_scaler
volatile uint16_t trigger_scaler
PWM triggers for ADC will be generated every n-th cycle.
Definition: dev_boost_typedef.h:420
BOOST_VOUT_TRGSRC
#define BOOST_VOUT_TRGSRC
PWM2 (=PG2) Trigger 1 via PGxTRIGA.
Definition: dpsk3_hwdescr.h:1127
BOOST_SWITCH_NODE_SETTINGS_s::high_resolution_enable
volatile bool high_resolution_enable
Selecting if PWM module should use high-resolution mode.
Definition: dev_boost_typedef.h:410
NPNZ_STATUS_s::swap_source
volatile bool swap_source
Bit 13: when set, AltSource is used as data input to controller.
Definition: npnz16b.h:200
BOOST_VIN_ADCCORE
#define BOOST_VIN_ADCCORE
0=Dedicated Core #0, 1=Dedicated Core #1, 8=Shared ADC Core
Definition: dpsk3_hwdescr.h:1040
BOOST_CONVERTER_DATA_s::control_output
volatile uint16_t control_output
BOOST most recent control output value.
Definition: dev_boost_typedef.h:332
BOOST_ADC_INPUT_SETTINGS_s::adc_input
volatile uint8_t adc_input
number of the ADC input channel used
Definition: dev_boost_typedef.h:457
BOOST_STARTUP_PERIOD_HANDLER_s::period
volatile uint16_t period
Soft-Start Period (POD, RAMP PERIOD, PGD, etc.)
Definition: dev_boost_typedef.h:267
NPNZ_USER_DATA_BUFFER_s::usrParam3
volatile uint16_t usrParam3
generic 16-bit wide, user-defined parameter #4 for advanced control options
Definition: npnz16b.h:479
NPNZ_PORTS_s::Source
volatile struct NPNZ_PORT_s Source
Primary data input port declaration.
Definition: npnz16b.h:261
BOOST_CONVERTER_SETTINGS_s::i_ref_startup
volatile uint16_t i_ref_startup
User setting of the initial current reference at startup (used to limit startup currents)
Definition: dev_boost_typedef.h:354
NPNZ_GAIN_CONTROL_s::AgcFactor
volatile fractional AgcFactor
Q15 value of Adaptive Gain Modulation factor.
Definition: npnz16b.h:454
BOOST_PWM_OUTPUT_SWAP
#define BOOST_PWM_OUTPUT_SWAP
true = PWMxH is the leading PWM output, false = PWMxL is the leading PWM output
Definition: dpsk3_hwdescr.h:941
BOOST_CONVERTER_s::sw_node
volatile struct BOOST_SWITCH_NODE_SETTINGS_s sw_node[BOOST_MPHASE_COUNT]
BOOST converter switch node settings.
Definition: dev_boost_typedef.h:536
BOOST_FEEDBACK_SETTINGS_s::ad_vout
volatile struct BOOST_ADC_INPUT_SETTINGS_s ad_vout
ADC input sampling output voltage.
Definition: dev_boost_typedef.h:479
BOOST_PWM_GPIO_PORT_PINH
#define BOOST_PWM_GPIO_PORT_PINH
Port Pin Number.
Definition: dpsk3_hwdescr.h:939
BOOST_SWITCH_NODE_SETTINGS_s::dead_time_rising
volatile uint16_t dead_time_rising
Dead time setting at rising edge of a half-bridge drive.
Definition: dev_boost_typedef.h:417
BOOST_VOUT_NORM_SCALER
#define BOOST_VOUT_NORM_SCALER
VOUT normalization.
Definition: dpsk3_hwdescr.h:1156
BOOST_ADC_INPUT_SETTINGS_s::enabled
volatile bool enabled
input channel enable bit
Definition: dev_boost_typedef.h:454
BOOST_PWM_PDC
#define BOOST_PWM_PDC
PWM Instance Duty Cycle Register.
Definition: dpsk3_hwdescr.h:943
BOOST_CONVERTER_SETTINGS_s::v_ref
volatile uint16_t v_ref
User reference setting used to control the power converter controller.
Definition: dev_boost_typedef.h:352
BOOST_SWITCH_NODE_SETTINGS_s::gpio_instance
volatile uint16_t gpio_instance
GPIO instance of the selected PWM generator.
Definition: dev_boost_typedef.h:405
NPNZ_USER_DATA_BUFFER_s::usrParam6
volatile uint16_t usrParam6
generic 16-bit wide, user-defined parameter #7 for advanced control options
Definition: npnz16b.h:482
NPNZ_PORTS_s::Target
volatile struct NPNZ_PORT_s Target
Primary data output port declaration.
Definition: npnz16b.h:263
BOOST_CONVERTER_DATA_s::control_error
volatile uint16_t control_error
BOOST most recent control error value.
Definition: dev_boost_typedef.h:331
BOOST_CONVERTER_s::v_loop
volatile struct BOOST_LOOP_SETTINGS_s v_loop
BOOST voltage control loop object.
Definition: dev_boost_typedef.h:539
BOOST_STARTUP_VCAP_PRECHARGE_s::period
volatile uint16_t period
Soft-Start VCAP Charge-Up Period (minimum time to wait when voltage has settled)
Definition: dev_boost_typedef.h:290
NPNZ_USER_DATA_BUFFER_s::usrParam1
volatile uint16_t usrParam1
generic 16-bit wide, user-defined parameter #2 for advanced control options
Definition: npnz16b.h:477
NPNZ16b_s::Limits
volatile struct NPNZ_LIMITS_s Limits
Input and output clamping values.
Definition: npnz16b.h:508
BOOST_PWM_PERIOD
#define BOOST_PWM_PERIOD
This sets the switching period of the converter.
Definition: dpsk3_hwdescr.h:984
BOOST_STARTUP_VCAP_PRECHARGE_s::counter
volatile uint16_t counter
Soft-Start VCAP Charge-Up Period Counter.
Definition: dev_boost_typedef.h:289
BOOST_VOUT_ADCBUF
#define BOOST_VOUT_ADCBUF
ADC input buffer of this ADC channel.
Definition: dpsk3_hwdescr.h:1125
BOOST_STARTUP_PERIOD_HANDLER_s::ref_inc_step
volatile uint16_t ref_inc_step
Size/value of one reference increment/decrement or this period.
Definition: dev_boost_typedef.h:269
BOOST_ISNS_NORM_FACTOR
#define BOOST_ISNS_NORM_FACTOR
ISNS normalization factor scaled in Q15.
Definition: dpsk3_hwdescr.h:1243
BOOST_SWITCH_NODE_SETTINGS_s::duty_ratio_init
volatile uint16_t duty_ratio_init
Initial duty cycle when the PWM module is being turned on.
Definition: dev_boost_typedef.h:414
BOOST_CONVERTER_SETTINGS_s::no_of_phases
volatile uint16_t no_of_phases
number of converter phases
Definition: dev_boost_typedef.h:351
NPNZ_STATUS_s::agc_enabled
volatile bool agc_enabled
Bit 11: when set, Adaptive Gain Control Modulation is enabled.
Definition: npnz16b.h:198
BOOST_VIN_OFFSET
#define BOOST_VIN_OFFSET
Input voltage feedback offset.
Definition: dpsk3_hwdescr.h:1071
BOOST_CONVERTER_SETTINGS_s::i_ref
volatile uint16_t i_ref
User reference setting used to control the power converter controller.
Definition: dev_boost_typedef.h:353
BOOST_GPIO_INSTANCE_s::io_type
volatile uint16_t io_type
Input/Output definition (0=push-pull output, 1=input, 2=open-drain output)
Definition: dev_boost_typedef.h:503
BOOST_PWM_GPIO_PORT_PINL
#define BOOST_PWM_GPIO_PORT_PINL
Port Pin Number.
Definition: dpsk3_hwdescr.h:940
BOOST_STATE_ID_s::value
volatile uint32_t value
Definition: dev_boost_typedef.h:246
BOOST_PWM_PHASE_SHIFT
#define BOOST_PWM_PHASE_SHIFT
This sets the phase shift between phase #1 and #2.
Definition: dpsk3_hwdescr.h:985
NPNZ_GAIN_CONTROL_s::AgcMedian
volatile fractional AgcMedian
Q15 value of Adaptive Gain Modulation nominal operating point.
Definition: npnz16b.h:455
BOOST_SWITCH_NODE_SETTINGS_s::gpio_low
volatile uint16_t gpio_low
GPIO port pin-number of PWMxL of the selected PWM generator.
Definition: dev_boost_typedef.h:407
BOOST_VIN_ANSEL
#define BOOST_VIN_ANSEL
GPIO analog function mode enable bit.
Definition: dpsk3_hwdescr.h:1039
BOOST_SWITCH_NODE_SETTINGS_s::period
volatile uint16_t period
Switching period.
Definition: dev_boost_typedef.h:412
BOOST_VOUT_ADC_TRGDLY
#define BOOST_VOUT_ADC_TRGDLY
Macro calculating the integer number equivalent of the signal chain time delay between internal PWM t...
Definition: dpsk3_hwdescr.h:1152
BOOST_ISNS_FB_OFFSET
#define BOOST_ISNS_FB_OFFSET
Definition: dpsk3_hwdescr.h:1238
BOOST_SWITCH_NODE_SETTINGS_s::sync_drive
volatile bool sync_drive
Selecting if switch node is driven in synchronous or asnchronous mode.
Definition: dev_boost_typedef.h:411
NPNZ16b_s::Advanced
volatile struct NPNZ_USER_DATA_BUFFER_s Advanced
Parameter section for advanced user control options.
Definition: npnz16b.h:512
BOOST_SWITCH_NODE_SETTINGS_s::phase
volatile uint16_t phase
Switching signal phase-shift.
Definition: dev_boost_typedef.h:413
BOOST_VRAMP_PER
#define BOOST_VRAMP_PER
Definition: dpsk3_hwdescr.h:1446
NPNZ_DATA_PROVIDERS_s::ptrDProvControlInputCompensated
volatile uint16_t * ptrDProvControlInputCompensated
Pointer to external data buffer of most recent, compensated control input.
Definition: npnz16b.h:384
NPNZ_GAIN_CONTROL_s::AgcScaler
volatile uint16_t AgcScaler
Bit-shift scaler of Adaptive Gain Modulation factor.
Definition: npnz16b.h:453
BOOST_SWITCH_NODE_SETTINGS_s::gpio_high
volatile uint16_t gpio_high
GPIO port pin-number of PWMxH of the selected PWM generator.
Definition: dev_boost_typedef.h:406
BOOST_FEEDBACK_SETTINGS_s::ad_temp
volatile struct BOOST_ADC_INPUT_SETTINGS_s ad_temp
ADC input sampling temperature.
Definition: dev_boost_typedef.h:481
BOOST_LOOP_SETTINGS_s::minimum
volatile uint16_t minimum
output clamping value (minimum)
Definition: dev_boost_typedef.h:377
BOOST_LOOP_SETTINGS_s::feedback_offset
volatile uint16_t feedback_offset
Feedback offset value for calibration or bi-direction feedback signals.
Definition: dev_boost_typedef.h:375
BOOST_LEB_PERIOD
#define BOOST_LEB_PERIOD
Leading Edge Blanking = n x PWM resolution (here: 50 x 2ns = 100ns)
Definition: dpsk3_hwdescr.h:988
NPNZ_STATUS_s::lower_saturation_event
volatile bool lower_saturation_event
Bit 0: control loop is clamped at minimum output level.
Definition: npnz16b.h:186
NPNZ_USER_DATA_BUFFER_s::usrParam0
volatile uint16_t usrParam0
generic 16-bit wide, user-defined parameter #1 for advanced control options
Definition: npnz16b.h:476
BOOST_CONVERTER_DATA_s::temp
volatile uint16_t temp
BOOST board temperature.
Definition: dev_boost_typedef.h:328
BOOST_VOUT_REF
#define BOOST_VOUT_REF
Macro calculating the integer number equivalent of the output voltage reference given above in [V].
Definition: dpsk3_hwdescr.h:1145
BOOST_ADC_INPUT_SETTINGS_s::adc_buffer
volatile uint16_t * adc_buffer
pointer to ADC result buffer
Definition: dev_boost_typedef.h:455
BOOST_CONVERTER_DATA_s::v_in
volatile uint16_t v_in
BOOST input voltage.
Definition: dev_boost_typedef.h:326
BOOST_VOUT_ANSEL
#define BOOST_VOUT_ANSEL
ADC input assignments of output voltage feedback signals.
Definition: dpsk3_hwdescr.h:1122
BOOST_ISNS_ADCCORE
#define BOOST_ISNS_ADCCORE
0=Dedicated Core #0, 1=Dedicated Core #1, 2=Shared ADC Core
Definition: dpsk3_hwdescr.h:1266
BOOST_GPIO_INSTANCE_s::pin
volatile uint16_t pin
GPIO port pin number.
Definition: dev_boost_typedef.h:501
BOOST_LOOP_SETTINGS_s::ctrl_Initialize
volatile uint16_t(* ctrl_Initialize)(volatile struct NPNZ16b_s *)
Function pointer to INIT routine.
Definition: dev_boost_typedef.h:382
BOOST_PGD
#define BOOST_PGD
Definition: dpsk3_hwdescr.h:1450
BOOST_CONVERTER_STATUS_s::enabled
volatile bool enabled
Bit #15: Control bit enabling/disabling the charger port.
Definition: dev_boost_typedef.h:225
BOOST_CONVERTER_s::startup
volatile struct BOOST_CONVERTER_STARTUP_s startup
BOOST startup timing settings.
Definition: dev_boost_typedef.h:531
BOOST_LOOP_SETTINGS_s::ctrl_Reset
void(* ctrl_Reset)(volatile struct NPNZ16b_s *)
Function pointer to RESET routine.
Definition: dev_boost_typedef.h:383
BOOST_CONVERTER_STARTUP_s::power_good_delay
volatile struct BOOST_STARTUP_PERIOD_HANDLER_s power_good_delay
Power-Good Delay period deinitions.
Definition: dev_boost_typedef.h:307
BOOST_ISNS_ADCIN
#define BOOST_ISNS_ADCIN
Analog input number (e.g. '5' for 'AN5')
Definition: dpsk3_hwdescr.h:1267
TEMP_ADCCORE
#define TEMP_ADCCORE
Definition: dpsk3_hwdescr.h:1580
BOOST_GPIO_INSTANCE_s::enabled
volatile bool enabled
Specifies, if this IO is used or not.
Definition: dev_boost_typedef.h:499
BOOST_ADC_INPUT_SETTINGS_s::adc_core
volatile uint8_t adc_core
number of the ADC core connected to the selected channel
Definition: dev_boost_typedef.h:458
BOOST_CONVERTER_STATUS_s::ready
volatile bool ready
Bit #0: status bit, indicating boost converter is initialized and ready to run.
Definition: dev_boost_typedef.h:209
BOOST_FEEDBACK_SETTINGS_s::ad_vin
volatile struct BOOST_ADC_INPUT_SETTINGS_s ad_vin
ADC input sampling input voltage.
Definition: dev_boost_typedef.h:478
NPNZ_EXTENSION_HOOKS_s::ptrExtHookExitFunction
volatile uint16_t ptrExtHookExitFunction
Pointer to Function which is called at the end of the control loop and will also be called when the c...
Definition: npnz16b.h:427
BOOST_LOOP_SETTINGS_s::ctrl_Precharge
void(* ctrl_Precharge)(volatile struct NPNZ16b_s *, volatile fractional, volatile fractional)
Function pointer to PRECHARGE routine.
Definition: dev_boost_typedef.h:385
BOOST_VIN_NORM_FACTOR
#define BOOST_VIN_NORM_FACTOR
VIN normalization factor scaled in Q15.
Definition: dpsk3_hwdescr.h:1075
BOOST_CONVERTER_STATUS_s::pwm_active
volatile bool pwm_active
Bit #2: indicating that PWM has been started and ADC triggers are generated.
Definition: dev_boost_typedef.h:211
BOOST_ISNS_REF
#define BOOST_ISNS_REF
Output Current Reference.
Definition: dpsk3_hwdescr.h:1236
BOOST_GPIO_SETTINGS_s::PowerGood
volatile struct BOOST_GPIO_INSTANCE_s PowerGood
Power Good Output.
Definition: dev_boost_typedef.h:517
NPNZ_USER_DATA_BUFFER_s::usrParam4
volatile uint16_t usrParam4
generic 16-bit wide, user-defined parameter #5 for advanced control options
Definition: npnz16b.h:480
NPNZ_LIMITS_s::AltMinOutput
volatile int16_t AltMinOutput
Alternate minimum output value used for clamping (R/W)
Definition: npnz16b.h:331
TEMP_ADCBUF
#define TEMP_ADCBUF
GPIO analog function mode enable bit.
Definition: dpsk3_hwdescr.h:1582
BOOST_SWITCH_NODE_SETTINGS_s::duty_ratio_max
volatile uint16_t duty_ratio_max
Absolute duty cycle maximum during normal operation.
Definition: dev_boost_typedef.h:416
BOOST_ISNS_TRGSRC
#define BOOST_ISNS_TRGSRC
PWM2 (=PG2) Trigger 2 via PGxTRIGB.
Definition: dpsk3_hwdescr.h:1271
BOOST_LOOP_SETTINGS_s::reference
volatile uint16_t reference
Control loop reference variable.
Definition: dev_boost_typedef.h:374
BOOST_CONVERTER_DATA_s::control_input
volatile uint16_t control_input
BOOST most recent control input value (raw input)
Definition: dev_boost_typedef.h:330
NPNZ_EXTENSION_HOOKS_s::ExtHookPreTargetWriteFunctionParam
volatile uint16_t ExtHookPreTargetWriteFunctionParam
Parameter of function called (can be a variable or a pointer to a data structure)....
Definition: npnz16b.h:422
BOOST_POD
#define BOOST_POD
Conversion Macros of Startup Timing Settings.
Definition: dpsk3_hwdescr.h:1445
BOOST_CHRG_TOUT
#define BOOST_CHRG_TOUT
Definition: dpsk3_hwdescr.h:1452
BOOST_STARTUP_PERIOD_HANDLER_s::counter
volatile uint16_t counter
Soft-Start Execution Counter (read only)
Definition: dev_boost_typedef.h:266
BOOST_CONVERTER_STARTUP_s::vcap_monitor
volatile struct BOOST_STARTUP_VCAP_PRECHARGE_s vcap_monitor
Output Capacitor Charging Time period deinitions.
Definition: dev_boost_typedef.h:310
NPNZ_ADC_TRGCTRL_s::ADCTriggerAOffset
volatile uint16_t ADCTriggerAOffset
ADC trigger #1 offset to compensate propagation delays.
Definition: npnz16b.h:357
BOOST_IREF_STEP
#define BOOST_IREF_STEP
Definition: dpsk3_hwdescr.h:1449
BOOST_PWM_DEAD_TIME_LE
#define BOOST_PWM_DEAD_TIME_LE
Rising edge dead time [tick = 250ps].
Definition: dpsk3_hwdescr.h:989
BOOST_CONVERTER_s::data
volatile struct BOOST_CONVERTER_DATA_s data
BOOST runtime data.
Definition: dev_boost_typedef.h:533
BOOST_CONVERTER_STATUS_s::async_mode
volatile bool async_mode
Bit #9: Control bit suspending the synchronous rectifier switch PWM channel.
Definition: dev_boost_typedef.h:219
BOOST_PWM_DEAD_TIME_FE
#define BOOST_PWM_DEAD_TIME_FE
Falling edge dead time [tick = 250ps].
Definition: dpsk3_hwdescr.h:990
BOOST_STARTUP_VCAP_PRECHARGE_s::v_drop
volatile uint16_t v_drop
Acceptable voltage drop between input and output voltage when output capacitor is charging up.
Definition: dev_boost_typedef.h:293
BOOST_ISNS_ADC_TRGDLY
#define BOOST_ISNS_ADC_TRGDLY
Definition: dpsk3_hwdescr.h:1239
NPNZ_EXTENSION_HOOKS_s::ExtHookPreAntiWindupFunctionParam
volatile uint16_t ExtHookPreAntiWindupFunctionParam
Parameter of function called (can be a variable or a pointer to a data structure)....
Definition: npnz16b.h:419
BOOST_VIN_ADCTRIG
#define BOOST_VIN_ADCTRIG
Register used for trigger placement.
Definition: dpsk3_hwdescr.h:1043
NPNZ16b_s::status
volatile struct NPNZ_STATUS_s status
Control Loop Status and Control flags.
Definition: npnz16b.h:504
TEMP_ANSEL
#define TEMP_ANSEL
GPIO analog function mode enable bit.
Definition: dpsk3_hwdescr.h:1579
BOOST_VOUT_OFFSET
#define BOOST_VOUT_OFFSET
Macro calculating the integer number equivalent of the physical, static signal offset of this feedbac...
Definition: dpsk3_hwdescr.h:1151
BOOST_VOUT_ADCTRIG
#define BOOST_VOUT_ADCTRIG
Register used for trigger placement.
Definition: dpsk3_hwdescr.h:1126
BOOST_CHRG_PER
#define BOOST_CHRG_PER
Definition: dpsk3_hwdescr.h:1451
BOOST_VOUT_ADCIN
#define BOOST_VOUT_ADCIN
Analog input number (e.g. '5' for 'AN5')
Definition: dpsk3_hwdescr.h:1124
BOOST_ADC_INPUT_SETTINGS_s::differential_input
volatile bool differential_input
input channel differential mode enable bit
Definition: dev_boost_typedef.h:462
BOOST_PWM_DC_MAX
#define BOOST_PWM_DC_MAX
This sets the maximum duty cycle.
Definition: dpsk3_hwdescr.h:987
BOOST_PWM_DC_MIN
#define BOOST_PWM_DC_MIN
This sets the minimum duty cycle.
Definition: dpsk3_hwdescr.h:986
NPNZ_PORT_s::NormScaler
volatile int16_t NormScaler
Bit-shift scaler of the Q15 normalization factor.
Definition: npnz16b.h:229
NPNZ_EXTENSION_HOOKS_s::ExtHookStartFunctionParam
volatile uint16_t ExtHookStartFunctionParam
Parameter of function called (can be a variable or pointer to a data structure). This parameter is op...
Definition: npnz16b.h:413
BOOST_VOUT_ADCCORE
#define BOOST_VOUT_ADCCORE
0=Dedicated Core #0, 1=Dedicated Core #1, 8=Shared ADC Core
Definition: dpsk3_hwdescr.h:1123
BOOST_GPIO_INSTANCE_s::polarity
volatile uint16_t polarity
Output polarity, where 0=ACTIVE HIGH, 1=ACTIVE_LOW.
Definition: dev_boost_typedef.h:502
BOOST_ADC_INPUT_SETTINGS_s::early_interrupt_enable
volatile bool early_interrupt_enable
input channel early interrupt enable bit
Definition: dev_boost_typedef.h:461
TEMP_ADCIN
#define TEMP_ADCIN
Definition: dpsk3_hwdescr.h:1581
BOOST_STARTUP_VCAP_PRECHARGE_s::timeout_counter
volatile uint16_t timeout_counter
Soft-Start VCAP Charge-Up Timeout Counter.
Definition: dev_boost_typedef.h:291
NPNZ_ADC_TRGCTRL_s::ADCTriggerBOffset
volatile uint16_t ADCTriggerBOffset
ADC trigger #2 offset to compensate propagation delays.
Definition: npnz16b.h:359
NPNZ_LIMITS_s::MaxOutput
volatile int16_t MaxOutput
Maximum output value used for clamping (R/W)
Definition: npnz16b.h:330
BOOST_PWM_ADTR1OFS
#define BOOST_PWM_ADTR1OFS
ADC Trigger 1 Offset: 0...31.
Definition: dpsk3_hwdescr.h:963
BOOST_ADC_INPUT_SETTINGS_s::scaling
volatile struct BOOST_ADC_INPUT_SCALING_s scaling
normalization scaling settings
Definition: dev_boost_typedef.h:465
NPNZ_PORTS_s::AltTarget
volatile struct NPNZ_PORT_s AltTarget
Secondary data output port declaration.
Definition: npnz16b.h:264
NPNZ_EXTENSION_HOOKS_s::ptrExtHookPreTargetWriteFunction
volatile uint16_t ptrExtHookPreTargetWriteFunction
Pointer to Function which will be called before the most recent control output is written to target....
Definition: npnz16b.h:421
BOOST_VIN_ADCBUF
#define BOOST_VIN_ADCBUF
ADC input buffer of this ADC channel.
Definition: dpsk3_hwdescr.h:1042
BOOST_CONVERTER_DATA_s::i_sns
volatile uint16_t i_sns[BOOST_MPHASE_COUNT]
BOOST output current.
Definition: dev_boost_typedef.h:324
NPNZ_PORT_s::ptrAddress
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
BOOST_LOOP_SETTINGS_s::maximum
volatile uint16_t maximum
output clamping value (maximum)
Definition: dev_boost_typedef.h:378
BOOST_CONVERTER_DATA_s::v_out
volatile uint16_t v_out
BOOST output voltage.
Definition: dev_boost_typedef.h:327
NPNZ_STATUS_s::invert_input
volatile bool invert_input
Bit 14: when set, most recent error input value to controller is inverted.
Definition: npnz16b.h:201
NPNZ16b_s::DataProviders
volatile struct NPNZ_DATA_PROVIDERS_s DataProviders
Automated data sources pushing recent data points to user-defined variables.
Definition: npnz16b.h:510
BOOST_CONVERTER_s::feedback
volatile struct BOOST_FEEDBACK_SETTINGS_s feedback
BOOST converter feedback settings.
Definition: dev_boost_typedef.h:534
BOOST_ADC_INPUT_SETTINGS_s::interrupt_enable
volatile bool interrupt_enable
input channel interrupt enable bit
Definition: dev_boost_typedef.h:460
BOOST_VIN_NORM_SCALER
#define BOOST_VIN_NORM_SCALER
VIN normalization.
Definition: dpsk3_hwdescr.h:1074
NPNZ_USER_DATA_BUFFER_s::usrParam2
volatile uint16_t usrParam2
generic 16-bit wide, user-defined parameter #3 for advanced control options
Definition: npnz16b.h:478
NPNZ_EXTENSION_HOOKS_s::ptrExtHookPreAntiWindupFunction
volatile uint16_t ptrExtHookPreAntiWindupFunction
Pointer to Function which will be called after the compensation filter computation is complete and be...
Definition: npnz16b.h:418
NPNZ_PORT_s::NormFactor
volatile fractional NormFactor
Q15 normalization factor.
Definition: npnz16b.h:230
BOOST_CONVERTER_s::status
volatile struct BOOST_CONVERTER_STATUS_s status
BOOST operation status bits.
Definition: dev_boost_typedef.h:529
BOOST_ISNS_ANSEL
#define BOOST_ISNS_ANSEL
GPIO analog function mode enable bit.
Definition: dpsk3_hwdescr.h:1265
NPNZ_STATUS_s::upper_saturation_event
volatile bool upper_saturation_event
Bit 1: control loop is clamped at maximum output level.
Definition: npnz16b.h:187
NPNZ_EXTENSION_HOOKS_s::ptrExtHookStartFunction
volatile uint16_t ptrExtHookStartFunction
Pointer to Function which will be called at the beginning of the control loop. This function pointer ...
Definition: npnz16b.h:412
NPNZ_DATA_PROVIDERS_s::ptrDProvControlOutput
volatile uint16_t * ptrDProvControlOutput
Pointer to external data buffer of most recent control output.
Definition: npnz16b.h:386
NPNZ_EXTENSION_HOOKS_s::ExtHookEndOfLoopFunctionParam
volatile uint16_t ExtHookEndOfLoopFunctionParam
Parameter of function called (can be a variable or a pointer to a data structure)....
Definition: npnz16b.h:425
BOOST_SWITCH_NODE_SETTINGS_s::trigger_offset
volatile uint16_t trigger_offset
PWM triggers for ADC will be offset by n cycles.
Definition: dev_boost_typedef.h:421
NPNZ_ADC_TRGCTRL_s::ptrADCTriggerBRegister
volatile uint16_t * ptrADCTriggerBRegister
Pointer to ADC trigger #2 register (e.g. TRIG2)
Definition: npnz16b.h:358
BOOST_PWM_CHANNEL
#define BOOST_PWM_CHANNEL
PWM peripheral output pins, control signals and register assignments of converter phase #1.
Definition: dpsk3_hwdescr.h:937
BOOST_STARTUP_PERIOD_HANDLER_s::reference
volatile uint16_t reference
Internal dummy reference used to increment/decrement controller reference.
Definition: dev_boost_typedef.h:268
BOOST_ADC_INPUT_SETTINGS_s::signed_result
volatile bool signed_result
input channel singed result mode enable bit
Definition: dev_boost_typedef.h:463
BOOST_GPIO_INSTANCE_s::port
volatile uint16_t port
GPIO port instance number (0=Port RA, 0=Port RB, 0=Port RC, etc.)
Definition: dev_boost_typedef.h:500
BOOST_ADC_INPUT_SCALING_s::offset
volatile int16_t offset
Signal offset as signed integer to be subtracted from ADC input.
Definition: dev_boost_typedef.h:441
NPNZ_LIMITS_s::AltMaxOutput
volatile int16_t AltMaxOutput
Alternate maximum output value used for clamping (R/W)
Definition: npnz16b.h:332
BOOST_VIN_ADCIN
#define BOOST_VIN_ADCIN
Analog input number (e.g. '5' for 'AN5')
Definition: dpsk3_hwdescr.h:1041
BOOST_CONVERTER_STATUS_s::cs_calib_enable
volatile bool cs_calib_enable
Bit #8: Flag bit indicating that current sensors need to calibrated.
Definition: dev_boost_typedef.h:218
BOOST_VIN_TRGSRC
#define BOOST_VIN_TRGSRC
PWM2 (=PG2) Trigger 2 via PGxTRIGB.
Definition: dpsk3_hwdescr.h:1044
NPNZ_USER_DATA_BUFFER_s::usrParam5
volatile uint16_t usrParam5
generic 16-bit wide, user-defined parameter #6 for advanced control options
Definition: npnz16b.h:481
BOOST_ISNS_NORM_SCALER
#define BOOST_ISNS_NORM_SCALER
ISNS normalization.
Definition: dpsk3_hwdescr.h:1242
BOOST_SWITCH_NODE_SETTINGS_s::duty_ratio_min
volatile uint16_t duty_ratio_min
Absolute duty cycle minimum during normal operation.
Definition: dev_boost_typedef.h:415
BOOST_CONVERTER_s::gpio
volatile struct BOOST_GPIO_SETTINGS_s gpio
BOOST converter additional GPIO specification.
Definition: dev_boost_typedef.h:537
NPNZ_PORTS_s::ptrControlReference
volatile uint16_t * ptrControlReference
Pointer to global variable of input register holding the controller reference value (e....
Definition: npnz16b.h:265
BOOST_ISNS_ADCBUF
#define BOOST_ISNS_ADCBUF
ADC input buffer of this ADC channel.
Definition: dpsk3_hwdescr.h:1269
BOOST_CONVERTER_STARTUP_s::power_on_delay
volatile struct BOOST_STARTUP_PERIOD_HANDLER_s power_on_delay
Power-On Delay period deinitions.
Definition: dev_boost_typedef.h:306
BOOST_CONVERTER_s::state_id
volatile struct BOOST_STATE_ID_s state_id
BOOST state machine operating state ID.
Definition: dev_boost_typedef.h:530
BOOST_VREF_STEP
#define BOOST_VREF_STEP
Definition: dpsk3_hwdescr.h:1447
NPNZ16b_s::GainControl
volatile struct NPNZ_GAIN_CONTROL_s GainControl
Parameter section for advanced control options.
Definition: npnz16b.h:507
BOOST_SWITCH_NODE_SETTINGS_s::master_period_enable
volatile bool master_period_enable
Selecting MASTER or Individual period register.
Definition: dev_boost_typedef.h:409
BOOST_ISNS_REF_STARTUP
#define BOOST_ISNS_REF_STARTUP
Output Current Startup Reference.
Definition: dpsk3_hwdescr.h:1237
BOOST_GPIO_SETTINGS_s::EnableInput
volatile struct BOOST_GPIO_INSTANCE_s EnableInput
External ENABLE input.
Definition: dev_boost_typedef.h:516
BOOST_CONVERTER_STARTUP_s::i_ramp
volatile struct BOOST_STARTUP_PERIOD_HANDLER_s i_ramp
Current Ramp-Up period deinitions.
Definition: dev_boost_typedef.h:308
BOOST_IRAMP_PER
#define BOOST_IRAMP_PER
Definition: dpsk3_hwdescr.h:1448
BOOST_CONVERTER_STATUS_s::autorun
volatile bool autorun
Bit #14: Control bit determining if charger is starting automatically or on command (using the GO bit...
Definition: dev_boost_typedef.h:224
TEMP_TRGSRC
#define TEMP_TRGSRC
Definition: dpsk3_hwdescr.h:1584
BOOST_LOOP_SETTINGS_s::trigger_offset
volatile uint16_t trigger_offset
ADC trigger offset value for trigger fine-tuning.
Definition: dev_boost_typedef.h:376
BOOST_FEEDBACK_SETTINGS_s::ad_isns
volatile struct BOOST_ADC_INPUT_SETTINGS_s ad_isns[BOOST_MPHASE_COUNT]
ADC input sampling phase current.
Definition: dev_boost_typedef.h:480
BOOST_ADC_INPUT_SETTINGS_s::level_trigger
volatile bool level_trigger
input channel level trigger mode enable bit
Definition: dev_boost_typedef.h:464
NPNZ_ADC_TRGCTRL_s::ptrADCTriggerARegister
volatile uint16_t * ptrADCTriggerARegister
Pointer to ADC trigger #1 register (e.g. TRIG1)
Definition: npnz16b.h:356
NPNZ16b_s::ADCTriggerControl
volatile struct NPNZ_ADC_TRGCTRL_s ADCTriggerControl
Automatic ADC trigger placement options for ADC Trigger A and B.
Definition: npnz16b.h:509
BOOST_CONVERTER_s::set_values
volatile struct BOOST_CONVERTER_SETTINGS_s set_values
Control field for global access to references.
Definition: dev_boost_typedef.h:532
NPNZ_STATUS_s::swap_target
volatile bool swap_target
Bit 12: when set, AltTarget is used as data output of controller.
Definition: npnz16b.h:199
NPNZ_STATUS_s::enabled
volatile bool enabled
Bit 15: enables/disables control loop execution.
Definition: npnz16b.h:202
NPNZ_EXTENSION_HOOKS_s::ptrExtHookEndOfLoopFunction
volatile uint16_t ptrExtHookEndOfLoopFunction
Pointer to Function which is called at the end of the control loop but will be bypassed when the cont...
Definition: npnz16b.h:424
NPNZ_USER_DATA_BUFFER_s::usrParam7
volatile uint16_t usrParam7
generic 16-bit wide, user-defined parameter #8 for advanced control options
Definition: npnz16b.h:483
NPNZ16b_s::ExtensionHooks
volatile struct NPNZ_EXTENSION_HOOKS_s ExtensionHooks
User extension function triggers using function pointers with parameters.
Definition: npnz16b.h:511
BOOST_ADC_INPUT_SCALING_s::scaler
volatile int16_t scaler
Feedback bit-shift scaler used for number normalization.
Definition: dev_boost_typedef.h:440