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

Variables of the buck converter state machine. More...

+ Collaboration diagram for Variables & Constants:

Variables

volatile uint16_t(* BuckConverterStateMachine [])(volatile struct BUCK_CONVERTER_s *buckInstance)
 Function pointer array defining the state machine execution sequence
More...
 
volatile uint16_t BuckStateList_size = (sizeof(BuckConverterStateMachine)/sizeof(BuckConverterStateMachine[0]))
 Buck converter state machine function pointer array size
More...
 
volatile uint16_t(* BuckConverterRampUpSubStateMachine [])(volatile struct BUCK_CONVERTER_s *buckInstance)
 Function pointer array of buck converter startup sub-states. More...
 
volatile uint16_t BuckRampUpSubStateList_size = (sizeof(BuckConverterRampUpSubStateMachine)/sizeof(BuckConverterRampUpSubStateMachine[0]))
 Buck converter sub-state machine function pointer array size. More...
 

Detailed Description

Variables of the buck converter state machine.

Variable Documentation

◆ BuckConverterRampUpSubStateMachine

volatile uint16_t(* BuckConverterRampUpSubStateMachine)[](volatile struct BUCK_CONVERTER_s *buckInstance) ( volatile struct BUCK_CONVERTER_s buckInstance)
Initial value:
=
{
}
volatile uint16_t SubState_IRampUp(volatile struct BUCK_CONVERTER_s *buckInstance)
This function is for the average current mode control where the output current is ramped up to nomina...
volatile uint16_t SubState_VRampUp(volatile struct BUCK_CONVERTER_s *buckInstance)
This function ramps up the output voltage to its nominal regulation point.
volatile uint16_t SubState_PrepareVRampUp(volatile struct BUCK_CONVERTER_s *buckInstance)
This function calculate and pre-charge PWM outputs with ideal duty cycle.
volatile uint16_t SubState_PowerOnDelay(volatile struct BUCK_CONVERTER_s *buckInstance)
This function delays the startup until the Power-on Delay has expired.
volatile uint16_t SubState_PowerGoodDelay(volatile struct BUCK_CONVERTER_s *buckInstance)
In this function, a counter is incremented until the power good delay has expired.

Function pointer array of buck converter startup sub-states.

Buck converter state machine function pointer array.

The function pointer list BuckConverterRampUpSubStateMachine[] is providing access to a list of state functions. Each function mapped into this array as function pointer represents a self-contained, independent sub-state. The main state machine will call functions from this list in order of their index within the array, starting from '0'. While this list is executed, the calling main state is transparent by passing through the return value of the most recent sub-state. Once all sub-states have been executed, the calling main state will return the COMPLETE flag, allowing the main state machine to move on.

Each function needs to be called by handing over a parameter of type

Each function returns of type unsigned integer:

  • 0 = BUCK_OPSRET_ERROR
  • 1 = BUCK_OPSRET_COMPLETE
  • 2 = BUCK_OPSRET_REPEAT

Definition at line 25 of file dev_buck_substates.c.

◆ BuckConverterStateMachine

volatile uint16_t(* BuckConverterStateMachine)[](volatile struct BUCK_CONVERTER_s *buckInstance) ( volatile struct BUCK_CONVERTER_s buckInstance)
Initial value:
=
{
}
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.

Function pointer array defining the state machine execution sequence

Buck converter state machine function pointer array.

The function pointer list BuckConverterStateMachine[] is providing access to a list of state functions. Each function mapped into this array as function pointer represents a self-contained, independent sub-state. The main state machine will call functions from this list in order of their index within the array, starting from '0'. While this list is executed, the calling main state is transparent by passing through the return value of the most recent sub-state. Once all sub-states have been executed, the calling main state will return the COMPLETE flag, allowing the main state machine to move on.

Each function needs to be called by handing over a parameter of type

Each function returns of type unsigned integer:

  • 0 = BUCK_OPSRET_ERROR
  • 1 = BUCK_OPSRET_COMPLETE
  • 2 = BUCK_OPSRET_REPEAT

Definition at line 28 of file dev_buck_opstates.c.

◆ BuckRampUpSubStateList_size

volatile uint16_t BuckRampUpSubStateList_size = (sizeof(BuckConverterRampUpSubStateMachine)/sizeof(BuckConverterRampUpSubStateMachine[0]))

Buck converter sub-state machine function pointer array size.

Buck converter state machine function pointer array size.

Definition at line 35 of file dev_buck_substates.c.

◆ BuckStateList_size

volatile uint16_t BuckStateList_size = (sizeof(BuckConverterStateMachine)/sizeof(BuckConverterStateMachine[0]))

Buck converter state machine function pointer array size

Buck converter state machine function pointer array size.

Definition at line 39 of file dev_buck_opstates.c.