119 .selfCheck.extractValueFromRegister =
STD_NOT_OK,
224 return firstMeasurementDone;
#define BS_NR_OF_STRINGS
Number of parallel strings in the battery pack.
@ DATA_BLOCK_ID_BALANCING_CONTROL
@ DATA_BLOCK_ID_CELL_TEMPERATURE_BASE
@ DATA_BLOCK_ID_OPEN_WIRE_BASE
@ DATA_BLOCK_ID_CELL_VOLTAGE_BASE
#define FAS_ASSERT(x)
Assertion macro that asserts that x is true.
General macros and definitions for the whole platform.
void MXM_41BStateMachine(MXM_41B_INSTANCE_s *pInstance)
Execute state-machine for the MAX17841B.
void MXM_41BInitializeStateStruct(MXM_41B_INSTANCE_s *pInstance)
Initializes the state struct with default values.
Headers for the driver for the MAX17841B ASCI and MAX1785x monitoring chip.
void MXM_CheckIfErrorCounterCanBeReset(MXM_MONITORING_INSTANCE_s *pInstance)
Function that checks if the error counter can be reset.
STD_RETURN_TYPE_e MXM_PreInitSelfCheck(MXM_MONITORING_INSTANCE_s *pState)
Execute all preinit selfchecks.
void MXM_ErrorHandlerReset(MXM_MONITORING_INSTANCE_s *pInstance, bool immediateReset)
This error handler is used as a last resort and tries a reset of the complete driver.
void MXM_StateMachine(MXM_MONITORING_INSTANCE_s *pInstance)
Main state-machine implementation.
void MXM_InitializeStateStruct(MXM_BALANCING_STATE_s *pBalancingInstance, MXM_MONITORING_INSTANCE_s *pMonitoringInstance)
Initializes the state structs with default values.
Headers for the driver for the MAX17841B ASCI and MAX1785x monitoring chip.
static void MXM_Tick(void)
Tick function.
STD_RETURN_TYPE_e AFE_RequestEepromRead(uint8_t string)
Makes the request to the AFE state machine to read from the external EEPROM on slaves.
STD_RETURN_TYPE_e AFE_RequestEepromWrite(uint8_t string)
Makes the request to the AFE state machine to write to the external EEPROM on slaves.
static DATA_BLOCK_CELL_VOLTAGE_s mxm_tableCellVoltages
Local cell voltage data block.
STD_RETURN_TYPE_e AFE_RequestIoRead(uint8_t string)
Makes the request to the AFE state machine to read from the IO port-expander.
STD_RETURN_TYPE_e AFE_TriggerIc(void)
STD_RETURN_TYPE_e AFE_RequestOpenWireCheck(uint8_t string)
Makes the request to the AFE state machine to perform open-wire check.
bool AFE_IsFirstMeasurementCycleFinished(void)
Checks if the first AFE measurement cycle was made.
STD_RETURN_TYPE_e AFE_RequestBalancingFeedbackRead(uint8_t string)
Makes the request to the AFE state machine to read balancing feedback from the slaves.
static DATA_BLOCK_BALANCING_CONTROL_s mxm_tableBalancingControl
Balancing control.
STD_RETURN_TYPE_e AFE_RequestTemperatureRead(uint8_t string)
Makes the request to the AFE state machine to read from the external temperature sensor on slaves.
static MXM_5X_INSTANCE_s mxm_5xState
static MXM_41B_INSTANCE_s mxm_41bState
static MXM_BALANCING_STATE_s mxm_balancingState
STD_RETURN_TYPE_e AFE_RequestIoWrite(uint8_t string)
Makes the request to the AFE state machine to write to the IO port-expander.
static void MXM_SetStateStructDefaultValues(void)
Initialize the state structs.
STD_RETURN_TYPE_e AFE_Initialize(void)
static DATA_BLOCK_CELL_TEMPERATURE_s mxm_tableCellTemperatures
Local cell temperature data block.
STD_RETURN_TYPE_e AFE_StartMeasurement(void)
Makes the initialization request to the AFE state machine.
static DATA_BLOCK_OPEN_WIRE_s mxm_tableOpenWire
Local data structure for openwire results.
static MXM_MONITORING_INSTANCE_s mxm_state
void MXM_5X_InitializeStateStruct(MXM_5X_INSTANCE_s *pInstance)
Initializes the state struct with default values.
void MXM_5XStateMachine(MXM_41B_INSTANCE_s *pInstance41b, MXM_5X_INSTANCE_s *pInstance5x)
Execute state-machine for Battery Management Protocol.
Headers for the driver for the MAX17841B ASCI and MAX1785x monitoring chip.
void MXM_InitializeMonitoringPins(void)
Initialize the pins connected to the MAX17841B.
#define MXM_MAXIMUM_INIT_TIME_ms
bool OS_CheckTimeHasPassed(uint32_t oldTimeStamp_ms, uint32_t timeToPass_ms)
This function checks if timeToPass has passed since the last timestamp to now.
Declaration of the OS wrapper interface.
void OS_ExitTaskCritical(void)
Exit Critical interface function for use in FreeRTOS-Tasks and FreeRTOS-ISR.
void OS_EnterTaskCritical(void)
Enter Critical interface function for use in FreeRTOS-Tasks and FreeRTOS-ISR.
DATA_BLOCK_HEADER_s header
DATA_BLOCK_HEADER_s header
DATA_BLOCK_HEADER_s header
DATA_BLOCK_HEADER_s header
Struct for the state-variable of state-machine.
5x statemachine structure
DATA_BLOCK_BALANCING_CONTROL_s *const pBalancingControl_table
MXM_41B_INSTANCE_s *const pInstance41B
MXM_BALANCING_STATE_s *const pBalancingState
MXM_STATEMACHINE_STATES_e state
bool firstMeasurementDone
MXM_5X_INSTANCE_s *const pInstance5X