foxBMS  1.0.0
The foxBMS Battery Management System API Documentation
ltc_defs.h File Reference

Headers for the driver for the LTC monitoring chip. More...

#include "general.h"
#include "ltc_cfg.h"
#include "database.h"
#include "spi.h"
Include dependency graph for ltc_defs.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  LTC_ERRORTABLE_s
 
struct  LTC_OPENWIRE_DETECTION_s
 
struct  LTC_MUX_CH_CFG_s
 
struct  LTC_MUX_SEQUENCE_s
 
struct  LTC_DATAPTR_s
 
struct  LTC_ERROR_s
 
struct  LTC_CONFIG_s
 
struct  LTC_REQUEST_s
 
struct  LTC_STATE_s
 

Enumerations

enum  LTC_ADCMODE_e {
  LTC_ADCMODE_UNDEFINED, LTC_ADCMODE_FAST_DCP0, LTC_ADCMODE_NORMAL_DCP0, LTC_ADCMODE_FILTERED_DCP0,
  LTC_ADCMODE_FAST_DCP1, LTC_ADCMODE_NORMAL_DCP1, LTC_ADCMODE_FILTERED_DCP1
}
 
enum  LTC_ADCMEAS_CHAN_e {
  LTC_ADCMEAS_UNDEFINED, LTC_ADCMEAS_ALLCHANNEL, LTC_ADCMEAS_SINGLECHANNEL_GPIO1, LTC_ADCMEAS_SINGLECHANNEL_GPIO2,
  LTC_ADCMEAS_SINGLECHANNEL_GPIO3, LTC_ADCMEAS_SINGLECHANNEL_GPIO4, LTC_ADCMEAS_SINGLECHANNEL_GPIO5, LTC_ADCMEAS_SINGLECHANNEL_TWOCELLS,
  LTC_ADCMEAS_ALLCHANNEL_SC
}
 
enum  LTC_STATEMACH_e {
  LTC_STATEMACH_UNINITIALIZED, LTC_STATEMACH_INITIALIZATION, LTC_STATEMACH_REINIT, LTC_STATEMACH_INITIALIZED,
  LTC_STATEMACH_IDLE, LTC_STATEMACH_STARTMEAS, LTC_STATEMACH_READVOLTAGE, LTC_STATEMACH_MUXMEASUREMENT,
  LTC_STATEMACH_MUXMEASUREMENT_FINISHED, LTC_STATEMACH_BALANCECONTROL, LTC_STATEMACH_ALLGPIOMEASUREMENT, LTC_STATEMACH_READALLGPIO,
  LTC_STATEMACH_READVOLTAGE_2CELLS, LTC_STATEMACH_STARTMEAS_2CELLS, LTC_STATEMACH_USER_IO_CONTROL, LTC_STATEMACH_USER_IO_FEEDBACK,
  LTC_STATEMACH_EEPROM_READ, LTC_STATEMACH_EEPROM_WRITE, LTC_STATEMACH_TEMP_SENS_READ, LTC_STATEMACH_BALANCEFEEDBACK,
  LTC_STATEMACH_OPENWIRE_CHECK, LTC_STATEMACH_DEVICE_PARAMETER, LTC_STATEMACH_ADC_ACCURACY, LTC_STATEMACH_DIGITAL_FILTER,
  LTC_STATEMACH_VOLTMEAS_SUMOFCELLS, LTC_STATEMACH_EEPROM_READ_UID, LTC_STATEMACH_USER_IO_CONTROL_TI, LTC_STATEMACH_USER_IO_FEEDBACK_TI,
  LTC_STATEMACH_STARTMEAS_CONTINUE, LTC_STATEMACH_MEASCYCLE_FINISHED, LTC_STATEMACH_UNDEFINED, LTC_STATEMACH_RESERVED1,
  LTC_STATEMACH_ERROR_SPIFAILED, LTC_STATEMACH_ERROR_PECFAILED, LTC_STATEMACH_ERROR_MUXFAILED, LTC_STATEMACH_ERROR_INITIALIZATION
}
 
enum  LTC_STATEMACH_SUB_e { LTC_ENTRY, LTC_ERROR_ENTRY, LTC_ERROR_PROCESSED }
 
enum  LTC_STATEMACH_UNINITIALIZED_SUB_e { LTC_ENTRY_UNINITIALIZED }
 
enum  LTC_STATEMACH_INITIALIZATION_SUB_e {
  LTC_INIT_STRING, LTC_ENTRY_INITIALIZATION, LTC_START_INIT_INITIALIZATION, LTC_RE_ENTRY_INITIALIZATION,
  LTC_READ_INITIALIZATION_REGISTER, LTC_CHECK_INITIALIZATION, LTC_EXIT_INITIALIZATION
}
 
enum  LTC_STATEMACH_INITIALIZED_SUB_e { LTC_ENTRY_INITIALIZED }
 
enum  LTC_STATEMACH_READVOLTAGE_SUB_e {
  LTC_READ_VOLTAGE_REGISTER_A_RDCVA_READVOLTAGE, LTC_READ_VOLTAGE_REGISTER_B_RDCVB_READVOLTAGE, LTC_READ_VOLTAGE_REGISTER_C_RDCVC_READVOLTAGE, LTC_READ_VOLTAGE_REGISTER_D_RDCVD_READVOLTAGE,
  LTC_READ_VOLTAGE_REGISTER_E_RDCVE_READVOLTAGE, LTC_READ_VOLTAGE_REGISTER_F_RDCVF_READVOLTAGE, LTC_READ_VOLTAGE_REGISTER_G_RDCVG_READVOLTAGE, LTC_READ_VOLTAGE_REGISTER_H_RDCVH_READVOLTAGE,
  LTC_READ_VOLTAGE_REGISTER_I_RDCVI_READVOLTAGE, LTC_EXIT_READVOLTAGE, LTC_READ_AUXILIARY_REGISTER_A_RDAUXA, LTC_READ_AUXILIARY_REGISTER_B_RDAUXB,
  LTC_READ_AUXILIARY_REGISTER_C_RDAUXC, LTC_READ_AUXILIARY_REGISTER_D_RDAUXD, LTC_EXIT_READAUXILIARY_ALLGPIOS
}
 
enum  LTC_STATEMACH_READVOLTAGE_SC_SUB_e { LTC_VOLTMEAS_SC_TRIGGER_CONVERSION, LTC_VOLTMEAS_SC_READ_SC, LTC_EXIT_VOLTMEAS_SC }
 
enum  LTC_STATEMACH_BALANCECONTROL_SUB {
  LTC_CONFIG_BALANCECONTROL, LTC_CONFIG2_BALANCECONTROL, LTC_CONFIG2_BALANCECONTROL_END, LTC_REQUEST_FEEDBACK_BALANCECONTROL,
  LTC_READ_FEEDBACK_BALANCECONTROL, LTC_SAVE_FEEDBACK_BALANCECONTROL, LTC_EXIT_BALANCECONTROL, LTC_STATEMACH_STARTMUXMEASUREMENT,
  LTC_STATEMACH_MUXCONFIGURATION_INIT, LTC_STATEMACH_MUXMEASUREMENT_CONFIG, LTC_STATEMACH_READMUXMEASUREMENT, LTC_STATEMACH_STOREMUXMEASUREMENT
}
 
enum  LTC_STATEMACH_OPENWIRECHECK_SUB {
  LTC_REQUEST_PULLUP_CURRENT_OPENWIRE_CHECK, LTC_READ_VOLTAGES_PULLUP_OPENWIRE_CHECK, LTC_REQUEST_PULLDOWN_CURRENT_OPENWIRE_CHECK, LTC_READ_VOLTAGES_PULLDOWN_OPENWIRE_CHECK,
  LTC_PERFORM_OPENWIRE_CHECK
}
 
enum  LTC_STATEMACH_DIAGNOSIS_SUB_e {
  LTC_REQUEST_DEVICE_PARAMETER, LTC_DEVICE_PARAMETER_READ_STATUS_REGISTER_A, LTC_DEVICE_PARAMETER_READ_STATUS_REGISTER_B, LTC_REQUEST_REDUNDANCY_CHECK,
  LTC_REDUNDANCY_READ_STATUS_REGISTER_A, LTC_REDUNDANCY_READ_STATUS_REGISTER_B, LTC_EXIT_DEVICE_PARAMETER
}
 
enum  LTC_STATEMACH_ADC_ACCURACY_CHECK_SUB_e {
  LTC_REQUEST_ADC1_VERIFICATION, LTC_READ_ADC1_VERIFICATION_VALUE, LTC_SAVE_ADC1_VERIFICATION_VALUE, LTC_REQUEST_ADC2_VERIFICATION,
  LTC_READ_ADC2_VERIFICATION_VALUE, LTC_EXIT_ADC_ACCURACY_CHECK
}
 
enum  LTC_STATEMACH_DIGITAL_FILTER_SUB_e {
  LTC_REQUEST_CLEAR_CELLVOLTAGES, LTC_REQUEST_CLEAR_AUX_REGISTER, LTC_REQUEST_CLEAR_STATUS_REGISTER, LTC_REQUEST_DIGITAL_FILTER_CHECK_CELLVOLTAGES,
  LTC_DIGITAL_FILTER_SELF_TEST_1_CELLVOLTAGES, LTC_DIGITAL_FILTER_SELF_TEST_1_AUX, LTC_DIGITAL_FILTER_READ_STATUS_REGISTER_A, LTC_DIGITAL_FILTER_READ_STATUS_REGISTER_B,
  LTC_DIGITAL_FILTER_SELF_TEST_1_STATUS, LTC_DIGITAL_FILTER_SELF_TEST_2_CELLVOLTAGES, LTC_DIGITAL_FILTER_SELF_TEST_2_AUX, LTC_DIGITAL_FILTER_READ_STATUS_REGISTER_A_2,
  LTC_DIGITAL_FILTER_READ_STATUS_REGISTER_B_2, LTC_DIGITAL_FILTER_SELF_TEST_2_STATUS, LTC_EXIT_DIGITAL_FILTER_CHECK
}
 
enum  LTC_STATEMACH_USER_IO_CONTROL_e {
  LTC_USER_IO_SET_OUTPUT_REGISTER, LTC_USER_IO_READ_INPUT_REGISTER, LTC_USER_IO_SEND_CLOCK_STCOMM, LTC_USER_IO_READ_I2C_TRANSMISSION_RESULT_RDCOMM,
  LTC_USER_IO_SAVE_DATA, LTC_USER_IO_FINISHED
}
 
enum  LTC_STATEMACH_USER_IO_CONTROL_TI_e {
  LTC_USER_IO_SET_DIRECTION_REGISTER_TI, LTC_USER_IO_SET_OUTPUT_REGISTER_TI, LTC_USER_IO_READ_INPUT_REGISTER_TI_FIRST, LTC_USER_IO_READ_INPUT_REGISTER_TI_SECOND,
  LTC_USER_IO_SEND_CLOCK_STCOMM_TI, LTC_USER_IO_READ_I2C_TRANSMISSION_RESULT_RDCOMM_TI, LTC_USER_IO_READ_I2C_TRANSMISSION_RESULT_RDCOMM_TI_SECOND, LTC_USER_IO_READ_I2C_TRANSMISSION_RESULT_RDCOMM_TI_THIRD,
  LTC_USER_IO_READ_I2C_TRANSMISSION_RESULT_RDCOMM_TI_FOURTH, LTC_USER_IO_SAVE_DATA_TI, LTC_USER_IO_FINISHED_TI
}
 
enum  LTC_STATEMACH_EEPROM_READ_UID_e {
  LTC_EEPROM_SET_READ_ADDRESS, LTC_EEPROM_READ_DATA1, LTC_EEPROM_READ_DATA2, LTC_EEPROM_WRITE_DATA1,
  LTC_EEPROM_WRITE_DATA2, LTC_EEPROM_SEND_CLOCK_STCOMM1, LTC_EEPROM_SEND_CLOCK_STCOMM2, LTC_EEPROM_SEND_CLOCK_STCOMM3,
  LTC_EEPROM_SEND_CLOCK_STCOMM4, LTC_EEPROM_READ_I2C_TRANSMISSION_RESULT_RDCOMM, LTC_EEPROM_SAVE_READ, LTC_EEPROM_FINISHED
}
 
enum  LTC_STATEMACH_TEMP_SENS_READ_e {
  LTC_TEMP_SENS_SEND_DATA1, LTC_TEMP_SENS_READ_DATA1, LTC_TEMP_SENS_READ_DATA3, LTC_TEMP_SENS_SEND_CLOCK_STCOMM1,
  LTC_TEMP_SENS_SEND_CLOCK_STCOMM2, LTC_TEMP_SENS_READ_I2C_TRANSMISSION_RESULT_RDCOMM, LTC_TEMP_SENS_SAVE_TEMP, LTC_TEMP_SENS_FINISHED
}
 
enum  LTC_STATEMACH_MUXMEASUREMENT_CONFIG_SUB_e {
  LTC_SET_MUX_CHANNEL_WRCOMM_MUXMEASUREMENT_CONFIG, LTC_SEND_CLOCK_STCOMM_MUXMEASUREMENT_CONFIG, LTC_SEND_CLOCK_STCOMM_DIRECTION_CONFIG, LTC_SEND_CLOCK_STCOMM_WRITE_IO,
  LTC_READ_I2C_TRANSMISSION_RESULT_RDCOMM_MUXMEASUREMENT_CONFIG, LTC_READ_I2C_TRANSMISSION_CHECK_MUXMEASUREMENT_CONFIG, LTC_START_GPIO_MEASUREMENT_MUXMEASUREMENT_CONFIG
}
 
enum  LTC_STATEMACH_READALLGPIO_SUB_e {
  LTC_READ_AUXILIARY_REGISTER_A_RAUXA_READALLGPIO, LTC_READ_AUXILIARY_REGISTER_B_RAUXB_READALLGPIO, LTC_READ_AUXILIARY_REGISTER_C_RAUXC_READALLGPIO, LTC_READ_AUXILIARY_REGISTER_D_RAUXD_READALLGPIO,
  LTC_EXIT_READALLGPIO
}
 
enum  LTC_STATEMACH_MUXMEASUREMENT_SUB_e { LTC_READ_AUXILIARY_REGISTER_A_RAUXA_MUXMEASUREMENT, LTC_SAVE_MUX_MEASUREMENT_MUXMEASUREMENT }
 
