Bar Logo 4kW dsPIC33C PSFB DC-DC DA (Part-No. )
 
Content
     
Loading...
Searching...
No Matches
State Machine

Contains the state machine of the power control. More...

+ Collaboration diagram for State Machine:

Files

file  pwrctrl_sm.c
 Contains power control state machine functions that is executed every 100us.
 

Functions

void PwrCtrl_StateMachine (POWER_CONTROL_t *pcInstance)
 Manages the power control state machine.
 
static void PCS_INIT_handler (POWER_CONTROL_t *pcInstance)
 Executes function for initialze state machine.
 
static void PCS_WAIT_IF_FAULT_ACTIVE_handler (POWER_CONTROL_t *pcInstance)
 Executes the fault handler state machine.
 
static void PCS_PRECHARGE_handler (POWER_CONTROL_t *pcInstance)
 Executes Standby State machine.
 
static void PCS_STANDBY_handler (POWER_CONTROL_t *pcInstance)
 Executes Standby State machine.
 
static void PCS_SOFT_START_handler (POWER_CONTROL_t *pcInstance)
 Executes the power control soft start state machine.
 
static void PCS_UP_AND_RUNNING_handler (POWER_CONTROL_t *pcInstance)
 Executes the Online state.
 

Detailed Description

This document covers the state machine execution.

Function Documentation

◆ PCS_INIT_handler()

static void PCS_INIT_handler ( POWER_CONTROL_t * pcInstance)
static
Parameters
pcInstancePointer to a power control data object of type POWER_CONTROL_t
Returns
void

This function resets the conditional flag bits, ensures PWM output is disabled and run the initial current calibration offset. After this, the state machine moves to checking the fault handler.

Definition at line 92 of file pwrctrl_sm.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ PCS_PRECHARGE_handler()

static void PCS_PRECHARGE_handler ( POWER_CONTROL_t * pcInstance)
static
Parameters
pcInstancePointer to a power control data object of type POWER_CONTROL_t
Returns
void

This function waits until there is no fault event that has occurred and when the power control enable bit is set. When Enable bit is set,
reset the fault objects status bits, reset PWM control settings, enable the power control running bit, enable PWM physical output, initialize control loop references and then move to the next state STATE_SOFT_START.

Note
In this application the power control enable bit is controlled externally by Power Board Visualizer.

Definition at line 238 of file pwrctrl_sm.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ PCS_SOFT_START_handler()

static void PCS_SOFT_START_handler ( POWER_CONTROL_t * pcInstance)
static
Parameters
pcInstancePointer to a power control data object of type POWER_CONTROL_t
Returns
void

This function gradually ramps up the references of the power control. The control loop references are gradually incremented until in reached the desired power control reference. When this is achieved, the next state will
be assigned to STATE_ONLINE.

Definition at line 391 of file pwrctrl_sm.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ PCS_STANDBY_handler()

static void PCS_STANDBY_handler ( POWER_CONTROL_t * pcInstance)
static
Parameters
pcInstancePointer to a power control data object of type POWER_CONTROL_t
Returns
void

This function waits until there is no fault event that has occurred and when the power control enable bit is set. When Enable bit is set,
reset the fault objects status bits, reset PWM control settings, enable the power control running bit, enable PWM physical output, initialize control loop references and then move to the next state STATE_SOFT_START.

Note
In this application the power control enable bit is controlled externally by Power Board Visualizer.

Definition at line 321 of file pwrctrl_sm.c.

+ Here is the caller graph for this function:

◆ PCS_UP_AND_RUNNING_handler()

static void PCS_UP_AND_RUNNING_handler ( POWER_CONTROL_t * pcInstance)
static
Parameters
pcInstancePointer to a power control data object of type POWER_CONTROL_t
Returns
void

This function keeps checks if there is fault event that occurred, if power control Enable has been disabled and if there is changes in the power control references.

Definition at line 441 of file pwrctrl_sm.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ PCS_WAIT_IF_FAULT_ACTIVE_handler()

static void PCS_WAIT_IF_FAULT_ACTIVE_handler ( POWER_CONTROL_t * pcInstance)
static
Parameters
pcInstancePointer to a power control data object of type POWER_CONTROL_t
Returns
void

This function checks if there is fault event that occurred. When there is no fault event, the state machine moves to StandBy state.

Definition at line 195 of file pwrctrl_sm.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ PwrCtrl_StateMachine()

void PwrCtrl_StateMachine ( POWER_CONTROL_t * pcInstance)
Parameters
pcInstancePointer to a power control data object of type POWER_CONTROL_t
Returns
void

This function manages the state machine of the converter. This is called every every 100us. The events on which the state machine changes states are either updated from Power Board Visualizer, or from the controller interrupt.

Definition at line 48 of file pwrctrl_sm.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function: