|
foxBMS
1.0.0
The foxBMS Battery Management System API Documentation
|
Go to the documentation of this file.
54 #ifndef FOXBMS__LTC_6806_CFG_H_
55 #define FOXBMS__LTC_6806_CFG_H_
74 #define SLAVE_BOARD_VERSION (2)
80 #define LTC_PORTEXPANDER_VERSION (1)
85 #define LTC_PORTEXPANDER_ADR_TI (0)
88 #define LTC_DISCARD_PEC (false)
91 #define LTC_N_MUX_PER_LTC (3)
94 #define LTC_N_MUX_CHANNELS_PER_MUX (8)
97 #define LTC_NUMBER_OF_MUX_MEASUREMENTS_PER_CYCLE (8)
100 #define LTC_N_MUX_CHANNELS_PER_LTC (LTC_N_MUX_PER_LTC * LTC_N_MUX_CHANNELS_PER_MUX)
103 #define LTC_NUMBER_OF_LTC_PER_MODULE (1u)
110 #define LTC_HIRNG (0u)
113 #define LTC_FUEL_CELL_ADOW_TIME_MS (100U + 1U)
116 #define LTC_ADOW_THRESHOLD (-200)
124 #define LTC_VOLTAGE_MEASUREMENT_MODE (LTC_ADCMODE_NORMAL_DCP0)
132 #define LTC_GPIO_MEASUREMENT_MODE (LTC_ADCMODE_NORMAL_DCP0)
139 #define LTC_OW_MEASUREMENT_MODE (LTC_ADCMODE_NORMAL_DCP0)
145 #define LTC_TRANSMISSION_TIMEOUT (10)
151 #define LTC_SPI_HANDLE &spi_devices[0]
152 #define LTC_SPI_INSTANCE *LTC_SPI_HANDLE.Instance
153 #define LTC_SPI_PRESCALER *LTC_SPI_HANDLE.Init.BaudRatePrescaler
157 #define LTC_TWAKE_US (300)
159 #define LTC_TREADY_US (10)
161 #define LTC_TIDLE_US (6700)
164 #define LTC_SPI_WAKEUP_WAIT_TIME_US (30U)
167 #define LTC_FUELCELL_NORMAL_ALL_CELLS_MS (11)
170 #define LTC_STATEMACH_SHORTTIME (1)
176 #define LTC_STATEMACH_DAISY_CHAIN_FIRST_INITIALIZATION_TIME ((LTC_TWAKE_US * LTC_N_LTC) / 1000)
181 #define LTC_STATEMACH_DAISY_CHAIN_SECOND_INITIALIZATION_TIME ((LTC_TREADY_US * LTC_N_LTC) / 1000)
191 #define LTC_STATEMACH_MEAS_ALL_FAST_TCYCLE (2)
197 #define LTC_STATEMACH_MEAS_ALL_NORMAL_TCYCLE (3)
203 #define LTC_STATEMACH_MEAS_ALL_FILTERED_TCYCLE (202)
213 #define LTC_STATEMACH_MEAS_SINGLE_FAST_TCYCLE (1)
219 #define LTC_STATEMACH_MEAS_SINGLE_NORMAL_TCYCLE (1)
225 #define LTC_STATEMACH_MEAS_SINGLE_FILTERED_TCYCLE (35)
228 #define LTC_STATEMACH_SEQERRTTIME (5)
230 #define LTC_STATEMACH_PECERRTIME (1)
236 #define LTC_TRANSMIT_PECERRLIMIT (10)
242 #define LTC_TRANSMIT_SPIERRLIMIT (3)
245 #define LTC_READCOM (0)
255 #define LTC_STANDBY_PERIODIC_OPEN_WIRE_CHECK (false)
258 #define LTC_STANDBY_OPEN_WIRE_PERIOD_ms (600000)
261 #define LTC_NORMAL_PERIODIC_OPEN_WIRE_CHECK (false)
264 #define LTC_NORMAL_OPEN_WIRE_PERIOD_ms (600000)
267 #define LTC_CHARGE_PERIODIC_OPEN_WIRE_CHECK (false)
270 #define LTC_CHARGE_OPEN_WIRE_PERIOD_ms (600000)
273 #define LTC_ERROR_OPEN_WIRE_PERIOD_ms (30000)
289 #define LTC_NMBR_REQ_ADOW_COMMANDS (2)
295 #define LTC_TransmitWakeUp(spi_ltcInterface) SPI_TransmitDummyByte(spi_ltcInterface, LTC_SPI_WAKEUP_WAIT_TIME_US)
296 #define LTC_TransmitI2cCommand(spi_ltcInterface, txbuf) \
297 SPI_TransmitDataWithDummy(spi_ltcInterface, LTC_SPI_WAKEUP_WAIT_TIME_US, txbuf, 4 + 9)
298 #define LTC_TransmitCommand(spi_ltcInterface, command) \
299 SPI_TransmitDataWithDummy(spi_ltcInterface, LTC_SPI_WAKEUP_WAIT_TIME_US, command, 4)
300 #define LTC_TransmitReceiveData(spi_ltcInterface, txbuf, rxbuf, length) \
301 SPI_TransmitReceiveDataWithDummyDma(spi_ltcInterface, LTC_SPI_WAKEUP_WAIT_TIME_US, txbuf, rxbuf, length)
const uint8_t ltc_muxsensortemperatur_cfg[BS_NR_OF_TEMP_SENSORS_PER_MODULE]
Headers for the driver for the SPI module.
#define BS_NR_OF_TEMP_SENSORS_PER_MODULE
number of temperature sensors per battery module
int16_t LTC_Convert_MuxVoltages_to_Temperatures(uint16_t adcVoltage_mV)
converts a raw voltage from multiplexer to a temperature value in deci °C.
Configuration of the battery system (e.g., number of battery modules, battery cells,...
Headers for the driver for the LTC monitoring chip.
Headers for the configuration for the LTC monitoring chip.
Headers for the driver for the DMA module for the LTC.
const uint8_t ltc_voltage_input_used[BS_MAX_SUPPORTED_CELLS]
#define BS_MAX_SUPPORTED_CELLS
Defines the maximal number of supported cells per module.