Digital Power Starter Kit 3 Firmware  DM330017-3, Rev.3.0
dsPIC33C Buck Converter Peak Current Mode Control Example

Set of function pointers and parameters used to tie in user-defined, external extension functions at specific points of the control loop execution. More...

#include <power_control/drivers/npnz16b.h>

+ Inheritance diagram for NPNZ_EXTENSION_HOOKS_s:
+ Collaboration diagram for NPNZ_EXTENSION_HOOKS_s:

Data Fields

volatile uint16_t ptrExtHookStartFunction
 Pointer to Function which will be called at the beginning of the control loop. This function pointer is stored in the data field as common unsigned integer value and needs to be casted as such. Example: my_loop.ExtensionHooks.ptrExtHookStartFunction = (uint16_t)(&my_StartHookFunction). More...
 
volatile uint16_t ExtHookStartFunctionParam
 Parameter of function called (can be a variable or pointer to a data structure). This parameter is optional and needs to be supported by the assembly routine to be pushed to the user function. Parameter support can be enabled/disabled for each hook function by selecting the respective option in PS-DCLD. More...
 
volatile uint16_t ptrExtHookSourceFunction
 Pointer to Function which will be called after the source has been read and compensated. This function pointer is stored in the data field as common unsigned integer value and needs to be casted as such. Example: my_loop.ExtensionHooks.ptrExtHookSourceFunction = (uint16_t)(&my_SourceHookFunction). More...
 
volatile uint16_t ExtHookSourceFunctionParam
 Parameter of function called (can be a variable or a pointer to a data structure). This parameter is optional and needs to be supported by the assembly routine to be pushed to the user function. Parameter support can be enabled/disabled for each hook function by selecting the respective option in PS-DCLD. More...
 
volatile uint16_t ptrExtHookPreAntiWindupFunction
 Pointer to Function which will be called after the compensation filter computation is complete and before anti-windup clamping is applied. This function pointer is stored in the data field as common unsigned integer value and needs to be casted as such. Example: my_loop.ExtensionHooks.ptrExtHookPreAntiWindupFunction = (uint16_t)(&my_PreAntiWindupHookFunction). More...
 
volatile uint16_t ExtHookPreAntiWindupFunctionParam
 Parameter of function called (can be a variable or a pointer to a data structure). This parameter is optional and needs to be supported by the assembly routine to be pushed to the user function. Parameter support can be enabled/disabled for each hook function by selecting the respective option in PS-DCLD. More...
 
volatile uint16_t ptrExtHookPreTargetWriteFunction
 Pointer to Function which will be called before the most recent control output is written to target. This function pointer is stored in the data field as common unsigned integer value and needs to be casted as such. Example: my_loop.ExtensionHooks.ptrExtHookPreTargetWriteFunction = (uint16_t)(&my_PreTargetWriteHookFunction). More...
 
volatile uint16_t ExtHookPreTargetWriteFunctionParam
 Parameter of function called (can be a variable or a pointer to a data structure). This parameter is optional and needs to be supported by the assembly routine to be pushed to the user function. Parameter support can be enabled/disabled for each hook function by selecting the respective option in PS-DCLD. More...
 
volatile uint16_t ptrExtHookEndOfLoopFunction
 Pointer to Function which is called at the end of the control loop but will be bypassed when the control loop is disabled. This function pointer is stored in the data field as common unsigned integer value and needs to be casted as such. Example: my_loop.ExtensionHooks.ptrExtHookEndOfLoopFunction = (uint16_t)(&my_EndOfLoopHookFunction). More...
 
volatile uint16_t ExtHookEndOfLoopFunctionParam
 Parameter of function called (can be a variable or a pointer to a data structure). This parameter is optional and needs to be supported by the assembly routine to be pushed to the user function. Parameter support can be enabled/disabled for each hook function by selecting the respective option in PS-DCLD. More...
 
volatile uint16_t ptrExtHookExitFunction
 Pointer to Function which is called at the end of the control loop and will also be called when the control loop is disabled. This function pointer is stored in the data field as common unsigned integer value and needs to be casted as such. Example: my_loop.ExtensionHooks.ptrExtHookExitFunction = (uint16_t)(&my_ExitHookFunction). More...
 
volatile uint16_t ExtHookExitFunctionParam
 Parameter of function called (can be a variable or a pointer to a data structure). This parameter is optional and needs to be supported by the assembly routine to be pushed to the user function. Parameter support can be enabled/disabled for each hook function by selecting the respective option in PS-DCLD. More...
 
- Data Fields inherited from NPNZ16b_s
volatile struct NPNZ_STATUS_s status
 Control Loop Status and Control flags. More...
 
volatile struct NPNZ_PORTS_s Ports
 Controller input and output ports. More...
 
volatile struct NPNZ_FILTER_PARAMS_s Filter
 Filter parameters such as pointer to history and coefficient arrays and number scaling. More...
 
volatile struct NPNZ_GAIN_CONTROL_s GainControl
 Parameter section for advanced control options. More...
 
volatile struct NPNZ_LIMITS_s Limits
 Input and output clamping values. More...
 
volatile struct NPNZ_ADC_TRGCTRL_s ADCTriggerControl
 Automatic ADC trigger placement options for ADC Trigger A and B. More...
 
volatile struct NPNZ_DATA_PROVIDERS_s DataProviders
 Automated data sources pushing recent data points to user-defined variables. More...
 
volatile struct NPNZ_EXTENSION_HOOKS_s ExtensionHooks
 User extension function triggers using function pointers with parameters. More...
 
volatile struct NPNZ_USER_DATA_BUFFER_s Advanced
 Parameter section for advanced user control options. More...
 

