PER Firmware
Loading...
Searching...
No Matches
adbms_bms_t Struct Reference

Top-level ADBMS driver state, I/O buffers, measurements, and error flags. More...

#include <adbms.h>

Public Attributes

adbms_state_t state
 
adbms_module_t modules [ADBMS_MODULE_COUNT]
 
float min_voltage
 
float max_voltage
 
float avg_voltage
 
float sum_voltage
 
float min_therm_temp
 
float max_therm_temp
 
float avg_therm_temp
 
bool is_discharge_enabled
 
SPI_InitConfig_tspi
 
strbuf_t tx_strbuf
 
uint8_t rx_buf [ADBMS_SPI_RX_BUFFER_SIZE]
 
bool err_spi
 
bool err_connect
 
bool err_rega_mismatch
 
bool err_regb_mismatch
 
bool err_rega_pec
 
bool err_regb_pec
 
bool err_cell_voltage_pecs [ADBMS6380_RDCV_CMD_COUNT]
 
bool err_gpio_voltage_pecs [ADBMS6380_RDAUX_CMD_COUNT]
 

Detailed Description

Top-level ADBMS driver state, I/O buffers, measurements, and error flags.

Member Data Documentation

◆ avg_therm_temp

float adbms_bms_t::avg_therm_temp

Average thermistor temperature across all modules (Celsius).

◆ avg_voltage

float adbms_bms_t::avg_voltage

Average cell voltage across all modules (volts).

◆ err_cell_voltage_pecs

bool adbms_bms_t::err_cell_voltage_pecs[ADBMS6380_RDCV_CMD_COUNT]

Per-command PEC error flags for cell voltage reads.

◆ err_connect

bool adbms_bms_t::err_connect

Set when connect/initialization sequence fails. Retry logic up to higher-level logic.

◆ err_gpio_voltage_pecs

bool adbms_bms_t::err_gpio_voltage_pecs[ADBMS6380_RDAUX_CMD_COUNT]

Per-command PEC error flags for GPIO voltage reads.

◆ err_rega_mismatch

bool adbms_bms_t::err_rega_mismatch

Aggregated REGA mismatch flag across modules.

◆ err_rega_pec

bool adbms_bms_t::err_rega_pec

Set when REGA read has a PEC failure.

◆ err_regb_mismatch

bool adbms_bms_t::err_regb_mismatch

Aggregated REGB mismatch flag across modules.

◆ err_regb_pec

bool adbms_bms_t::err_regb_pec

Set when REGB read has a PEC failure.

◆ err_spi

bool adbms_bms_t::err_spi

Set on any SPI transfer/read failure. Should be a terminal error.

◆ is_discharge_enabled

bool adbms_bms_t::is_discharge_enabled

True if cell discharge balancing is permitted by higher-level logic.

◆ max_therm_temp

float adbms_bms_t::max_therm_temp

Maximum thermistor temperature across all modules (Celsius).

◆ max_voltage

float adbms_bms_t::max_voltage

Maximum cell voltage across all modules (volts).

◆ min_therm_temp

float adbms_bms_t::min_therm_temp

Minimum thermistor temperature across all modules (Celsius).

◆ min_voltage

float adbms_bms_t::min_voltage

Minimum cell voltage across all modules (volts).

◆ modules

adbms_module_t adbms_bms_t::modules[ADBMS_MODULE_COUNT]

Per-module state and measurements.

◆ rx_buf

uint8_t adbms_bms_t::rx_buf[ADBMS_SPI_RX_BUFFER_SIZE]

RX buffer for multi-module readouts.

◆ spi

SPI_InitConfig_t* adbms_bms_t::spi

SPI instance used for ADBMS communication (CS control is manual by ADBMS6380 driver).

◆ state

adbms_state_t adbms_bms_t::state

Current driver state.

◆ sum_voltage

float adbms_bms_t::sum_voltage

Sum of cell voltages across all modules (volts).

◆ tx_strbuf

strbuf_t adbms_bms_t::tx_strbuf

Scratch TX buffer wrapper for command/data packets.


The documentation for this struct was generated from the following file: