12 #include "dev_buck_pconfig.h"
13 #include "dev_buck_typedef.h"
14 #include "dev_buck_substates.h"
15 #include "dev_buck_special_functions.h"
56 volatile uint16_t _i=0;
66 buckInstance->
status.
bits.cs_calib_complete =
true;
67 else if (buckInstance->
status.
bits.cs_calib_enable)
68 buckInstance->
status.
bits.cs_calib_complete =
false;
70 buckInstance->
status.
bits.cs_calib_complete =
true;
87 return(BUCK_OPSRET_COMPLETE);
106 volatile uint16_t retval=1;
107 volatile uint16_t _i=0;
141 return(BUCK_OPSRET_COMPLETE);
143 return(BUCK_OPSRET_ERROR);
161 volatile uint16_t retval=0;
174 case BUCK_OPSRET_COMPLETE:
175 buckInstance->
status.
bits.cs_calib_complete =
true;
178 case BUCK_OPSRET_REPEAT:
179 buckInstance->
status.
bits.cs_calib_complete =
false;
181 return(BUCK_OPSRET_REPEAT);
184 buckInstance->
status.
bits.cs_calib_complete =
false;
186 return(BUCK_OPSRET_ERROR);
201 return(BUCK_OPSRET_COMPLETE);
206 return(BUCK_OPSRET_REPEAT);
227 volatile uint16_t retval=0;
235 return(BUCK_OPSRET_ERROR);
245 case BUCK_OPSRET_REPEAT:
247 retval = BUCK_OPSRET_REPEAT;
254 case BUCK_OPSRET_COMPLETE:
262 retval = BUCK_OPSRET_REPEAT;
264 if (buckInstance->
state_id.
bits.substate_id == BUCK_OPSTATE_I_RAMP_UP)
277 retval = BUCK_OPSRET_COMPLETE;
286 retval = BUCK_OPSRET_ERROR;
348 return(BUCK_OPSRET_REPEAT);
365 volatile uint16_t retval=0;
374 retval = BUCK_OPSRET_COMPLETE;
376 retval = BUCK_OPSRET_ERROR;
volatile uint16_t State_Online(volatile struct BUCK_CONVERTER_s *buckInstance)
This function tunes the controller reference to the new user control reference level.
volatile uint16_t State_Error(volatile struct BUCK_CONVERTER_s *buckInstance)
If this function is called, the state machine is reset to INITIALIZE (URL=State_Initialize).
volatile uint16_t State_Reset(volatile struct BUCK_CONVERTER_s *buckInstance)
This function resets the buck control operation by re-initiating the control mode,...
volatile uint16_t State_Standby(volatile struct BUCK_CONVERTER_s *buckInstance)
This function waits until all start-up conditions are met.
volatile uint16_t State_RampUp(volatile struct BUCK_CONVERTER_s *buckInstance)
This function ramps up the voltage/input to its nominal value.
volatile uint16_t State_Initialize(volatile struct BUCK_CONVERTER_s *buckInstance)
This function resets the counters and conditional flag bits.
volatile uint16_t(* BuckConverterStateMachine[])(volatile struct BUCK_CONVERTER_s *buckInstance)
Function pointer array defining the state machine execution sequence
volatile uint16_t BuckStateList_size
Buck converter state machine function pointer array size
volatile uint16_t(* BuckConverterRampUpSubStateMachine[])(volatile struct BUCK_CONVERTER_s *buckInstance)
Function pointer array of buck converter startup sub-states.
volatile uint16_t BuckRampUpSubStateList_size
Buck converter sub-state machine function pointer array size.
volatile uint16_t drv_BuckConverter_SpecialFunctionExecute(volatile struct BUCK_CONVERTER_s *buckInstance, volatile enum BUCK_SPECIAL_FUNCTIONS_e specialFunction)
This is the public function call access point to call dedicated special sub-functions.
volatile uint16_t buckPWM_Suspend(volatile struct BUCK_CONVERTER_s *buckInstance)
This function disables the PWM generator IOs.
struct BUCK_CONVERTER_STATUS_s::@126::@128 bits
data structure for single bit addressing operations
struct BUCK_STATE_ID_s::@129::@131 bits
volatile uint16_t ref_inc_step
Size/value of one reference increment/decrement or this period.
volatile uint16_t counter
Soft-Start Execution Counter (read only)
volatile struct BUCK_STARTUP_PERIOD_HANDLER_s power_good_delay
volatile struct BUCK_STARTUP_PERIOD_HANDLER_s v_ramp
volatile struct BUCK_STARTUP_PERIOD_HANDLER_s power_on_delay
volatile uint16_t v_ref
User reference setting used to control the power converter controller.
enum BUCK_CONTROL_MODE_e control_mode
Fundamental control mode.
volatile uint16_t no_of_phases
number of converter phases
volatile struct NPNZ16b_s * controller
pointer to control loop object data structure
void(* ctrl_Reset)(volatile struct NPNZ16b_s *)
Function pointer to RESET routine.
volatile uint16_t reference
Control loop reference variable.
BUCK control & monitoring data structure.
volatile struct BUCK_LOOP_SETTINGS_s i_loop[BUCK_NO_OF_PHASES]
BUCK Current control loop objects.
volatile struct BUCK_STATE_ID_s state_id
BUCK state machine operating state ID.
volatile struct BUCK_CONVERTER_STATUS_s status
BUCK operation status bits.
volatile struct BUCK_LOOP_SETTINGS_s v_loop
BUCK voltage control loop object.
volatile struct BUCK_CONVERTER_SETTINGS_s set_values
Control field for global access to references.
volatile struct BUCK_CONVERTER_STARTUP_s startup
BUCK startup timing settings.
struct NPNZ_STATUS_s::@132::@134 bits
Controller status bit-field for direct bit access.
volatile uint16_t * ptrAddress
Pointer to register or variable where the value is read from (e.g. ADCBUFx) or written to (e....
volatile struct NPNZ_PORT_s Target
Primary data output port declaration.
volatile int16_t MinOutput
Minimum output value used for clamping (R/W)
volatile struct NPNZ_STATUS_s status
Control Loop Status and Control flags.
volatile struct NPNZ_LIMITS_s Limits
Input and output clamping values.
volatile struct NPNZ_PORTS_s Ports
Controller input and output ports.