Contains the state machine of the power control.
More...
|
file | pwrctrl_sm.c |
| Contains power control state machine functions that is executed every 100us.
|
|
This document covers the state machine execution.
◆ PCS_INIT_handler()
- Parameters
-
pcInstance | Pointer 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 112 of file pwrctrl_sm.c.
◆ PCS_SOFT_START_handler()
- Parameters
-
pcInstance | Pointer 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 256 of file pwrctrl_sm.c.
◆ PCS_STANDBY_handler()
- Parameters
-
pcInstance | Pointer 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 179 of file pwrctrl_sm.c.
◆ PCS_UP_AND_RUNNING_handler()
- Parameters
-
pcInstance | Pointer 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 306 of file pwrctrl_sm.c.
◆ PCS_WAIT_IF_FAULT_ACTIVE_handler()
static void PCS_WAIT_IF_FAULT_ACTIVE_handler |
( |
POWER_CONTROL_t * |
pcInstance | ) |
|
|
static |
- Parameters
-
pcInstance | Pointer 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 154 of file pwrctrl_sm.c.
◆ PwrCtrl_StateMachine()
- Parameters
-
pcInstance | Pointer to a power control data object of type POWER_CONTROL_t |
- Returns
- void
This function manages the state machine of the converter. There are five states in this function as follows:
- STATE_INITIALIZE - This state resets the conditional flag bits, ensures PWM output is disabled and run the initial current calibration offset.
- STATE_FAULT_DETECTION - This state checks if there is fault event that occurred.
- STATE_STANDBY This state waits until there is no fault event that has occurred and when the power control enable bit is set.
- STATE_SOFT_START - This state gradually ramps up the references of the power control. The control loop references are gradually incremented until in reached the desired power control reference.
- STATE_ONLINE - This state 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 72 of file pwrctrl_sm.c.