60 #ifndef FOXBMS__BATTERY_SYSTEM_CFG_H_
61 #define FOXBMS__BATTERY_SYSTEM_CFG_H_
87 #define POSITIVE_DISCHARGE_CURRENT (true)
100 #define BS_NR_OF_STRINGS (1u)
103 #if (BS_NR_OF_STRINGS > REPEAT_MAXIMUM_REPETITIONS)
104 #error "Too large number of strings, please check implementation of REPEAT_U()."
114 #define BS_NR_OF_MODULES_PER_STRING (1u)
125 #define BS_NR_OF_CELL_BLOCKS_PER_MODULE (18u)
135 #define BS_NR_OF_PARALLEL_CELLS_PER_MODULE (1u)
137 #if BS_NR_OF_CELL_BLOCKS_PER_MODULE <= 12u
138 #define BS_MAX_SUPPORTED_CELLS (12u)
139 #elif BS_NR_OF_CELL_BLOCKS_PER_MODULE <= 15u
140 #define BS_MAX_SUPPORTED_CELLS (15u)
141 #elif BS_NR_OF_CELL_BLOCKS_PER_MODULE <= 16u
142 #define BS_MAX_SUPPORTED_CELLS (16u)
143 #elif BS_NR_OF_CELL_BLOCKS_PER_MODULE <= 18u
144 #define BS_MAX_SUPPORTED_CELLS (18u)
145 #elif BS_NR_OF_CELL_BLOCKS_PER_MODULE == 36u
146 #define BS_MAX_SUPPORTED_CELLS (36u)
148 #error "Unsupported number of cells per module, higher than 18 and not 36"
157 #define BS_BALANCING_RESISTANCE_ohm (100.0)
165 #if BS_MAX_SUPPORTED_CELLS == 12u
166 #define BS_NR_OF_GPIOS_PER_MODULE (5u)
168 #define BS_NR_OF_GPIOS_PER_MODULE (9u)
176 #define BS_NR_OF_TEMP_SENSORS_PER_MODULE (8u)
179 #define BS_NR_OF_CELL_BLOCKS_PER_STRING (BS_NR_OF_MODULES_PER_STRING * BS_NR_OF_CELL_BLOCKS_PER_MODULE)
181 #define BS_NR_OF_TEMP_SENSORS_PER_STRING (BS_NR_OF_MODULES_PER_STRING * BS_NR_OF_TEMP_SENSORS_PER_MODULE)
183 #define BS_NR_OF_TEMP_SENSORS (BS_NR_OF_TEMP_SENSORS_PER_STRING * BS_NR_OF_STRINGS)
186 #define BS_NR_OF_TEMP_SENSORS_ON_SADC0 (3u)
188 #define BS_NR_OF_TEMP_SENSORS_ON_SADC1 (3u)
197 #define CURRENT_SENSOR_PRESENT (false)
199 #if CURRENT_SENSOR_PRESENT == true
203 #define CURRENT_SENSOR_ISABELLENHUETTE_CYCLIC
207 #define BS_CURRENT_MEASUREMENT_RESPONSE_TIMEOUT_MS (200u)
210 #define BS_COULOMB_COUNTING_MEASUREMENT_RESPONSE_TIMEOUT_MS (2000u)
213 #define BS_ENERGY_COUNTING_MEASUREMENT_RESPONSE_TIMEOUT_MS (2000u)
223 #define BS_MAXIMUM_STRING_CURRENT_mA (10000u)
231 #define BS_MAXIMUM_PACK_CURRENT_mA (10000u * BS_NR_OF_STRINGS)
239 #define BS_IGNORE_INTERLOCK_FEEDBACK (false)
246 #define CHECK_CAN_TIMING (true)
253 #define BALANCING_DEFAULT_INACTIVE (true)
270 #define BMS_CHECK_SOF_CURRENT_LIMITS (true)
278 #define BMS_OPEN_CONTACTORS_ON_INSULATION_ERROR (false)
286 #define BS_NR_OF_VOLTAGES_FROM_CURRENT_SENSOR (3u)
293 #define BS_NR_OF_VOLTAGES_FROM_MCU_ADC (2)
296 #define BS_NR_OF_CONTACTORS_OUTSIDE_STRINGS (1U)
299 #define BS_NR_OF_CONTACTORS ((2U * BS_NR_OF_STRINGS) + BS_NR_OF_CONTACTORS_OUTSIDE_STRINGS)
305 #define BS_REST_CURRENT_mA (200)
311 #define BS_RELAXATION_PERIOD_10ms (60000u)
317 #define BS_CS_THRESHOLD_NO_CURRENT_mA (200u)
330 #define BS_MAX_VOLTAGE_DROP_OVER_FUSE_mV (500)
343 #define BS_CHECK_FUSE_PLACED_IN_NORMAL_PATH (true)
356 #define BS_CHECK_FUSE_PLACED_IN_CHARGE_PATH (false)
369 #define BS_STANDBY_PERIODIC_OPEN_WIRE_CHECK (false)
372 #define BS_STANDBY_OPEN_WIRE_PERIOD_ms (600000)
375 #define BS_NORMAL_PERIODIC_OPEN_WIRE_CHECK (false)
378 #define BS_NORMAL_OPEN_WIRE_PERIOD_ms (600000)
381 #define BS_CHARGE_PERIODIC_OPEN_WIRE_CHECK (false)
384 #define BS_CHARGE_OPEN_WIRE_PERIOD_ms (600000)
387 #define BS_ERROR_OPEN_WIRE_PERIOD_ms (30000)
BS_STRING_PRECHARGE_PRESENT_e bs_stringsWithPrecharge[BS_NR_OF_STRINGS]
#define BS_NR_OF_STRINGS
Number of parallel strings in the battery pack.
BS_STRING_PRECHARGE_PRESENT_e
@ BS_STRING_WITHOUT_PRECHARGE
@ BS_STRING_WITH_PRECHARGE
General macros and definitions for the whole platform.