Detailed Description

Set of function pointers and parameters used to tie in user-defined, external extension functions at specific points of the control loop execution.

User Extension Function Call Parameters.

The NPNZ_EXTENSION_HOOKS_s data object holds all parameters required to call user-defined extension functions supporting advanced use cases, which are not covered by the standard functions provided. When enabled, the NPNZ controller can automatically call user-defined functions at specific points within the control loop execution flow. Each function pointer is supporting function calls with one additional, 16-bit wide function parameter for each extension call. These parameters can either be variables or pointers to variables including start addresses of user defined data structures.

Each extension function call is optional and needs to be enabled, configured and managed manually in user code.

Definition at line 410 of file npnz16b.h.

Field Documentation

◆ ExtHookEndOfLoopFunctionParam

volatile uint16_t ExtHookEndOfLoopFunctionParam

Parameter of function called (can be a variable or a pointer to a data structure). This parameter is optional and needs to be supported by the assembly routine to be pushed to the user function. Parameter support can be enabled/disabled for each hook function by selecting the respective option in PS-DCLD.

Definition at line 425 of file npnz16b.h.

◆ ExtHookExitFunctionParam

volatile uint16_t ExtHookExitFunctionParam

Parameter of function called (can be a variable or a pointer to a data structure). This parameter is optional and needs to be supported by the assembly routine to be pushed to the user function. Parameter support can be enabled/disabled for each hook function by selecting the respective option in PS-DCLD.

Definition at line 428 of file npnz16b.h.

◆ ExtHookPreAntiWindupFunctionParam

volatile uint16_t ExtHookPreAntiWindupFunctionParam

Parameter of function called (can be a variable or a pointer to a data structure). This parameter is optional and needs to be supported by the assembly routine to be pushed to the user function. Parameter support can be enabled/disabled for each hook function by selecting the respective option in PS-DCLD.

Definition at line 419 of file npnz16b.h.

◆ ExtHookPreTargetWriteFunctionParam

volatile uint16_t ExtHookPreTargetWriteFunctionParam

Parameter of function called (can be a variable or a pointer to a data structure). This parameter is optional and needs to be supported by the assembly routine to be pushed to the user function. Parameter support can be enabled/disabled for each hook function by selecting the respective option in PS-DCLD.

Definition at line 422 of file npnz16b.h.

◆ ExtHookSourceFunctionParam

volatile uint16_t ExtHookSourceFunctionParam

Parameter of function called (can be a variable or a pointer to a data structure). This parameter is optional and needs to be supported by the assembly routine to be pushed to the user function. Parameter support can be enabled/disabled for each hook function by selecting the respective option in PS-DCLD.

Definition at line 416 of file npnz16b.h.

◆ ExtHookStartFunctionParam

volatile uint16_t ExtHookStartFunctionParam

Parameter of function called (can be a variable or pointer to a data structure). This parameter is optional and needs to be supported by the assembly routine to be pushed to the user function. Parameter support can be enabled/disabled for each hook function by selecting the respective option in PS-DCLD.

Definition at line 413 of file npnz16b.h.

◆ ptrExtHookEndOfLoopFunction

volatile uint16_t ptrExtHookEndOfLoopFunction

Pointer to Function which is called at the end of the control loop but will be bypassed when the control loop is disabled. This function pointer is stored in the data field as common unsigned integer value and needs to be casted as such. Example: my_loop.ExtensionHooks.ptrExtHookEndOfLoopFunction = (uint16_t)(&my_EndOfLoopHookFunction).

Definition at line 424 of file npnz16b.h.

◆ 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 control loop is disabled. This function pointer is stored in the data field as common unsigned integer value and needs to be casted as such. Example: my_loop.ExtensionHooks.ptrExtHookExitFunction = (uint16_t)(&my_ExitHookFunction).

Definition at line 427 of file npnz16b.h.

◆ ptrExtHookPreAntiWindupFunction

volatile uint16_t ptrExtHookPreAntiWindupFunction

Pointer to Function which will be called after the compensation filter computation is complete and before anti-windup clamping is applied. This function pointer is stored in the data field as common unsigned integer value and needs to be casted as such. Example: my_loop.ExtensionHooks.ptrExtHookPreAntiWindupFunction = (uint16_t)(&my_PreAntiWindupHookFunction).

Definition at line 418 of file npnz16b.h.

◆ ptrExtHookPreTargetWriteFunction

volatile uint16_t ptrExtHookPreTargetWriteFunction

Pointer to Function which will be called before the most recent control output is written to target. This function pointer is stored in the data field as common unsigned integer value and needs to be casted as such. Example: my_loop.ExtensionHooks.ptrExtHookPreTargetWriteFunction = (uint16_t)(&my_PreTargetWriteHookFunction).

Definition at line 421 of file npnz16b.h.

◆ ptrExtHookSourceFunction

volatile uint16_t ptrExtHookSourceFunction

Pointer to Function which will be called after the source has been read and compensated. This function pointer is stored in the data field as common unsigned integer value and needs to be casted as such. Example: my_loop.ExtensionHooks.ptrExtHookSourceFunction = (uint16_t)(&my_SourceHookFunction).

Definition at line 415 of file npnz16b.h.

◆ ptrExtHookStartFunction

volatile uint16_t ptrExtHookStartFunction

Pointer to Function which will be called at the beginning of the control loop. This function pointer is stored in the data field as common unsigned integer value and needs to be casted as such. Example: my_loop.ExtensionHooks.ptrExtHookStartFunction = (uint16_t)(&my_StartHookFunction).

Definition at line 412 of file npnz16b.h.


The documentation for this struct was generated from the following file: