55 #ifndef FOXBMS__LTC_DEFS_H_
56 #define FOXBMS__LTC_DEFS_H_
486 uint8_t activeStates[12];
583 uint8_t muxmeas_nr_end
585 uint8_t configuration[6];
#define BS_NR_OF_STRINGS
Number of parallel strings in the battery pack.
#define BS_NR_OF_CELL_BLOCKS_PER_STRING
Diagnostic module configuration header.
General macros and definitions for the whole platform.
Headers for the configuration for the LTC monitoring chip.
LTC_STATEMACH_INITIALIZATION_SUB_e
@ LTC_RE_ENTRY_INITIALIZATION
@ LTC_ENTRY_INITIALIZATION
@ LTC_READ_INITIALIZATION_REGISTER
@ LTC_START_INIT_INITIALIZATION
@ LTC_EXIT_INITIALIZATION
@ LTC_CHECK_INITIALIZATION
LTC_STATEMACH_USER_IO_CONTROL_e
@ LTC_USER_IO_READ_I2C_TRANSMISSION_RESULT_RDCOMM
@ LTC_USER_IO_SEND_CLOCK_STCOMM
@ LTC_USER_IO_READ_INPUT_REGISTER
@ LTC_USER_IO_SET_OUTPUT_REGISTER
@ LTC_STATEMACH_DEVICE_PARAMETER_REQUEST
@ LTC_STATEMACH_ADC_ACCURACY_REQUEST
@ LTC_STATE_EEPROM_READ_REQUEST
@ LTC_STATEMACH_DIGITAL_FILTER_REQUEST
@ LTC_STATE_READVOLTAGE_REQUEST
@ LTC_STATE_USER_IO_READ_REQUEST_TI
@ LTC_STATE_ALLGPIOMEASUREMENT_REQUEST
@ LTC_STATE_USER_IO_READ_REQUEST
@ LTC_STATE_EEPROM_WRITE_REQUEST
@ LTC_STATE_EEPROM_READ_UID_REQUEST
@ LTC_STATE_USER_IO_WRITE_REQUEST
@ LTC_STATE_USER_IO_WRITE_REQUEST_TI
@ LTC_STATE_REINIT_REQUEST
@ LTC_STATE_MUXMEASUREMENT_REQUEST
@ LTC_STATE_USER_IO_REQUEST
@ LTC_STATE_OPENWIRE_CHECK_REQUEST
@ LTC_STATE_VOLTAGEMEASUREMENT_SC_REQUEST
@ LTC_STATE_BALANCECONTROL_REQUEST
@ LTC_STATE_VOLTAGEMEASUREMENT_REQUEST
@ LTC_STATE_VOLTAGEMEASUREMENT_2CELLS_REQUEST
@ LTC_STATE_BALANCEFEEDBACK_REQUEST
@ LTC_STATE_READVOLTAGE_2CELLS_REQUEST
@ LTC_STATE_TEMP_SENS_READ_REQUEST
@ LTC_STATEMACH_BALANCEFEEDBACK_REQUEST
LTC_STATEMACH_DIAGNOSIS_SUB_e
@ LTC_REDUNDANCY_READ_STATUS_REGISTER_B
@ LTC_DEVICE_PARAMETER_READ_STATUS_REGISTER_A
@ LTC_EXIT_DEVICE_PARAMETER
@ LTC_REQUEST_REDUNDANCY_CHECK
@ LTC_DEVICE_PARAMETER_READ_STATUS_REGISTER_B
@ LTC_REDUNDANCY_READ_STATUS_REGISTER_A
@ LTC_REQUEST_DEVICE_PARAMETER
LTC_STATEMACH_READALLGPIO_SUB_e
@ LTC_READ_AUXILIARY_REGISTER_C_RAUXC_READALLGPIO
@ LTC_READ_AUXILIARY_REGISTER_A_RAUXA_READALLGPIO
@ LTC_READ_AUXILIARY_REGISTER_D_RAUXD_READALLGPIO
@ LTC_READ_AUXILIARY_REGISTER_B_RAUXB_READALLGPIO
LTC_STATEMACH_UNINITIALIZED_SUB_e
@ LTC_ENTRY_UNINITIALIZED
@ LTC_STATEMACH_INITIALIZATION
@ LTC_STATEMACH_USER_IO_FEEDBACK
@ LTC_STATEMACH_UNINITIALIZED
@ LTC_STATEMACH_MUXMEASUREMENT
@ LTC_STATEMACH_ERROR_INITIALIZATION
@ LTC_STATEMACH_ERROR_MUXFAILED
@ LTC_STATEMACH_TEMP_SENS_READ
@ LTC_STATEMACH_BALANCECONTROL
@ LTC_STATEMACH_ERROR_PECFAILED
@ LTC_STATEMACH_EEPROM_WRITE
@ LTC_STATEMACH_EEPROM_READ
@ LTC_STATEMACH_READVOLTAGE_2CELLS
@ LTC_STATEMACH_USER_IO_FEEDBACK_TI
@ LTC_STATEMACH_STARTMEAS_CONTINUE
@ LTC_STATEMACH_MUXMEASUREMENT_FINISHED
@ LTC_STATEMACH_READALLGPIO
@ LTC_STATEMACH_OPENWIRE_CHECK
@ LTC_STATEMACH_USER_IO_CONTROL_TI
@ LTC_STATEMACH_UNDEFINED
@ LTC_STATEMACH_USER_IO_CONTROL
@ LTC_STATEMACH_EEPROM_READ_UID
@ LTC_STATEMACH_READVOLTAGE
@ LTC_STATEMACH_BALANCEFEEDBACK
@ LTC_STATEMACH_INITIALIZED
@ LTC_STATEMACH_STARTMEAS_2CELLS
@ LTC_STATEMACH_DEVICE_PARAMETER
@ LTC_STATEMACH_RESERVED1
@ LTC_STATEMACH_DIGITAL_FILTER
@ LTC_STATEMACH_STARTMEAS
@ LTC_STATEMACH_MEASCYCLE_FINISHED
@ LTC_STATEMACH_ALLGPIOMEASUREMENT
@ LTC_STATEMACH_ADC_ACCURACY
@ LTC_STATEMACH_ERROR_SPIFAILED
@ LTC_STATEMACH_VOLTMEAS_SUMOFCELLS
LTC_STATEMACH_BALANCECONTROL_SUB_e
@ LTC_STATEMACH_READMUXMEASUREMENT
@ LTC_EXIT_BALANCECONTROL
@ LTC_STATEMACH_STARTMUXMEASUREMENT
@ LTC_CONFIG_BALANCECONTROL
@ LTC_REQUEST_FEEDBACK_BALANCECONTROL
@ LTC_SAVE_FEEDBACK_BALANCECONTROL
@ LTC_STATEMACH_MUXCONFIGURATION_INIT
@ LTC_CONFIG2_BALANCECONTROL_END
@ LTC_READ_FEEDBACK_BALANCECONTROL
@ LTC_CONFIG2_BALANCECONTROL
@ LTC_STATEMACH_STOREMUXMEASUREMENT
@ LTC_STATEMACH_MUXMEASUREMENT_CONFIG
LTC_STATEMACH_EEPROM_READ_UID_e
@ LTC_EEPROM_SEND_CLOCK_STCOMM4
@ LTC_EEPROM_SEND_CLOCK_STCOMM2
@ LTC_EEPROM_READ_I2C_TRANSMISSION_RESULT_RDCOMM
@ LTC_EEPROM_SEND_CLOCK_STCOMM3
@ LTC_EEPROM_SET_READ_ADDRESS
@ LTC_EEPROM_SEND_CLOCK_STCOMM1
LTC_STATEMACH_OPENWIRECHECK_SUB_e
@ LTC_REQUEST_PULLDOWN_CURRENT_OPENWIRE_CHECK
@ LTC_READ_VOLTAGES_PULLDOWN_OPENWIRE_CHECK
@ LTC_READ_VOLTAGES_PULLUP_OPENWIRE_CHECK
@ LTC_REQUEST_PULLUP_CURRENT_OPENWIRE_CHECK
@ LTC_PERFORM_OPENWIRE_CHECK
@ LTC_ADCMEAS_SINGLECHANNEL_GPIO5
@ LTC_ADCMEAS_SINGLECHANNEL_GPIO2
@ LTC_ADCMEAS_SINGLECHANNEL_GPIO4
@ LTC_ADCMEAS_SINGLECHANNEL_GPIO1
@ LTC_ADCMEAS_SINGLECHANNEL_GPIO3
@ LTC_ADCMEAS_ALLCHANNEL_SC
@ LTC_ADCMEAS_SINGLECHANNEL_TWOCELLS
@ LTC_ADCMEAS_ALLCHANNEL_GPIOS
@ LTC_ADCMEAS_ALLCHANNEL_CELLS
LTC_STATEMACH_USER_IO_CONTROL_TI_e
@ LTC_USER_IO_FINISHED_TI
@ LTC_USER_IO_SET_OUTPUT_REGISTER_TI
@ LTC_USER_IO_READ_I2C_TRANSMISSION_RESULT_RDCOMM_TI
@ LTC_USER_IO_SET_DIRECTION_REGISTER_TI
@ LTC_USER_IO_READ_INPUT_REGISTER_TI_FIRST
@ LTC_USER_IO_READ_I2C_TRANSMISSION_RESULT_RDCOMM_TI_SECOND
@ LTC_USER_IO_READ_I2C_TRANSMISSION_RESULT_RDCOMM_TI_THIRD
@ LTC_USER_IO_SAVE_DATA_TI
@ LTC_USER_IO_READ_INPUT_REGISTER_TI_SECOND
@ LTC_USER_IO_READ_I2C_TRANSMISSION_RESULT_RDCOMM_TI_FOURTH
@ LTC_USER_IO_SEND_CLOCK_STCOMM_TI
@ LTC_HAS_TO_MEASURE_2CELLS
LTC_PORT_EXPANDER_TI_DIRECTION_e
@ LTC_PORT_EXPANDER_TI_OUTPUT
@ LTC_PORT_EXPANDER_TI_INPUT
@ LTC_ALREADY_INITIALIZED
LTC_STATEMACH_TEMP_SENS_READ_e
@ LTC_TEMP_SENS_READ_I2C_TRANSMISSION_RESULT_RDCOMM
@ LTC_TEMP_SENS_SEND_CLOCK_STCOMM1
@ LTC_TEMP_SENS_SEND_CLOCK_STCOMM2
@ LTC_TEMP_SENS_READ_DATA3
@ LTC_TEMP_SENS_SAVE_TEMP
@ LTC_TEMP_SENS_SEND_DATA1
@ LTC_TEMP_SENS_READ_DATA1
LTC_STATEMACH_MUXMEASUREMENT_CONFIG_SUB_e
@ LTC_READ_I2C_TRANSMISSION_RESULT_RDCOMM_MUXMEASUREMENT_CONFIG
@ LTC_SEND_CLOCK_STCOMM_DIRECTION_CONFIG
@ LTC_SET_MUX_CHANNEL_WRCOMM_MUXMEASUREMENT_CONFIG
@ LTC_READ_I2C_TRANSMISSION_CHECK_MUXMEASUREMENT_CONFIG
@ LTC_START_GPIO_MEASUREMENT_MUXMEASUREMENT_CONFIG
@ LTC_SEND_CLOCK_STCOMM_MUXMEASUREMENT_CONFIG
@ LTC_SEND_CLOCK_STCOMM_WRITE_IO
LTC_STATEMACH_READVOLTAGE_SUB_e
@ LTC_READ_AUXILIARY_REGISTER_D_RDAUXD
@ LTC_READ_VOLTAGE_REGISTER_F_RDCVF_READVOLTAGE
@ LTC_READ_AUXILIARY_REGISTER_A_RDAUXA
@ LTC_READ_VOLTAGE_REGISTER_A_RDCVA_READVOLTAGE
@ LTC_READ_VOLTAGE_REGISTER_D_RDCVD_READVOLTAGE
@ LTC_READ_VOLTAGE_REGISTER_G_RDCVG_READVOLTAGE
@ LTC_READ_VOLTAGE_REGISTER_I_RDCVI_READVOLTAGE
@ LTC_READ_AUXILIARY_REGISTER_C_RDAUXC
@ LTC_EXIT_READAUXILIARY_ALLGPIOS
@ LTC_READ_AUXILIARY_REGISTER_B_RDAUXB
@ LTC_READ_VOLTAGE_REGISTER_B_RDCVB_READVOLTAGE
@ LTC_READ_VOLTAGE_REGISTER_H_RDCVH_READVOLTAGE
@ LTC_READ_VOLTAGE_REGISTER_E_RDCVE_READVOLTAGE
@ LTC_READ_VOLTAGE_REGISTER_C_RDCVC_READVOLTAGE
LTC_STATEMACH_ADC_ACCURACY_CHECK_SUB_e
@ LTC_READ_ADC2_VERIFICATION_VALUE
@ LTC_SAVE_ADC1_VERIFICATION_VALUE
@ LTC_EXIT_ADC_ACCURACY_CHECK
@ LTC_REQUEST_ADC2_VERIFICATION
@ LTC_READ_ADC1_VERIFICATION_VALUE
@ LTC_REQUEST_ADC1_VERIFICATION
LTC_STATEMACH_READVOLTAGE_SC_SUB_e
@ LTC_VOLTMEAS_SC_TRIGGER_CONVERSION
@ LTC_VOLTMEAS_SC_READ_SC
LTC_STATEMACH_DIGITAL_FILTER_SUB_e
@ LTC_REQUEST_DIGITAL_FILTER_CHECK_CELL_VOLTAGES
@ LTC_EXIT_DIGITAL_FILTER_CHECK
@ LTC_DIGITAL_FILTER_READ_STATUS_REGISTER_A_2
@ LTC_DIGITAL_FILTER_SELF_TEST_1_STATUS
@ LTC_DIGITAL_FILTER_READ_STATUS_REGISTER_B_2
@ LTC_DIGITAL_FILTER_SELF_TEST_1_CELL_VOLTAGES
@ LTC_REQUEST_CLEAR_CELL_VOLTAGES
@ LTC_DIGITAL_FILTER_READ_STATUS_REGISTER_B
@ LTC_REQUEST_CLEAR_STATUS_REGISTER
@ LTC_DIGITAL_FILTER_SELF_TEST_2_CELL_VOLTAGES
@ LTC_DIGITAL_FILTER_SELF_TEST_1_AUX
@ LTC_DIGITAL_FILTER_SELF_TEST_2_STATUS
@ LTC_DIGITAL_FILTER_READ_STATUS_REGISTER_A
@ LTC_DIGITAL_FILTER_SELF_TEST_2_AUX
@ LTC_REQUEST_CLEAR_AUX_REGISTER
@ LTC_REUSE_READVOLT_FOR_ADOW_PUP
@ LTC_REUSE_READVOLT_FOR_ADOW_PDOWN
LTC_STATEMACH_INITIALIZED_SUB_e
@ LTC_ADCMODE_FILTERED_DCP1
@ LTC_ADCMODE_NORMAL_DCP0
@ LTC_ADCMODE_FILTERED_DCP0
@ LTC_ADCMODE_NORMAL_DCP1
LTC_STATEMACH_MUXMEASUREMENT_SUB_e
@ LTC_READ_AUXILIARY_REGISTER_A_RAUXA_MUXMEASUREMENT
@ LTC_SAVE_MUX_MEASUREMENT_MUXMEASUREMENT
Headers for the driver for the SPI module.
LTC_STATE_REQUEST_e balancing
LTC_STATE_REQUEST_e digitalFilterCheck
uint8_t numberActiveOfStates
LTC_STATE_REQUEST_e measAllGPIO
LTC_STATE_REQUEST_e measVoltage2Cells
LTC_STATE_REQUEST_e measVoltageSumofCells
LTC_STATE_REQUEST_e measTemperature
LTC_STATE_REQUEST_e measVoltage
LTC_STATE_REQUEST_e deviceParameterCheck
LTC_STATE_REQUEST_e readEEPROM
LTC_STATE_REQUEST_e openWireCheck
LTC_STATE_REQUEST_e accuracyADCverification
LTC_STATE_REQUEST_e userIO
LTC_STATE_REQUEST_e balancing_feedback
LTC_STATE_REQUEST_e measMux
LTC_OPENWIRE_DETECTION_s * openWireDetection
DATA_BLOCK_ALL_GPIO_VOLTAGES_s * allGpioVoltages
DATA_BLOCK_CELL_VOLTAGE_s * cellVoltage
DATA_BLOCK_CELL_TEMPERATURE_s * cellTemperature
LTC_ERRORTABLE_s * errorTable
DATA_BLOCK_USER_MUX_s * user_mux
DATA_BLOCK_BALANCING_FEEDBACK_s * balancingFeedback
SPI_INTERFACE_CONFIG_s * pSpiInterface
DATA_BLOCK_SLAVE_CONTROL_s * slaveControl
DATA_BLOCK_OPEN_WIRE_s * openWire
DATA_BLOCK_BALANCING_CONTROL_s * balancingControl
uint16_t * valid_GPIOPECs
uint32_t nrOfConsecutiveErrors
LTC_MUX_CH_CFG_s * seqptr
LTC_STATE_REQUEST_e request
uint32_t commandDataTransferTime
DIAG_ID_e voltMeasDiagErrorEntry
DIAG_ID_e pecDiagErrorEntry
DIAG_ID_e muxDiagErrorEntry
DIAG_ID_e tempMeasDiagErrorEntry
SPI_INTERFACE_CONFIG_s * spiSeqPtr
uint32_t commandTransferTime
SPI_INTERFACE_CONFIG_s * spiSeqEndPtr
LTC_ADCMODE_e gpioMeasMode
LTC_ADCMODE_e voltMeasMode
LTC_STATEMACH_e laststate
LTC_ADCMEAS_CHAN_e adcMeasCh
LTC_REUSE_MODE_e reusageMeasurementMode
uint8_t numberOfMeasuredMux
uint32_t gpioClocksTransferTime
uint8_t resendCommandCounter
DIAG_ID_e spiDiagErrorEntry
uint8_t spiNumberInterfaces
uint8_t nrBatcellsPerModule
uint32_t ErrRequestCounter
STD_RETURN_TYPE_e balance_control_done
STD_RETURN_TYPE_e dummyByte_ongoing
STD_RETURN_TYPE_e check_spi_flag
bool first_measurement_made
LTC_ADCMEAS_CHAN_e adcMeasChreq
STD_RETURN_TYPE_e ltc_muxcycle_finished
uint32_t VoltageSampleTime