enum  LTC_STATE_REQUEST_e {
  LTC_STATE_INIT_REQUEST, LTC_STATE_USER_IO_WRITE_REQUEST, LTC_STATE_USER_IO_READ_REQUEST, LTC_STATE_USER_IO_REQUEST,
  LTC_STATE_USER_IO_WRITE_REQUEST_TI, LTC_STATE_USER_IO_READ_REQUEST_TI, LTC_STATE_EEPROM_READ_REQUEST, LTC_STATE_EEPROM_WRITE_REQUEST,
  LTC_STATE_EEPROM_READ_UID_REQUEST, LTC_STATE_TEMP_SENS_READ_REQUEST, LTC_STATE_BALANCEFEEDBACK_REQUEST, LTC_STATE_REINIT_REQUEST,
  LTC_STATE_IDLE_REQUEST, LTC_STATE_VOLTAGEMEASUREMENT_REQUEST, LTC_STATE_VOLTAGEMEASUREMENT_2CELLS_REQUEST, LTC_STATE_VOLTAGEMEASUREMENT_SC_REQUEST,
  LTC_STATE_READVOLTAGE_REQUEST, LTC_STATE_READVOLTAGE_2CELLS_REQUEST, LTC_STATE_MUXMEASUREMENT_REQUEST, LTC_STATE_BALANCECONTROL_REQUEST,
  LTC_STATEMACH_BALANCEFEEDBACK_REQUEST, LTC_STATE_ALLGPIOMEASUREMENT_REQUEST, LTC_STATE_OPENWIRE_CHECK_REQUEST, LTC_STATEMACH_DEVICE_PARAMETER_REQUEST,
  LTC_STATEMACH_ADC_ACCURACY_REQUEST, LTC_STATEMACH_DIGITAL_FILTER_REQUEST, LTC_STATE_NO_REQUEST
}
 
enum  LTC_RETURN_TYPE_e {
  LTC_OK, LTC_BUSY_OK, LTC_REQUEST_PENDING, LTC_ILLEGAL_REQUEST,
  LTC_SPI_ERROR, LTC_PEC_ERROR, LTC_MUX_ERROR, LTC_INIT_ERROR,
  LTC_OK_FROM_ERROR, LTC_ERROR, LTC_ALREADY_INITIALIZED, LTC_ILLEGAL_TASK_TYPE
}
 
enum  LTC_TASK_TYPE_e { LTC_HAS_TO_MEASURE, LTC_HAS_TO_REINIT, LTC_HAS_TO_MEASURE_2CELLS }
 
enum  LTC_REUSE_MODE_e { LTC_NOT_REUSED, LTC_REUSE_READVOLT_FOR_ADOW_PUP, LTC_REUSE_READVOLT_FOR_ADOW_PDOWN }
 
enum  LTC_PORT_EXPANDER_TI_DIRECTION_e { LTC_PORT_EXPANDER_TI_OUTPUT = 0x0, LTC_PORT_EXPANDER_TI_INPUT = 0xFF }
 

Detailed Description

Headers for the driver for the LTC monitoring chip.

BSD 3-Clause License Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

We kindly request you to use one or more of the following phrases to refer to foxBMS in your hardware, software, documentation or advertising materials:

″This product uses parts of foxBMS®″

″This product includes parts of foxBMS®″

″This product is derived from foxBMS®″

Author
foxBMS Team
Date
2015-09-01 (date of creation)
Updated
2015-09-01 (date of last update)
Prefix
LTC

Definition in file ltc_defs.h.

Enumeration Type Documentation

◆ LTC_ADCMEAS_CHAN_e

Number of measured channels

Enumerator
LTC_ADCMEAS_UNDEFINED 

not defined

LTC_ADCMEAS_ALLCHANNEL 

all ADC channels are measured

LTC_ADCMEAS_SINGLECHANNEL_GPIO1 

only a single ADC channel (GPIO1) is measured

LTC_ADCMEAS_SINGLECHANNEL_GPIO2 

only a single ADC channel (GPIO2) is measured

LTC_ADCMEAS_SINGLECHANNEL_GPIO3 

only a single ADC channel (GPIO3) is measured

LTC_ADCMEAS_SINGLECHANNEL_GPIO4 

only a single ADC channel (GPIO4) is measured

LTC_ADCMEAS_SINGLECHANNEL_GPIO5 

only a single ADC channel (GPIO5) is measured

LTC_ADCMEAS_SINGLECHANNEL_TWOCELLS 

only two cell voltages are measured

LTC_ADCMEAS_ALLCHANNEL_SC 

all ADC channels + sum of cells are measured

Definition at line 102 of file ltc_defs.h.

◆ LTC_ADCMODE_e

Voltage measurement mode DCP0 means discharged not permitted during measurement DCP1 means discharged permitted during measurement Also DCP0 means balancing is interrupted when a cell is measured.

Enumerator
LTC_ADCMODE_UNDEFINED 

ADC measurement mode is not defined

LTC_ADCMODE_FAST_DCP0 

ADC measurement mode: Fast with DCP0

LTC_ADCMODE_NORMAL_DCP0 

ADC measurement mode: Normal with DCP0

LTC_ADCMODE_FILTERED_DCP0 

ADC measurement mode: Filtered with DCP0

LTC_ADCMODE_FAST_DCP1 

ADC measurement mode: Fast with DCP1

LTC_ADCMODE_NORMAL_DCP1 

ADC measurement mode: Normal with DCP1

LTC_ADCMODE_FILTERED_DCP1 

ADC measurement mode: Filtered with DCP1

Definition at line 91 of file ltc_defs.h.

◆ LTC_PORT_EXPANDER_TI_DIRECTION_e

TI port expander IO direction (input or output). Here the value in the enum is needed because it is written in a configuration register.

Enumerator
LTC_PORT_EXPANDER_TI_OUTPUT 
LTC_PORT_EXPANDER_TI_INPUT 

Definition at line 503 of file ltc_defs.h.

◆ LTC_RETURN_TYPE_e

Possible return values when state requests are made to the LTC statemachine

Enumerator
LTC_OK 

LTC --> ok

LTC_BUSY_OK 

LTC under load --> ok

LTC_REQUEST_PENDING 

requested to be executed

LTC_ILLEGAL_REQUEST 

Request can not be executed

LTC_SPI_ERROR 

Error state: Source: SPI

LTC_PEC_ERROR 

Error state: Source: PEC

LTC_MUX_ERROR 

Error state: Source: MUX

LTC_INIT_ERROR 

Error state: Source: Initialization

LTC_OK_FROM_ERROR 

Return from error --> ok

LTC_ERROR 

General error state

LTC_ALREADY_INITIALIZED 

Initialization of LTC already finished

LTC_ILLEGAL_TASK_TYPE 

Illegal

Definition at line 394 of file ltc_defs.h.

◆ LTC_REUSE_MODE_e

Enumerator
LTC_NOT_REUSED 
LTC_REUSE_READVOLT_FOR_ADOW_PUP 
LTC_REUSE_READVOLT_FOR_ADOW_PDOWN 

Definition at line 492 of file ltc_defs.h.

◆ LTC_STATE_REQUEST_e

State requests for the LTC statemachine

Enumerator
LTC_STATE_INIT_REQUEST 
LTC_STATE_USER_IO_WRITE_REQUEST 
LTC_STATE_USER_IO_READ_REQUEST 
LTC_STATE_USER_IO_REQUEST 
LTC_STATE_USER_IO_WRITE_REQUEST_TI 
LTC_STATE_USER_IO_READ_REQUEST_TI 
LTC_STATE_EEPROM_READ_REQUEST 
LTC_STATE_EEPROM_WRITE_REQUEST 
LTC_STATE_EEPROM_READ_UID_REQUEST 
LTC_STATE_TEMP_SENS_READ_REQUEST 
LTC_STATE_BALANCEFEEDBACK_REQUEST 
LTC_STATE_REINIT_REQUEST 
LTC_STATE_IDLE_REQUEST 
LTC_STATE_VOLTAGEMEASUREMENT_REQUEST 
LTC_STATE_VOLTAGEMEASUREMENT_2CELLS_REQUEST 
LTC_STATE_VOLTAGEMEASUREMENT_SC_REQUEST 
LTC_STATE_READVOLTAGE_REQUEST 
LTC_STATE_READVOLTAGE_2CELLS_REQUEST 
LTC_STATE_MUXMEASUREMENT_REQUEST 
LTC_STATE_BALANCECONTROL_REQUEST 
LTC_STATEMACH_BALANCEFEEDBACK_REQUEST 
LTC_STATE_ALLGPIOMEASUREMENT_REQUEST 
LTC_STATE_OPENWIRE_CHECK_REQUEST 
LTC_STATEMACH_DEVICE_PARAMETER_REQUEST 
LTC_STATEMACH_ADC_ACCURACY_REQUEST 
LTC_STATEMACH_DIGITAL_FILTER_REQUEST 
LTC_STATE_NO_REQUEST 

Definition at line 361 of file ltc_defs.h.

◆ LTC_STATEMACH_ADC_ACCURACY_CHECK_SUB_e

Substates for ADC accuracy check

Enumerator
LTC_REQUEST_ADC1_VERIFICATION 
LTC_READ_ADC1_VERIFICATION_VALUE 
LTC_SAVE_ADC1_VERIFICATION_VALUE 
LTC_REQUEST_ADC2_VERIFICATION 
LTC_READ_ADC2_VERIFICATION_VALUE 
LTC_EXIT_ADC_ACCURACY_CHECK 

Definition at line 250 of file ltc_defs.h.

◆ LTC_STATEMACH_BALANCECONTROL_SUB

Substates for the balance control state

Enumerator
LTC_CONFIG_BALANCECONTROL 
LTC_CONFIG2_BALANCECONTROL 
LTC_CONFIG2_BALANCECONTROL_END 
LTC_REQUEST_FEEDBACK_BALANCECONTROL 
LTC_READ_FEEDBACK_BALANCECONTROL 
LTC_SAVE_FEEDBACK_BALANCECONTROL 
LTC_EXIT_BALANCECONTROL 
LTC_STATEMACH_STARTMUXMEASUREMENT 
LTC_STATEMACH_MUXCONFIGURATION_INIT 
LTC_STATEMACH_MUXMEASUREMENT_CONFIG 

Configuration of the multiplexers

LTC_STATEMACH_READMUXMEASUREMENT 
LTC_STATEMACH_STOREMUXMEASUREMENT 

Definition at line 213 of file ltc_defs.h.

◆ LTC_STATEMACH_DIAGNOSIS_SUB_e

Substates for diagnosis state

Enumerator
LTC_REQUEST_DEVICE_PARAMETER 
LTC_DEVICE_PARAMETER_READ_STATUS_REGISTER_A 
LTC_DEVICE_PARAMETER_READ_STATUS_REGISTER_B 
LTC_REQUEST_REDUNDANCY_CHECK 
LTC_REDUNDANCY_READ_STATUS_REGISTER_A 
LTC_REDUNDANCY_READ_STATUS_REGISTER_B 
LTC_EXIT_DEVICE_PARAMETER 

Definition at line 239 of file ltc_defs.h.

◆ LTC_STATEMACH_DIGITAL_FILTER_SUB_e

Substates for digital filter check

Enumerator
LTC_REQUEST_CLEAR_CELLVOLTAGES 
LTC_REQUEST_CLEAR_AUX_REGISTER 
LTC_REQUEST_CLEAR_STATUS_REGISTER 
LTC_REQUEST_DIGITAL_FILTER_CHECK_CELLVOLTAGES 
LTC_DIGITAL_FILTER_SELF_TEST_1_CELLVOLTAGES 
LTC_DIGITAL_FILTER_SELF_TEST_1_AUX 
LTC_DIGITAL_FILTER_READ_STATUS_REGISTER_A 
LTC_DIGITAL_FILTER_READ_STATUS_REGISTER_B 
LTC_DIGITAL_FILTER_SELF_TEST_1_STATUS 
LTC_DIGITAL_FILTER_SELF_TEST_2_CELLVOLTAGES 
LTC_DIGITAL_FILTER_SELF_TEST_2_AUX 
LTC_DIGITAL_FILTER_READ_STATUS_REGISTER_A_2 
LTC_DIGITAL_FILTER_READ_STATUS_REGISTER_B_2 
LTC_DIGITAL_FILTER_SELF_TEST_2_STATUS 
LTC_EXIT_DIGITAL_FILTER_CHECK 

Definition at line 260 of file ltc_defs.h.

◆ LTC_STATEMACH_e

States of the LTC state machine

Enumerator
LTC_STATEMACH_UNINITIALIZED 
LTC_STATEMACH_INITIALIZATION 
LTC_STATEMACH_REINIT 
LTC_STATEMACH_INITIALIZED 

LTC is initialized

LTC_STATEMACH_IDLE 
LTC_STATEMACH_STARTMEAS 
LTC_STATEMACH_READVOLTAGE 
LTC_STATEMACH_MUXMEASUREMENT 

Mux (Temperature and Balancing) Measurement

LTC_STATEMACH_MUXMEASUREMENT_FINISHED 
LTC_STATEMACH_BALANCECONTROL 
LTC_STATEMACH_ALLGPIOMEASUREMENT 
LTC_STATEMACH_READALLGPIO 
LTC_STATEMACH_READVOLTAGE_2CELLS 
LTC_STATEMACH_STARTMEAS_2CELLS 
LTC_STATEMACH_USER_IO_CONTROL 

Control of the user port expander

LTC_STATEMACH_USER_IO_FEEDBACK 

Control of the user port expander

LTC_STATEMACH_EEPROM_READ 

Control of the external EEPROM

LTC_STATEMACH_EEPROM_WRITE 

Control of the external EEPROM

LTC_STATEMACH_TEMP_SENS_READ 

Control of the external temperature sensor

LTC_STATEMACH_BALANCEFEEDBACK 
LTC_STATEMACH_OPENWIRE_CHECK 
LTC_STATEMACH_DEVICE_PARAMETER 
LTC_STATEMACH_ADC_ACCURACY 
LTC_STATEMACH_DIGITAL_FILTER 
LTC_STATEMACH_VOLTMEAS_SUMOFCELLS 
LTC_STATEMACH_EEPROM_READ_UID 

Control of the external EEPROM

LTC_STATEMACH_USER_IO_CONTROL_TI 

Control of the user port expander

LTC_STATEMACH_USER_IO_FEEDBACK_TI 

Control of the user port expander

LTC_STATEMACH_STARTMEAS_CONTINUE 
LTC_STATEMACH_MEASCYCLE_FINISHED 
LTC_STATEMACH_UNDEFINED 

