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

Controller status word data structure allowing bit-wise access to status and control bits. More...

#include <power_control/drivers/npnz16b.h>

+ Inheritance diagram for NPNZ_STATUS_s:
+ Collaboration diagram for NPNZ_STATUS_s:

Data Fields

union {
   struct {
      volatile bool   lower_saturation_event: 1
 Bit 0: control loop is clamped at minimum output level. More...
 
      volatile bool   upper_saturation_event: 1
 Bit 1: control loop is clamped at maximum output level. More...
 
      volatile   unsigned: 1
 Bit 2: reserved. More...
 
      volatile bool   agc_enabled: 1
 Bit 11: when set, Adaptive Gain Control Modulation is enabled. More...
 
      volatile bool   swap_target: 1
 Bit 12: when set, AltTarget is used as data output of controller. More...
 
      volatile bool   swap_source: 1
 Bit 13: when set, AltSource is used as data input to controller. More...
 
      volatile bool   invert_input: 1
 Bit 14: when set, most recent error input value to controller is inverted. More...
 
      volatile bool   enabled: 1
 Bit 15: enables/disables control loop execution. More...
 
   }   bits
 Controller status bit-field for direct bit access. More...
 
   volatile uint16_t   value
 Controller status full register access. 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

Controller status word data structure allowing bit-wise access to status and control bits.

NPNZ16b controller object status and control word.

The NPNZ16b_s status word is providing status flag bits for monitoring and controlling the NPNZ16b control library code execution from outside the library module.

1) Status Byte The low byte of the NPNZ16b_s status word is used for READ ONLY status flags, set and cleared automatically by the control loop library routine.

2) Control Byte The high byte of the status word is used for control flags, through which users can control the control loop execution. This includes enabling/disabling the control loop execution, switch between different input and output sources, invert input values or enable/disable advanced functions.

Definition at line 183 of file npnz16b.h.

Field Documentation

◆ 

union { ... }

◆ agc_enabled

volatile bool agc_enabled

Bit 11: when set, Adaptive Gain Control Modulation is enabled.

Definition at line 198 of file npnz16b.h.

◆ 

struct { ... } bits

Controller status bit-field for direct bit access.

◆ enabled

volatile bool enabled

Bit 15: enables/disables control loop execution.

Definition at line 202 of file npnz16b.h.

◆ invert_input

volatile bool invert_input

Bit 14: when set, most recent error input value to controller is inverted.

Definition at line 201 of file npnz16b.h.

◆ lower_saturation_event

volatile bool lower_saturation_event

Bit 0: control loop is clamped at minimum output level.

Definition at line 186 of file npnz16b.h.

◆ swap_source

volatile bool swap_source

Bit 13: when set, AltSource is used as data input to controller.

Definition at line 200 of file npnz16b.h.

◆ swap_target

volatile bool swap_target

Bit 12: when set, AltTarget is used as data output of controller.

Definition at line 199 of file npnz16b.h.

◆ unsigned

volatile unsigned

Bit 2: reserved.

Bit 11: reserved.

Bit 9: reserved.

Bit 8: reserved.

Bit 7: reserved.

Bit 6: reserved.

Bit 5: reserved.

Bit 4: reserved.

Bit 3: reserved.

Definition at line 188 of file npnz16b.h.

◆ upper_saturation_event

volatile bool upper_saturation_event

Bit 1: control loop is clamped at maximum output level.

Definition at line 187 of file npnz16b.h.

◆ value

volatile uint16_t value

Controller status full register access.

Definition at line 204 of file npnz16b.h.


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