56 #ifndef FOXBMS__DIAG_CFG_H_
57 #define FOXBMS__DIAG_CFG_H_
66 #define DIAG_ERROR_SENSITIVITY_FIRST_EVENT (0)
67 #define DIAG_ERROR_SENSITIVITY_THIRD_EVENT (2)
68 #define DIAG_ERROR_SENSITIVITY_FIFTH_EVENT (4)
69 #define DIAG_ERROR_SENSITIVITY_TENTH_EVENT (9)
71 #define DIAG_ERROR_SENSITIVITY_HIGH (0)
72 #define DIAG_ERROR_SENSITIVITY_MID (5)
73 #define DIAG_ERROR_SENSITIVITY_LOW (10)
75 #define DIAG_ERROR_INTERLOCK_SENSITIVITY (10)
77 #define DIAG_ERROR_VOLTAGE_SENSITIVITY_MSL (500)
78 #define DIAG_ERROR_VOLTAGE_SENSITIVITY_RSL (500)
79 #define DIAG_ERROR_VOLTAGE_SENSITIVITY_MOL (500)
82 #define DIAG_ERROR_TEMPERATURE_SENSITIVITY_MSL (500)
84 #define DIAG_ERROR_TEMPERATURE_SENSITIVITY_RSL (500)
86 #define DIAG_ERROR_TEMPERATURE_SENSITIVITY_MOL (500)
89 #define DIAG_ERROR_CURRENT_SENSITIVITY_MSL (500)
91 #define DIAG_ERROR_CURRENT_SENSITIVITY_RSL (500)
93 #define DIAG_ERROR_CURRENT_SENSITIVITY_MOL (500)
95 #define DIAG_ERROR_LTC_PEC_SENSITIVITY (5)
96 #define DIAG_ERROR_LTC_MUX_SENSITIVITY (5)
97 #define DIAG_ERROR_LTC_SPI_SENSITIVITY (5)
99 #define DIAG_ERROR_CAN_TIMING_SENSITIVITY (100)
100 #define DIAG_ERROR_CAN_TIMING_CC_SENSITIVITY (100)
101 #define DIAG_ERROR_CAN_SENSOR_SENSITIVITY (100)
104 #define DIAG_ERROR_CONTACTOR_FEEDBACK_SENSITIVITY (20)
107 #define DIAG_DELAY_DISCARDED (UINT32_MAX)
109 #define DIAG_NO_DELAY (0u)
111 #define DIAG_DELAY_INTERLOCK_ms (100u)
113 #define DIAG_DELAY_OVERVOLTAGE_ms (200u)
115 #define DIAG_DELAY_UNDERVOLTAGE_ms (200u)
117 #define DIAG_DELAY_TEMPERATURE_ms (1000u)
119 #define DIAG_DELAY_OVERCURRENT_ms (100u)
121 #define DIAG_DELAY_MIC_ms (100u)
123 #define DIAG_DELAY_CAN_TIMING_ms (200u)
125 #define DIAG_DELAY_EC_CC_TIMING_ms (2000u)
127 #define DIAG_DELAY_CURRENT_SENSOR_ms (200u)
129 #define DIAG_DELAY_SBC_ms (100u)
131 #define DIAG_DELAY_PL_PACK_VOLTAGE_ms (100u)
133 #define DIAG_DELAY_CONTACTOR_FEEDBACK_ms (100u)
135 #define DIAG_DELAY_DEEP_DISCHARGE_ms (100u)
137 #define DIAG_DELAY_REDUNDANCY_MEAS_TIMEOUT_ms (100u)
139 #define DIAG_DELAY_REDUNDANCY_MEAS_ERROR_ms (100u)
142 #define DIAG_MAX_ENTRIES_OF_ERROR (5)
256 #if CHECK_CAN_TIMING == true
257 #define DIAG_CAN_TIMING (DIAG_EVALUATION_ENABLED)
259 #define DIAG_CAN_TIMING (DIAG_EVALUATION_DISABLED)
267 #if CURRENT_SENSOR_PRESENT == true
268 #define DIAG_CAN_SENSOR_PRESENT (DIAG_EVALUATION_ENABLED)
270 #define DIAG_CAN_SENSOR_PRESENT (DIAG_EVALUATION_DISABLED)
Configuration of the battery system (e.g., number of battery modules, battery cells,...
Database configuration header.
void DIAG_CALLBACK_FUNCTION_f(DIAG_ID_e ch_id, DIAG_EVENT_e event, const DIAG_DATABASE_SHIM_s *const kpkDiagShim, uint32_t data)
function type for diag callbacks
enum DIAG_EVENT DIAG_EVENT_e
enum DIAG_SEVERITY_LEVEL DIAG_SEVERITY_LEVEL_e
@ DIAG_RECORDING_DISABLED
enum DIAG_IMPACT_LEVEL DIAG_IMPACT_LEVEL_e
struct DIAG_CH_CFG DIAG_ID_CFG_s
struct DIAG_DATABASE_SHIM DIAG_DATABASE_SHIM_s
DIAG_ID_CFG_s DIAG_ID_cfg[DIAG_ID_MAX]
@ DIAG_ID_TEMP_OVERTEMPERATURE_DISCHARGE_MSL
@ DIAG_ID_POWER_MEASUREMENT_ERROR
@ DIAG_ID_PACK_OVERCURRENT_CHARGE_MSL
@ DIAG_ID_OVERCURRENT_CHARGE_CELL_RSL
@ DIAG_ID_INSULATION_MEASUREMENT_INVALID
@ DIAG_ID_CAN_CC_RESPONDING
@ DIAG_ID_CURRENT_MEASUREMENT_TIMEOUT
@ DIAG_ID_CELLVOLTAGE_UNDERVOLTAGE_RSL
@ DIAG_ID_TEMP_UNDERTEMPERATURE_CHARGE_MSL
@ DIAG_ID_PLAUSIBILITY_CELL_TEMPERATURE_SPREAD
@ DIAG_ID_TEMP_OVERTEMPERATURE_DISCHARGE_RSL
@ DIAG_ID_STRING_OVERCURRENT_DISCHARGE_MOL
@ DIAG_ID_BASE_CELL_TEMPERATURE_MESUREMENT_TIMEOUT
@ DIAG_ID_STRING_OVERCURRENT_DISCHARGE_RSL
@ DIAG_ID_PLAUSIBILITY_CELL_VOLTAGE_SPREAD
@ DIAG_ID_TEMP_UNDERTEMPERATURE_DISCHARGE_RSL
@ DIAG_ID_PLAUSIBILITY_PACK_VOLTAGE
@ DIAG_ID_REDUNDANCY0_CELL_TEMPERATURE_MESUREMENT_TIMEOUT
@ DIAG_ID_CELLVOLTAGE_OVERVOLTAGE_MOL
@ DIAG_ID_STRING_OVERCURRENT_CHARGE_RSL
@ DIAG_ID_PLAUSIBILITY_CELL_VOLTAGE
@ DIAG_ID_PLAUSIBILITY_CELL_TEMP
@ DIAG_ID_OVERCURRENT_DISCHARGE_CELL_MSL
@ DIAG_ID_CELLVOLTAGE_OVERVOLTAGE_RSL
@ DIAG_ID_TEMP_UNDERTEMPERATURE_CHARGE_RSL
@ DIAG_ID_TEMP_OVERTEMPERATURE_DISCHARGE_MOL
@ DIAG_ID_STRING_OVERCURRENT_CHARGE_MSL
@ DIAG_ID_STRING_OVERCURRENT_CHARGE_MOL
@ DIAG_ID_TEMP_OVERTEMPERATURE_CHARGE_MSL
@ DIAG_ID_CURRENT_SENSOR_POWER_MEASUREMENT_TIMEOUT
@ DIAG_ID_INSULATION_GROUND_ERROR
@ DIAG_ID_TEMP_OVERTEMPERATURE_CHARGE_MOL
@ DIAG_ID_TEMP_UNDERTEMPERATURE_CHARGE_MOL
@ DIAG_ID_INSULATION_ERROR
@ DIAG_ID_STRING_CONTACTOR_FEEDBACK
@ DIAG_ID_PRECHARGE_CONTACTOR_FEEDBACK
@ DIAG_ID_PACK_OVERCURRENT_DISCHARGE_MSL
@ DIAG_ID_REDUNDANCY0_CELL_VOLTAGE_MESUREMENT_TIMEOUT
@ DIAG_ID_CURRENT_SENSOR_V1_MEASUREMENT_TIMEOUT
@ DIAG_ID_DEEP_DISCHARGE_DETECTED
@ DIAG_ID_CURRENT_SENSOR_V3_MEASUREMENT_TIMEOUT
@ DIAG_ID_TEMP_UNDERTEMPERATURE_DISCHARGE_MOL
@ DIAG_ID_BASE_CELL_VOLTAGE_MESUREMENT_TIMEOUT
@ DIAG_ID_MEASUREMENT_IC_CELL_VOLTAGE_MEAS_ERROR
@ DIAG_ID_CURRENT_ON_OPEN_STRING
@ DIAG_ID_STRING_OVERCURRENT_DISCHARGE_MSL
@ DIAG_ID_OVERCURRENT_CHARGE_CELL_MSL
@ DIAG_ID_OVERCURRENT_DISCHARGE_CELL_MOL
@ DIAG_ID_CURRENT_SENSOR_RESPONDING
@ DIAG_ID_CURRENT_MEASUREMENT_ERROR
@ DIAG_ID_CAN_RX_QUEUE_FULL
@ DIAG_ID_CELLVOLTAGE_UNDERVOLTAGE_MOL
@ DIAG_ID_OVERCURRENT_CHARGE_CELL_MOL
@ DIAG_ID_CAN_EC_RESPONDING
@ DIAG_ID_CELLVOLTAGE_OVERVOLTAGE_MSL
@ DIAG_ID_TEMP_OVERTEMPERATURE_CHARGE_RSL
@ DIAG_ID_MEASUREMENT_IC_CELL_TEMPERATURE_MEAS_ERROR
@ DIAG_ID_INTERLOCK_FEEDBACK
@ DIAG_ID_OVERCURRENT_DISCHARGE_CELL_RSL
@ DIAG_ID_CELLVOLTAGE_UNDERVOLTAGE_MSL
@ DIAG_ID_TEMP_UNDERTEMPERATURE_DISCHARGE_MSL
@ DIAG_ID_SYSTEMMONITORING
void DIAG_UpdateFlags(void)
update function for diagnosis flags
struct DIAG_DEV DIAG_DEV_s
@ DIAG_EVALUATION_ENABLED
@ DIAG_EVALUATION_DISABLED
enum DIAG_RECORDING DIAG_RECORDING_e
enum DIAG_EVALUATE DIAG_EVALUATE_e
const DIAG_DATABASE_SHIM_s diag_kDatabaseShim
General macros and definitions for the whole platform.
DIAG_RECORDING_e enable_recording
DIAG_CALLBACK_FUNCTION_f * fpCallback
DIAG_EVALUATE_e enable_evaluate
DIAG_SEVERITY_LEVEL_e severity
DATA_BLOCK_MSL_FLAG_s * pTableMsl
DATA_BLOCK_RSL_FLAG_s * pTableRsl
DATA_BLOCK_ERRORSTATE_s * pTableError
DATA_BLOCK_MOL_FLAG_s * pTableMol
DIAG_ID_CFG_s * pFatalErrorLinkTable[DIAG_ID_MAX]
uint16_t numberOfFatalErrors