54 #ifndef FOXBMS__BMS_CFG_H_
55 #define FOXBMS__BMS_CFG_H_
65 #define BMS_REQ_ID_NOREQ (0u)
68 #define BMS_REQ_ID_STANDBY (3u)
71 #define BMS_REQ_ID_NORMAL (1u)
74 #define BMS_REQ_ID_CHARGE (2u)
79 #define BMS_NO_STRING_AVAILABLE (255u)
91 #define BMS_STATEMACHINE_TASK_CYCLE_CONTEXT_MS (10u)
93 #if BMS_STATEMACHINE_TASK_CYCLE_CONTEXT_MS != FTSK_TASK_CYCLIC_10MS_CYCLE_TIME
94 #error "Invalid BMS configuration. Make sure that BMS timing is configured correctly!"
101 #define BMS_STATEMACH_SHORTTIME (1u)
107 #define BMS_STATEMACH_MEDIUMTIME (5u)
113 #define BMS_STATEMACH_LONGTIME (10u)
116 #define BMS_TIME_WAIT_AFTER_STRING_CLOSED (20u)
119 #define BMS_TIME_WAIT_AFTER_OPENING_STRING (10u)
125 #define BMS_STRING_CLOSE_TIMEOUT (500u)
128 #define BMS_STRING_OPEN_TIMEOUT (1000u)
134 #define BMS_NEXT_STRING_VOLTAGE_LIMIT_MV (3000)
137 #define BMS_AVERAGE_STRING_CURRENT_LIMIT_MA (20000)
140 #define BMS_TIME_WAIT_AFTER_CLOSING_PRECHARGE (100u)
143 #define BMS_TIME_WAIT_AFTER_OPENING_PRECHARGE (50u)
149 #define BMS_TIME_WAIT_AFTERPRECHARGEFAIL (300u)
156 #define BMS_OSCILLATION_TIMEOUT (1000u)
159 #define BMS_PRECHARGE_TRIES (3u)
162 #define BMS_PRECHARGE_VOLTAGE_THRESHOLD_mV (1000LL)
165 #define BMS_PRECHARGE_CURRENT_THRESHOLD_mA (50)
171 #define BMS_STATEMACH_TIMEAFTERPRECHARGEFAIL (100u)
177 #define BMS_PRECHARGE_CLOSE_TIMEOUT (500u)
183 #define BMS_PRECHARGE_OPEN_TIMEOUT (500u)
Task configuration header.
General macros and definitions for the whole platform.