undefined state

LTC_STATEMACH_RESERVED1 

reserved state

LTC_STATEMACH_ERROR_SPIFAILED 

Error-State: SPI error

LTC_STATEMACH_ERROR_PECFAILED 

Error-State: PEC error

LTC_STATEMACH_ERROR_MUXFAILED 

Error-State: multiplexer error

LTC_STATEMACH_ERROR_INITIALIZATION 

Error-State: initialization error

Definition at line 115 of file ltc_defs.h.

◆ LTC_STATEMACH_EEPROM_READ_UID_e

Substates for the EEPROM control state

Enumerator
LTC_EEPROM_SET_READ_ADDRESS 
LTC_EEPROM_READ_DATA1 
LTC_EEPROM_READ_DATA2 
LTC_EEPROM_WRITE_DATA1 
LTC_EEPROM_WRITE_DATA2 
LTC_EEPROM_SEND_CLOCK_STCOMM1 
LTC_EEPROM_SEND_CLOCK_STCOMM2 
LTC_EEPROM_SEND_CLOCK_STCOMM3 
LTC_EEPROM_SEND_CLOCK_STCOMM4 
LTC_EEPROM_READ_I2C_TRANSMISSION_RESULT_RDCOMM 
LTC_EEPROM_SAVE_READ 
LTC_EEPROM_FINISHED 

Definition at line 304 of file ltc_defs.h.

◆ LTC_STATEMACH_INITIALIZATION_SUB_e

Substates for the initialization state

Enumerator
LTC_INIT_STRING 
LTC_ENTRY_INITIALIZATION 
LTC_START_INIT_INITIALIZATION 
LTC_RE_ENTRY_INITIALIZATION 
LTC_READ_INITIALIZATION_REGISTER 
LTC_CHECK_INITIALIZATION 
LTC_EXIT_INITIALIZATION 

Definition at line 169 of file ltc_defs.h.

◆ LTC_STATEMACH_INITIALIZED_SUB_e

Substates for the uninitialized state

Enumerator
LTC_ENTRY_INITIALIZED 

Definition at line 181 of file ltc_defs.h.

◆ LTC_STATEMACH_MUXMEASUREMENT_CONFIG_SUB_e

Substates for the multiplexer measurement configuration state

Enumerator
LTC_SET_MUX_CHANNEL_WRCOMM_MUXMEASUREMENT_CONFIG 
LTC_SEND_CLOCK_STCOMM_MUXMEASUREMENT_CONFIG 
LTC_SEND_CLOCK_STCOMM_DIRECTION_CONFIG 
LTC_SEND_CLOCK_STCOMM_WRITE_IO 
LTC_READ_I2C_TRANSMISSION_RESULT_RDCOMM_MUXMEASUREMENT_CONFIG 
LTC_READ_I2C_TRANSMISSION_CHECK_MUXMEASUREMENT_CONFIG 
LTC_START_GPIO_MEASUREMENT_MUXMEASUREMENT_CONFIG 

Definition at line 332 of file ltc_defs.h.

◆ LTC_STATEMACH_MUXMEASUREMENT_SUB_e

Substates for the single GPIO multiplexer measurement state

Enumerator
LTC_READ_AUXILIARY_REGISTER_A_RAUXA_MUXMEASUREMENT 
LTC_SAVE_MUX_MEASUREMENT_MUXMEASUREMENT 

Definition at line 354 of file ltc_defs.h.

◆ LTC_STATEMACH_OPENWIRECHECK_SUB

Substates for open-wire check

Enumerator
LTC_REQUEST_PULLUP_CURRENT_OPENWIRE_CHECK 
LTC_READ_VOLTAGES_PULLUP_OPENWIRE_CHECK 
LTC_REQUEST_PULLDOWN_CURRENT_OPENWIRE_CHECK 
LTC_READ_VOLTAGES_PULLDOWN_OPENWIRE_CHECK 
LTC_PERFORM_OPENWIRE_CHECK 

Definition at line 230 of file ltc_defs.h.

◆ LTC_STATEMACH_READALLGPIO_SUB_e

Substates for the all-GPIO multiplexer measurement state

Enumerator
LTC_READ_AUXILIARY_REGISTER_A_RAUXA_READALLGPIO 
LTC_READ_AUXILIARY_REGISTER_B_RAUXB_READALLGPIO 
LTC_READ_AUXILIARY_REGISTER_C_RAUXC_READALLGPIO 
LTC_READ_AUXILIARY_REGISTER_D_RAUXD_READALLGPIO 
LTC_EXIT_READALLGPIO 

Definition at line 344 of file ltc_defs.h.

◆ LTC_STATEMACH_READVOLTAGE_SC_SUB_e

Substates for the cell voltage + SC measurement state

Enumerator
LTC_VOLTMEAS_SC_TRIGGER_CONVERSION 
LTC_VOLTMEAS_SC_READ_SC 
LTC_EXIT_VOLTMEAS_SC 

