60 #ifndef FOXBMS__BATTERY_SYSTEM_CFG_H_
61 #define FOXBMS__BATTERY_SYSTEM_CFG_H_
88 #define BS_POSITIVE_DISCHARGE_CURRENT (true)
99 #define BS_NR_OF_STRINGS (1u)
102 #if (BS_NR_OF_STRINGS > GEN_REPEAT_MAXIMUM_REPETITIONS)
103 #error "Too large number of strings, please check implementation of GEN_REPEAT_U()."
112 #define BS_NR_OF_MODULES_PER_STRING (1u)
122 #define BS_NR_OF_CELL_BLOCKS_PER_MODULE (18u)
131 #define BS_NR_OF_PARALLEL_CELLS_PER_MODULE (1u)
134 #define BS_BALANCING_RESISTANCE_ohm (100.0)
140 #define BS_NR_OF_GPIOS_PER_MODULE (10u)
146 #define BS_NR_OF_GPAS_PER_MODULE (2u)
152 #define BS_NR_OF_TEMP_SENSORS_PER_MODULE (8u)
154 #if BS_NR_OF_TEMP_SENSORS_PER_MODULE > BS_NR_OF_GPIOS_PER_MODULE
155 #error "Number of temperature inputs cannot be higher than number of GPIOs"
159 #define BS_NR_OF_CELL_BLOCKS_PER_STRING (BS_NR_OF_MODULES_PER_STRING * BS_NR_OF_CELL_BLOCKS_PER_MODULE)
161 #define BS_NR_OF_TEMP_SENSORS_PER_STRING (BS_NR_OF_MODULES_PER_STRING * BS_NR_OF_TEMP_SENSORS_PER_MODULE)
163 #define BS_NR_OF_TEMP_SENSORS (BS_NR_OF_TEMP_SENSORS_PER_STRING * BS_NR_OF_STRINGS)
172 #define BS_CURRENT_SENSOR_PRESENT (false)
174 #if BS_CURRENT_SENSOR_PRESENT == true
178 #define CURRENT_SENSOR_ISABELLENHUETTE_CYCLIC
182 #define BS_CURRENT_MEASUREMENT_RESPONSE_TIMEOUT_ms (200u)
185 #define BS_COULOMB_COUNTING_MEASUREMENT_RESPONSE_TIMEOUT_ms (2000u)
188 #define BS_ENERGY_COUNTING_MEASUREMENT_RESPONSE_TIMEOUT_ms (2000u)
202 #define BS_MAIN_CONTACTORS_MAXIMUM_BREAK_CURRENT_mA (500000)
212 #define BS_MAIN_FUSE_MAXIMUM_TRIGGER_DURATION_ms (30000u)
220 #define BS_MAXIMUM_STRING_CURRENT_mA (10000u)
228 #define BS_MAXIMUM_PACK_CURRENT_mA (10000u * BS_NR_OF_STRINGS)
235 #define BS_IGNORE_INTERLOCK_FEEDBACK (false)
243 #define BS_CHECK_CAN_TIMING (true)
251 #define BS_BALANCING_DEFAULT_INACTIVE (true)
258 #define BS_NR_OF_VOLTAGES_FROM_CURRENT_SENSOR (3u)
261 #define BS_NR_OF_CONTACTORS_OUTSIDE_STRINGS (1u)
266 #define BS_NR_OF_CONTACTORS ((2u * BS_NR_OF_STRINGS) + BS_NR_OF_CONTACTORS_OUTSIDE_STRINGS)
272 #define BS_REST_CURRENT_mA (200)
278 #define BS_RELAXATION_PERIOD_10ms (60000u)
284 #define BS_CS_THRESHOLD_NO_CURRENT_mA (200u)
297 #define BS_MAX_VOLTAGE_DROP_OVER_FUSE_mV (500)
310 #define BS_CHECK_FUSE_PLACED_IN_NORMAL_PATH (true)
323 #define BS_CHECK_FUSE_PLACED_IN_CHARGE_PATH (false)
336 #define BS_STANDBY_PERIODIC_OPEN_WIRE_CHECK (false)
339 #define BS_STANDBY_OPEN_WIRE_PERIOD_ms (600000)
342 #define BS_NORMAL_PERIODIC_OPEN_WIRE_CHECK (false)
345 #define BS_NORMAL_OPEN_WIRE_PERIOD_ms (600000)
348 #define BS_CHARGE_PERIODIC_OPEN_WIRE_CHECK (false)
351 #define BS_CHARGE_OPEN_WIRE_PERIOD_ms (600000)
354 #define BS_ERROR_OPEN_WIRE_PERIOD_ms (30000)
366 #ifdef UNITY_UNIT_TEST
FAS_STATIC_ASSERT((BS_NR_OF_STRINGS<=(uint8_t) UINT8_MAX), "This code assumes BS_NR_OF_STRINGS fits into uint8_t")
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
Assert macro implementation.
General macros and definitions for the whole platform.