Digital Power Starter Kit 3 Firmware
dsPIC33C Buck Converter Voltage Mode Control Example
npnz16b.h
1 /* *********************************************************************************
2  * PowerSmartâ„¢ Digital Control Library Designer, Version 0.9.12.672
3  * *********************************************************************************
4  * Generic library header for z-domain compensation filter assembly functions
5  * CGS Version: 3.0.7
6  * CGS Date: 03/07/2021
7  * ********************************************************************************/
8 // This is a guard condition so that contents of this file are not included
9 // more than once.
10 #ifndef __SPECIAL_FUNCTION_LAYER_LIB_NPNZ16B_H__
11 #define __SPECIAL_FUNCTION_LAYER_LIB_NPNZ16B_H__
12 
13 #include <xc.h> // include processor files - each processor file is guarded
14 #include <dsp.h> // include DSP data types (e.g. fractional)
15 #include <stdint.h> // include standard integer number data types
16 #include <stddef.h> // include standard definition data types
17 #include <stdbool.h> // include standard boolean data types (true/false)
18 
19 
38 #ifndef __PSDCLD_VERSION
39  #define __PSDCLD_VERSION 912
40 #endif
41 
42 
55 enum NPNZ_STATUS_FLAGS_e
56 {
57  NPNZ_STATUS_CLEAR = 0b0000000000000000,
58  NPNZ_STATUS_SATUATION_MSK = 0b0000000000000011,
59  NPNZ_STATUS_LSAT_ACTIVE = 0b0000000000000001,
60  NPNZ_STATUS_LSAT_CLEAR = 0b0000000000000000,
61  NPNZ_STATUS_USAT_ACTIVE = 0b0000000000000010,
62  NPNZ_STATUS_USAT_CLEAR = 0b0000000000000000,
63  NPNZ_STATUS_AGC_DISABLE = 0b0000000000000000,
64  NPNZ_STATUS_AGC_ENABLED = 0b0000100000000000,
65  NPNZ_STATUS_TARGET_DEFAULT = 0b0000000000000000,
66  NPNZ_STATUS_TARGET_SWAPED = 0b0001000000000000,
67  NPNZ_STATUS_SOURCE_DEFAULT = 0b0000000000000000,
68  NPNZ_STATUS_SOURCE_SWAPED = 0b0010000000000000,
69  NPNZ_STATUS_INV_INPUT_OFF = 0b0000000000000000,
70  NPNZ_STATUS_INV_INPUT_ON = 0b0100000000000000,
71  NPNZ_STATUS_ENABLE_OFF = 0b0000000000000000,
72  NPNZ_STATUS_ENABLE_ON = 0b1000000000000000
73 };
74 typedef enum NPNZ_STATUS_FLAGS_e NPNZ_STATUS_FLAGS_t;
75 
76 
80 enum NPNZ_STATUS_SATURATION_e{
81  NPNZ_SAT_CLEAR = 0b0,
82  NPNZ_SAT_ACTIVE = 0b1
83 };
84 typedef enum NPNZ_STATUS_SATURATION_e NPNZ_STATUS_SATURATION_t;
85 extern volatile enum NPNZ_STATUS_SATURATION_e npnzEnumControlStatusSaturation;
86 
87 /* Control flags (bit-field) */
88 
92 enum NPNZ_STATUS_AGC_ENABLE_e{
93  NPNZ_AGC_DISABLED = 0b0,
94  NPNZ_AGC_ENABLED = 0b1
95 };
96 typedef enum NPNZ_STATUS_AGC_ENABLE_e NPNZ_STATUS_AGC_ENABLE_t;
97 extern volatile enum NPNZ_STATUS_AGC_ENABLE_e npnzEnumControlAgcEnable;
98 
99 
103 enum NPNZ_STATUS_SOURCE_SWAP_e{
104  NPNZ_SOURCE_DEFAULT = 0b0,
105  NPNZ_SOURCE_SWAPED = 0b1
106 };
107 typedef enum NPNZ_STATUS_SOURCE_SWAP_e NPNZ_STATUS_SOURCE_SWAP_t;
108 extern volatile enum NPNZ_STATUS_SOURCE_SWAP_e npnzEnumControlSourceSwap;
109 
110 
114 enum NPNZ_STATUS_TARGET_SWAP_e{
115  NPNZ_TARGET_DEFAULT = 0b0,
116  NPNZ_TARGET_SWAPED = 0b1
117 };
118 typedef enum NPNZ_STATUS_TARGET_SWAP_e NPNZ_STATUS_TARGET_SWAP_t;
119 extern volatile enum NPNZ_STATUS_TARGET_SWAP_e npnzEnumControlTargetSwap;
120 
121 
125 enum NPNZ_STATUS_INPUT_INV_e{
126  NPNZ_INPUT_DEFAULT = 0b0,
127  NPNZ_INPUT_INVERTED = 0b1
128 };
129 typedef enum NPNZ_STATUS_INPUT_INV_e NPNZ_STATUS_INPUT_INV_t;
130 extern volatile enum NPNZ_STATUS_INPUT_INV_e npnzEnumControlInputInversion;
131 
132 
136 enum NPNZ_STATUS_ENABLE_e{
137  NPNZ_DISABLED = 0b0,
138  NPNZ_ENABLED = 0b1
139 };
140 typedef enum NPNZ_STATUS_ENABLE_e NPNZ_STATUS_ENABLE_t;
141 extern volatile enum NPNZ_STATUS_ENABLE_e npnzEnumControlEnable;
142 
143 
148 {
149  volatile enum NPNZ_STATUS_FLAGS_e StatusWordFlags;
150  volatile enum NPNZ_STATUS_SATURATION_e flagSaturation;
151  volatile enum NPNZ_STATUS_AGC_ENABLE_e flagAgcControl;
152  volatile enum NPNZ_STATUS_SOURCE_SWAP_e flagSourceSwap;
153  volatile enum NPNZ_STATUS_TARGET_SWAP_e flagTargetSwap;
154  volatile enum NPNZ_STATUS_INPUT_INV_e flagCtrlInputInversion;
155  volatile enum NPNZ_STATUS_ENABLE_e flagControlEnable;
156 };
157 typedef struct NPNZ_FLAGS_s NPNZ_FLAGS_t;
158 extern volatile struct NPNZ_FLAGS_s npnzFlagList;
159 
160 
182 /* Controller status data structure */
184  union {
185  struct {
186  volatile bool lower_saturation_event : 1;
187  volatile bool upper_saturation_event : 1;
188  volatile unsigned : 1;
189  volatile unsigned : 1;
190  volatile unsigned : 1;
191  volatile unsigned : 1;
192  volatile unsigned : 1;
193  volatile unsigned : 1;
194 
195  volatile unsigned : 1;
196  volatile unsigned : 1;
197  volatile unsigned : 1;
198  volatile bool agc_enabled: 1;
199  volatile bool swap_target: 1;
200  volatile bool swap_source: 1;
201  volatile bool invert_input: 1;
202  volatile bool enabled : 1;
203  } __attribute__((packed))bits;
204  volatile uint16_t value;
205  };
206 } __attribute__((packed));
207 typedef struct NPNZ_STATUS_s NPNZ_STATUS_t;
208 
209 
225 /* Controller Input/Output Port */
226 struct NPNZ_PORT_s{
227 
228  volatile uint16_t* ptrAddress;
229  volatile int16_t NormScaler;
230  volatile fractional NormFactor;
231  volatile int16_t Offset;
232 
233 } __attribute__((packed));
234 typedef struct NPNZ_PORT_s NPNZ_PORT_t;
235 
236 
258 /* List of Controller Input/Output Ports */
260 
261  volatile struct NPNZ_PORT_s Source;
262  volatile struct NPNZ_PORT_s AltSource;
263  volatile struct NPNZ_PORT_s Target;
264  volatile struct NPNZ_PORT_s AltTarget;
265  volatile uint16_t* ptrControlReference;
266 
267 } __attribute__((packed));
268 typedef struct NPNZ_PORTS_s NPNZ_PORTS_t;
269 
270 
285 
286  volatile int32_t* ptrACoefficients;
287  volatile int32_t* ptrBCoefficients;
288  volatile fractional* ptrControlHistory;
289  volatile fractional* ptrErrorHistory;
290 
291  // Array size information
292  volatile uint16_t ACoefficientsArraySize;
293  volatile uint16_t BCoefficientsArraySize;
294  volatile uint16_t ControlHistoryArraySize;
295  volatile uint16_t ErrorHistoryArraySize;
296 
297  // Feedback scaling Input/Output Normalization
298  volatile int16_t normPreShift;
299  volatile int16_t normPostShiftA;
300  volatile int16_t normPostShiftB;
301  volatile int16_t normPostScaler;
302 
303  // P-Term Coefficients (for plant measurements only)
304  volatile int16_t PTermScaler;
305  volatile int16_t PTermFactor;
306 
307 } __attribute__((packed));
309 
310 
328 
329  volatile int16_t MinOutput;
330  volatile int16_t MaxOutput;
331  volatile int16_t AltMinOutput;
332  volatile int16_t AltMaxOutput;
333 
334 } __attribute__((packed));
335 typedef struct NPNZ_LIMITS_s NPNZ_LIMITS_t;
336 
337 
355 
356  volatile uint16_t* ptrADCTriggerARegister;
357  volatile uint16_t ADCTriggerAOffset;
358  volatile uint16_t* ptrADCTriggerBRegister;
359  volatile uint16_t ADCTriggerBOffset;
360 
361 } __attribute__((packed));
362 typedef struct NPNZ_ADC_TRGCTRL_s NPNZ_ADC_TRGCTRL_t;
363 
364 
382 
383  volatile uint16_t* ptrDProvControlInput;
384  volatile uint16_t* ptrDProvControlInputCompensated;
385  volatile uint16_t* ptrDProvControlError;
386  volatile uint16_t* ptrDProvControlOutput;
387 
388 } __attribute__((packed));
390 
391 
411 
412  volatile uint16_t ptrExtHookStartFunction;
413  volatile uint16_t ExtHookStartFunctionParam;
414 
415  volatile uint16_t ptrExtHookSourceFunction;
416  volatile uint16_t ExtHookSourceFunctionParam;
417 
420 
421  volatile uint16_t ptrExtHookTargetFunction;
422  volatile uint16_t ExtHookTargetFunctionParam;
423 
424  volatile uint16_t ptrExtHookStopFunction;
425  volatile uint16_t ExtHookStopFunctionParam;
426 
427  volatile uint16_t ptrExtHookEndFunction;
428  volatile uint16_t ExtHookEndFunctionParam;
429 
430 } __attribute__((packed));
432 
433 
452 
453  volatile uint16_t AgcScaler;
454  volatile fractional AgcFactor;
455  volatile fractional AgcMedian;
456  volatile uint16_t ptrAgcObserverFunction;
457 
458 } __attribute__((packed));
460 
461 
475 
476  volatile uint16_t usrParam0;
477  volatile uint16_t usrParam1;
478  volatile uint16_t usrParam2;
479  volatile uint16_t usrParam3;
480  volatile uint16_t usrParam4;
481  volatile uint16_t usrParam5;
482  volatile uint16_t usrParam6;
483  volatile uint16_t usrParam7;
484 
485 } __attribute__((packed));
487 
488 
502 struct NPNZ16b_s {
503 
504  volatile struct NPNZ_STATUS_s status;
505  volatile struct NPNZ_PORTS_s Ports;
506  volatile struct NPNZ_FILTER_PARAMS_s Filter;
507  volatile struct NPNZ_GAIN_CONTROL_s GainControl;
508  volatile struct NPNZ_LIMITS_s Limits;
509  volatile struct NPNZ_ADC_TRGCTRL_s ADCTriggerControl;
510  volatile struct NPNZ_DATA_PROVIDERS_s DataProviders;
511  volatile struct NPNZ_EXTENSION_HOOKS_s ExtensionHooks;
512  volatile struct NPNZ_USER_DATA_BUFFER_s Advanced;
513 
514 } __attribute__((packed)) ;
515 typedef struct NPNZ16b_s NPNZ16b_t;
516 
517 /* ********************************************************************************/
518 
519 #endif // end of __SPECIAL_FUNCTION_LAYER_LIB_NPNZ16B_H__ header file section
520 
521 
522 //**********************************************************************************
523 // Download latest version of this tool here: https://areiter128.github.io/DCLD
524 //**********************************************************************************
525 
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
NPNZ_ADC_TRGCTRL_s::ptrADCTriggerARegister
volatile uint16_t * ptrADCTriggerARegister
Pointer to ADC trigger #1 register (e.g. TRIG1)
Definition: npnz16b.h:356
NPNZ_EXTENSION_HOOKS_s::ptrExtHookStopFunction
volatile uint16_t ptrExtHookStopFunction
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_LIMITS_s::AltMaxOutput
volatile int16_t AltMaxOutput
Alternate maximum output value used for clamping (R/W)
Definition: npnz16b.h:332
NPNZ_ADC_TRGCTRL_s::ADCTriggerBOffset
volatile uint16_t ADCTriggerBOffset
ADC trigger #2 offset to compensate propagation delays.
Definition: npnz16b.h:359
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
NPNZ_STATUS_s
NPNZ16b controller object status and control word.
Definition: npnz16b.h:183
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
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
NPNZ_GAIN_CONTROL_s::AgcScaler
volatile uint16_t AgcScaler
Bit-shift scaler of Adaptive Gain Modulation factor.
Definition: npnz16b.h:453
NPNZ_EXTENSION_HOOKS_s::ExtHookTargetFunctionParam
volatile uint16_t ExtHookTargetFunctionParam
Parameter of function called (can be a variable or a pointer to a data structure)
Definition: npnz16b.h:422
NPNZ_PORT_s
Data Input/Output Port declaration of memory addresses, signal offsets and normalization settings.
Definition: npnz16b.h:226
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_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
NPNZ_FLAGS_s::flagCtrlInputInversion
enum NPNZ_STATUS_INPUT_INV_e flagCtrlInputInversion
List of State Machine Operating State Return Values.
Definition: npnz16b.h:154
NPNZ_FLAGS_s::StatusWordFlags
enum NPNZ_STATUS_FLAGS_e StatusWordFlags
List of all status and control flags of the Buck Converter status word.
Definition: npnz16b.h:149
NPNZ_FLAGS_s
Consolidated list of status bit value enumerations.
Definition: npnz16b.h:148
NPNZ_PORT_s::Offset
volatile int16_t Offset
Value/signal offset of this port.
Definition: npnz16b.h:231
NPNZ16b_s
Global NPNZ controller data object.
Definition: npnz16b.h:502
NPNZ_FILTER_PARAMS_s::ptrACoefficients
volatile int32_t * ptrACoefficients
Pointer to A coefficients located in X-space.
Definition: npnz16b.h:286
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
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
NPNZ_GAIN_CONTROL_s
Adaptive Gain Control Modulation Parameters.
Definition: npnz16b.h:451
NPNZ_FILTER_PARAMS_s::ControlHistoryArraySize
volatile uint16_t ControlHistoryArraySize
Size of the control history array in Y-space.
Definition: npnz16b.h:294
NPNZ_FLAGS_s::flagAgcControl
enum NPNZ_STATUS_AGC_ENABLE_e flagAgcControl
List of all status and control flags of the Buck Converter status word.
Definition: npnz16b.h:151
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_ADC_TRGCTRL_s
Automated ADC Trigger handling.
Definition: npnz16b.h:354
NPNZ_STATUS_s::value
volatile uint16_t value
Controller status full register access.
Definition: npnz16b.h:204
NPNZ_PORTS_s::Target
volatile struct NPNZ_PORT_s Target
Primary data output port declaration.
Definition: npnz16b.h:263
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
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
NPNZ_EXTENSION_HOOKS_s::ptrExtHookEndFunction
volatile uint16_t ptrExtHookEndFunction
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
NPNZ_PORTS_s::AltTarget
volatile struct NPNZ_PORT_s AltTarget
Secondary data output port declaration.
Definition: npnz16b.h:264
NPNZ_ADC_TRGCTRL_s::ADCTriggerAOffset
volatile uint16_t ADCTriggerAOffset
ADC trigger #1 offset to compensate propagation delays.
Definition: npnz16b.h:357
NPNZ_FILTER_PARAMS_s::ptrErrorHistory
volatile fractional * ptrErrorHistory
Pointer to n+1 delay-line samples located in Y-space with first sample being the most recent.
Definition: npnz16b.h:289
NPNZ16b_s::Filter
volatile struct NPNZ_FILTER_PARAMS_s Filter
Filter parameters such as pointer to history and coefficient arrays and number scaling.
Definition: npnz16b.h:506
NPNZ16b_s::status
volatile struct NPNZ_STATUS_s status
Control Loop Status and Control flags.
Definition: npnz16b.h:504
NPNZ_LIMITS_s::MaxOutput
volatile int16_t MaxOutput
Maximum output value used for clamping (R/W)
Definition: npnz16b.h:330
NPNZ_FILTER_PARAMS_s
Filter Coefficient Arrays, Number Format Handling and Input/Output History Parameters.
Definition: npnz16b.h:284
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_DATA_PROVIDERS_s::ptrDProvControlInput
volatile uint16_t * ptrDProvControlInput
Pointer to external data buffer of most recent, raw control input.
Definition: npnz16b.h:383
NPNZ_DATA_PROVIDERS_s::ptrDProvControlOutput
volatile uint16_t * ptrDProvControlOutput
Pointer to external data buffer of most recent control output.
Definition: npnz16b.h:386
NPNZ_LIMITS_s::MinOutput
volatile int16_t MinOutput
Minimum output value used for clamping (R/W)
Definition: npnz16b.h:329
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_STATUS_s::enabled
volatile bool enabled
Bit 15: enables/disables control loop execution.
Definition: npnz16b.h:202
NPNZ_GAIN_CONTROL_s::ptrAgcObserverFunction
volatile uint16_t ptrAgcObserverFunction
Function Pointer to Observer function updating the AGC modulation factor.
Definition: npnz16b.h:456
NPNZ16b_s::ExtensionHooks
volatile struct NPNZ_EXTENSION_HOOKS_s ExtensionHooks
User extension function triggers using function pointers with parameters.
Definition: npnz16b.h:511
NPNZ_EXTENSION_HOOKS_s::ptrExtHookStartFunction
volatile uint16_t ptrExtHookStartFunction
Pointer to Function which will be called at the beginning of the control loop.
Definition: npnz16b.h:412
NPNZ_PORT_s::NormScaler
volatile int16_t NormScaler
Bit-shift scaler of the Q15 normalization factor.
Definition: npnz16b.h:229
NPNZ_EXTENSION_HOOKS_s::ptrExtHookTargetFunction
volatile uint16_t ptrExtHookTargetFunction
Pointer to Function which will be called before the most recent control output is written to target.
Definition: npnz16b.h:421
NPNZ_PORT_s::NormFactor
volatile fractional NormFactor
Q15 normalization factor.
Definition: npnz16b.h:230
NPNZ_FILTER_PARAMS_s::PTermScaler
volatile int16_t PTermScaler
Q15 P-Term Coefficient Bit-Shift Scaler (R/W)
Definition: npnz16b.h:304
NPNZ_EXTENSION_HOOKS_s
User Extension Function Call Parameters.
Definition: npnz16b.h:410
NPNZ_PORTS_s::AltSource
volatile struct NPNZ_PORT_s AltSource
Secondary data input port declaration.
Definition: npnz16b.h:262
NPNZ_FILTER_PARAMS_s::normPreShift
volatile int16_t normPreShift
Normalization of ADC-resolution to Q15 (R/W)
Definition: npnz16b.h:298
NPNZ_FILTER_PARAMS_s::BCoefficientsArraySize
volatile uint16_t BCoefficientsArraySize
Size of the B coefficients array in X-space.
Definition: npnz16b.h:293
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_EXTENSION_HOOKS_s::ExtHookStopFunctionParam
volatile uint16_t ExtHookStopFunctionParam
Parameter of function called (can be a variable or a pointer to a data structure)
Definition: npnz16b.h:425
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_EXTENSION_HOOKS_s::ExtHookStartFunctionParam
volatile uint16_t ExtHookStartFunctionParam
Parameter of function called (can be a variable or pointer to a data structure)
Definition: npnz16b.h:413
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
NPNZ_FILTER_PARAMS_s::normPostShiftA
volatile int16_t normPostShiftA
Normalization of A-term control output to Q15 (R/W)
Definition: npnz16b.h:299
NPNZ_FLAGS_s::flagTargetSwap
enum NPNZ_STATUS_TARGET_SWAP_e flagTargetSwap
List of State Machine Sub-State IDs.
Definition: npnz16b.h:153
NPNZ_STATUS_s::unsigned
volatile unsigned
Bit 2: reserved.
Definition: npnz16b.h:188
NPNZ_STATUS_s::agc_enabled
volatile bool agc_enabled
Bit 11: when set, Adaptive Gain Control Modulation is enabled.
Definition: npnz16b.h:198
NPNZ_USER_DATA_BUFFER_s
User Data Space for Advanced Control Functions.
Definition: npnz16b.h:474
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
NPNZ_DATA_PROVIDERS_s
Data Provider Target Memory Addresses.
Definition: npnz16b.h:381
NPNZ_FLAGS_s::flagSourceSwap
enum NPNZ_STATUS_SOURCE_SWAP_e flagSourceSwap
List of State Machine Operating State IDs.
Definition: npnz16b.h:152
NPNZ_FLAGS_s::flagSaturation
enum NPNZ_STATUS_SATURATION_e flagSaturation
List of all status and control flags of the Buck Converter status word.
Definition: npnz16b.h:150
NPNZ_FLAGS_s::flagControlEnable
enum NPNZ_STATUS_ENABLE_e flagControlEnable
List of Supported Control Modes.
Definition: npnz16b.h:155
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_FILTER_PARAMS_s::ptrControlHistory
volatile fractional * ptrControlHistory
Pointer to n delay-line samples located in Y-space with first sample being the most recent.
Definition: npnz16b.h:288
NPNZ_PORTS_s::Source
volatile struct NPNZ_PORT_s Source
Primary data input port declaration.
Definition: npnz16b.h:261
NPNZ16b_s::Limits
volatile struct NPNZ_LIMITS_s Limits
Input and output clamping values.
Definition: npnz16b.h:508
NPNZ_EXTENSION_HOOKS_s::ExtHookEndFunctionParam
volatile uint16_t ExtHookEndFunctionParam
Parameter of function called (can be a variable or a pointer to a data structure)
Definition: npnz16b.h:428
NPNZ_LIMITS_s
System Anti-Windup (Output Clamping) Thresholds.
Definition: npnz16b.h:327
NPNZ_FILTER_PARAMS_s::ACoefficientsArraySize
volatile uint16_t ACoefficientsArraySize
Size of the A coefficients array in X-space.
Definition: npnz16b.h:292
NPNZ_FILTER_PARAMS_s::normPostScaler
volatile int16_t normPostScaler
Control output normalization factor (Q15) (R/W)
Definition: npnz16b.h:301
NPNZ_DATA_PROVIDERS_s::ptrDProvControlError
volatile uint16_t * ptrDProvControlError
Pointer to external data buffer of most recent control error.
Definition: npnz16b.h:385
NPNZ_GAIN_CONTROL_s::AgcFactor
volatile fractional AgcFactor
Q15 value of Adaptive Gain Modulation factor.
Definition: npnz16b.h:454
NPNZ_ADC_TRGCTRL_s::ptrADCTriggerBRegister
volatile uint16_t * ptrADCTriggerBRegister
Pointer to ADC trigger #2 register (e.g. TRIG2)
Definition: npnz16b.h:358
NPNZ_FILTER_PARAMS_s::ErrorHistoryArraySize
volatile uint16_t ErrorHistoryArraySize
Size of the error history array in Y-space.
Definition: npnz16b.h:295
NPNZ_FILTER_PARAMS_s::normPostShiftB
volatile int16_t normPostShiftB
Normalization of B-term control output to Q15 (R/W)
Definition: npnz16b.h:300
NPNZ_FILTER_PARAMS_s::PTermFactor
volatile int16_t PTermFactor
Q15 P-Term Coefficient Factor (R/W)
Definition: npnz16b.h:305
NPNZ_FILTER_PARAMS_s::ptrBCoefficients
volatile int32_t * ptrBCoefficients
Pointer to B coefficients located in X-space.
Definition: npnz16b.h:287
NPNZ16b_s::Ports
volatile struct NPNZ_PORTS_s Ports
Controller input and output ports.
Definition: npnz16b.h:505
NPNZ16b_s::GainControl
volatile struct NPNZ_GAIN_CONTROL_s GainControl
Parameter section for advanced control options.
Definition: npnz16b.h:507
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_GAIN_CONTROL_s::AgcMedian
volatile fractional AgcMedian
Q15 value of Adaptive Gain Modulation nominal operating point.
Definition: npnz16b.h:455
NPNZ16b_s::Advanced
volatile struct NPNZ_USER_DATA_BUFFER_s Advanced
Parameter section for advanced user control options.
Definition: npnz16b.h:512
NPNZ_LIMITS_s::AltMinOutput
volatile int16_t AltMinOutput
Alternate minimum output value used for clamping (R/W)
Definition: npnz16b.h:331
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
NPNZ_PORTS_s
Filter Coefficient Arrays, Number Format Handling and Input/Output History Parameters.
Definition: npnz16b.h:259
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
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