Definition at line 206 of file ltc_defs.h.

◆ LTC_STATEMACH_READVOLTAGE_SUB_e

Substates for the read voltage state

Enumerator
LTC_READ_VOLTAGE_REGISTER_A_RDCVA_READVOLTAGE 
LTC_READ_VOLTAGE_REGISTER_B_RDCVB_READVOLTAGE 
LTC_READ_VOLTAGE_REGISTER_C_RDCVC_READVOLTAGE 
LTC_READ_VOLTAGE_REGISTER_D_RDCVD_READVOLTAGE 
LTC_READ_VOLTAGE_REGISTER_E_RDCVE_READVOLTAGE 
LTC_READ_VOLTAGE_REGISTER_F_RDCVF_READVOLTAGE 
LTC_READ_VOLTAGE_REGISTER_G_RDCVG_READVOLTAGE 
LTC_READ_VOLTAGE_REGISTER_H_RDCVH_READVOLTAGE 
LTC_READ_VOLTAGE_REGISTER_I_RDCVI_READVOLTAGE 
LTC_EXIT_READVOLTAGE 
LTC_READ_AUXILIARY_REGISTER_A_RDAUXA 
LTC_READ_AUXILIARY_REGISTER_B_RDAUXB 
LTC_READ_AUXILIARY_REGISTER_C_RDAUXC 
LTC_READ_AUXILIARY_REGISTER_D_RDAUXD 
LTC_EXIT_READAUXILIARY_ALLGPIOS 

Definition at line 186 of file ltc_defs.h.

◆ LTC_STATEMACH_SUB_e

General substates

Enumerator
LTC_ENTRY 

Substate entry state

LTC_ERROR_ENTRY 

Substate entry error

LTC_ERROR_PROCESSED 

Substate error processed

Definition at line 157 of file ltc_defs.h.

◆ LTC_STATEMACH_TEMP_SENS_READ_e

Substates for the temperature sensor control state

Enumerator
LTC_TEMP_SENS_SEND_DATA1 
LTC_TEMP_SENS_READ_DATA1 
LTC_TEMP_SENS_READ_DATA3 
LTC_TEMP_SENS_SEND_CLOCK_STCOMM1 
LTC_TEMP_SENS_SEND_CLOCK_STCOMM2 
LTC_TEMP_SENS_READ_I2C_TRANSMISSION_RESULT_RDCOMM 
LTC_TEMP_SENS_SAVE_TEMP 
LTC_TEMP_SENS_FINISHED 

Definition at line 320 of file ltc_defs.h.

◆ LTC_STATEMACH_UNINITIALIZED_SUB_e

Substates for the uninitialized state

Enumerator
LTC_ENTRY_UNINITIALIZED 

Initialize-sequence

Definition at line 164 of file ltc_defs.h.

◆ LTC_STATEMACH_USER_IO_CONTROL_e

Substates for the user IO control state

Enumerator
LTC_USER_IO_SET_OUTPUT_REGISTER 
LTC_USER_IO_READ_INPUT_REGISTER 
LTC_USER_IO_SEND_CLOCK_STCOMM 
LTC_USER_IO_READ_I2C_TRANSMISSION_RESULT_RDCOMM 
LTC_USER_IO_SAVE_DATA 
LTC_USER_IO_FINISHED 

Definition at line 279 of file ltc_defs.h.

◆ LTC_STATEMACH_USER_IO_CONTROL_TI_e

Substates for the user IO control state, TI port expander

Enumerator
LTC_USER_IO_SET_DIRECTION_REGISTER_TI 
LTC_USER_IO_SET_OUTPUT_REGISTER_TI 
LTC_USER_IO_READ_INPUT_REGISTER_TI_FIRST 
LTC_USER_IO_READ_INPUT_REGISTER_TI_SECOND 
LTC_USER_IO_SEND_CLOCK_STCOMM_TI 
LTC_USER_IO_READ_I2C_TRANSMISSION_RESULT_RDCOMM_TI 
LTC_USER_IO_READ_I2C_TRANSMISSION_RESULT_RDCOMM_TI_SECOND 
LTC_USER_IO_READ_I2C_TRANSMISSION_RESULT_RDCOMM_TI_THIRD 
LTC_USER_IO_READ_I2C_TRANSMISSION_RESULT_RDCOMM_TI_FOURTH 
LTC_USER_IO_SAVE_DATA_TI 
LTC_USER_IO_FINISHED_TI 

Definition at line 289 of file ltc_defs.h.

◆ LTC_TASK_TYPE_e

Variable to define if the LTC should measure are restart the initialization sequence

Enumerator
LTC_HAS_TO_MEASURE 

measurement state of the LTC

LTC_HAS_TO_REINIT 

re-initialization state of the LTC

LTC_HAS_TO_MEASURE_2CELLS 

measurement state of the LTC

Definition at line 412 of file ltc_defs.h.