54 #ifndef FOXBMS__BMS_CFG_H_
55 #define FOXBMS__BMS_CFG_H_
66 #define BMS_REQ_ID_NOREQ (0u)
69 #define BMS_REQ_ID_STANDBY (3u)
72 #define BMS_REQ_ID_NORMAL (1u)
75 #define BMS_REQ_ID_CHARGE (2u)
80 #define BMS_NO_STRING_AVAILABLE (255u)
92 #define BMS_STATEMACHINE_TASK_CYCLE_CONTEXT_MS (10u)
94 #if BMS_STATEMACHINE_TASK_CYCLE_CONTEXT_MS != FTSK_TASK_CYCLIC_10MS_CYCLE_TIME
95 #error "Invalid BMS configuration. Make sure that BMS timing is configured correctly!"
102 #define BMS_STATEMACH_SHORTTIME (1u)
108 #define BMS_STATEMACH_MEDIUMTIME (5u)
114 #define BMS_STATEMACH_LONGTIME (10u)
117 #define BMS_WAIT_TIME_AFTER_CLOSING_STRING_CONTACTOR (20u)
120 #define BMS_WAIT_TIME_AFTER_OPENING_STRING_CONTACTOR (10u)
123 #define BMS_WAIT_TIME_BETWEEN_CLOSING_STRINGS (10u)
129 #define BMS_STRING_CLOSE_TIMEOUT (500u)
135 #define BMS_STRING_OPEN_TIMEOUT (1000u)
141 #define BMS_NEXT_STRING_VOLTAGE_LIMIT_MV (3000)
144 #define BMS_AVERAGE_STRING_CURRENT_LIMIT_MA (20000)
147 #define BMS_TIME_WAIT_AFTER_CLOSING_PRECHARGE (100u)
150 #define BMS_TIME_WAIT_AFTER_OPENING_PRECHARGE (50u)
156 #define BMS_TIME_WAIT_AFTERPRECHARGEFAIL (300u)
163 #define BMS_OSCILLATION_TIMEOUT (1000u)
166 #define BMS_PRECHARGE_TRIES (3u)
169 #define BMS_PRECHARGE_VOLTAGE_THRESHOLD_mV (1000LL)
172 #define BMS_PRECHARGE_CURRENT_THRESHOLD_mA (50)
178 #define BMS_STATEMACH_TIMEAFTERPRECHARGEFAIL (100u)
184 #define BMS_PRECHARGE_CLOSE_TIMEOUT (500u)
190 #define BMS_PRECHARGE_OPEN_TIMEOUT (500u)
197 #ifdef UNITY_UNIT_TEST
Task configuration header.