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 92 of file pwrctrl_sm.c.
◆ PCS_PRECHARGE_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 238 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 391 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 321 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 441 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 195 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. 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.