|  | Dual Active Bridge Development Board (Part-No. ) |
Content |  |  |  |  |  |

Loading...
Searching...
No Matches
Files | Functions
State Machine
Power Control

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_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

  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 110 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

  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 238 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

  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 176 of file pwrctrl_sm.c.

Here is the call graph for this function:
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

  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 288 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

  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 151 of file pwrctrl_sm.c.

Here is the caller graph for this function:

## ◆ PwrCtrl_StateMachine()

void PwrCtrl_StateMachine | ( | POWER_CONTROL_t * | pcInstance | ) |

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 70 of file pwrctrl_sm.c.

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