53 #ifndef FOXBMS__BMS_CFG_H_
54 #define FOXBMS__BMS_CFG_H_
64 #define BMS_REQ_ID_NOREQ (0u)
67 #define BMS_REQ_ID_STANDBY (3u)
70 #define BMS_REQ_ID_NORMAL (1u)
73 #define BMS_REQ_ID_CHARGE (2u)
78 #define BMS_NO_STRING_AVAILABLE (255u)
90 #define BMS_STATEMACHINE_TASK_CYCLE_CONTEXT_MS (10u)
92 #if BMS_STATEMACHINE_TASK_CYCLE_CONTEXT_MS != FTSK_TASK_CYCLIC_10MS_CYCLE_TIME
93 #error "Invalid BMS configuration. Make sure that BMS timing is configured correctly!"
100 #define BMS_STATEMACH_SHORTTIME (1u)
106 #define BMS_STATEMACH_MEDIUMTIME (5u)
112 #define BMS_STATEMACH_LONGTIME (10u)
118 #define BMS_STATEMACH_VERYLONGTIME (20u)
121 #define BMS_TIME_WAIT_AFTER_STRING_CLOSED (20u)
124 #define BMS_TIME_WAIT_AFTER_OPENING_STRING (10u)
130 #define BMS_STRING_CLOSE_TIMEOUT (500u)
133 #define BMS_STRING_OPEN_TIMEOUT (1000u)
139 #define BMS_NEXT_STRING_VOLTAGE_LIMIT_MV (3000)
142 #define BMS_AVERAGE_STRING_CURRENT_LIMIT_MA (20000)
145 #define BMS_TIME_WAIT_AFTER_CLOSING_PRECHARGE (100u)
148 #define BMS_TIME_WAIT_AFTER_OPENING_PRECHARGE (50u)
154 #define BMS_TIME_WAIT_AFTERPRECHARGEFAIL (300U)
161 #define BMS_OSCILLATION_TIMEOUT (1000u)
164 #define BMS_PRECHARGE_TRIES (3u)
167 #define BMS_PRECHARGE_VOLTAGE_THRESHOLD_mV (1000LL)
170 #define BMS_PRECHARGE_CURRENT_THRESHOLD_mA (50)
176 #define BMS_STATEMACH_TIMEAFTERPRECHARGEFAIL (100u)
182 #define BMS_PRECHARGE_CLOSE_TIMEOUT (500u)
188 #define BMS_PRECHARGE_OPEN_TIMEOUT (500u)
Task configuration header.
General macros and definitions for the whole platform.