PER Firmware
Loading...
Searching...
No Matches
charging_fsm.c File Reference

Charger control state machine implementation. More...

#include "charging_fsm.h"
#include "adbms.h"
#include "can_library/faults_common.h"
#include "can_library/generated/A_BOX.h"
#include "can_library/generated/can_types.h"
Include dependency graph for charging_fsm.c:

Functions

static bool is_daqapp_requesting_charge ()
 
static bool is_elcon_ready ()
 
static void report_internal_state ()
 
static void update_charge_command ()
 
static void update_balance_command ()
 
static bool is_charging_permitted ()
 
void charging_fsm_periodic (void)
 

Variables

static constexpr uint16_t MAX_PACK_CHARGING_VOLTS = 540
 
static constexpr uint16_t MAX_PACK_CHARGING_AMPS = 20
 
charging_state_t charging_state = CHARGING_STATE_IDLE
 
charging_state_t next_charging_state = CHARGING_STATE_IDLE
 
uint16_t charge_command_volts = 0
 
uint16_t charge_command_amps = 0
 
bool charge_enable = false
 
adbms_bms_t g_bms
 

Detailed Description

Charger control state machine implementation.

Author
Irving Wang (irvin.nosp@m.gw@p.nosp@m.urdue.nosp@m..edu)

Function Documentation

◆ charging_fsm_periodic()

void charging_fsm_periodic ( void )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_charging_permitted()

static bool is_charging_permitted ( )
inlinestatic
Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_daqapp_requesting_charge()

static bool is_daqapp_requesting_charge ( )
inlinestatic
Here is the caller graph for this function:

◆ is_elcon_ready()

static bool is_elcon_ready ( )
inlinestatic
Here is the caller graph for this function:

◆ report_internal_state()

static void report_internal_state ( )
inlinestatic
Here is the caller graph for this function:

◆ update_balance_command()

static void update_balance_command ( )
inlinestatic
Here is the caller graph for this function:

◆ update_charge_command()

static void update_charge_command ( )
inlinestatic
Here is the caller graph for this function:

Variable Documentation

◆ charge_command_amps

uint16_t charge_command_amps = 0

◆ charge_command_volts

uint16_t charge_command_volts = 0

◆ charge_enable

bool charge_enable = false

◆ charging_state

charging_state_t charging_state = CHARGING_STATE_IDLE

◆ g_bms

adbms_bms_t g_bms
extern

◆ MAX_PACK_CHARGING_AMPS

uint16_t MAX_PACK_CHARGING_AMPS = 20
staticconstexpr

◆ MAX_PACK_CHARGING_VOLTS

uint16_t MAX_PACK_CHARGING_VOLTS = 540
staticconstexpr

◆ next_charging_state

charging_state_t next_charging_state = CHARGING_STATE_IDLE