90 #define TASK_10MS_COUNTER_FOR_50MS (5u)
93 #define TASK_100MS_COUNTER_FOR_1S (10u)
153 if (retval == E_NOT_OK) {
166 if (retval == E_NOT_OK) {
227 static uint8_t ftsk_cyclic10msCounter = 0;
244 ftsk_cyclic10msCounter = 0;
246 ftsk_cyclic10msCounter++;
251 static uint8_t ftsk_cyclic100msCounter = 0;
259 ftsk_cyclic100msCounter = 0;
266 ftsk_cyclic100msCounter++;
271 static uint8_t ftsk_cyclicAlgorithm100msCounter = 0;
275 ftsk_cyclicAlgorithm100msCounter++;
void ADC_Control(void)
controls ADC measurement sequence.
Headers for the driver for the ADC module.
void ALGO_MainFunction(void)
handles the call of different algorithm functions when cycle time has expired
void ALGO_MonitorExecutionTime(void)
monitors the calculation duration of the different algorithms
Headers for the driver for the storage in the EEPROM memory.
Header for the driver for balancing.
void BAL_Trigger(void)
trigger function for the BAL driver state machine.
void BMS_Trigger(void)
trigger function for the SYS driver state machine.
void CAN_MainFunction(void)
Calls the functions to drive the CAN interface. Makes the CAN timing checks and sends the periodic me...
void CAN_ReadRxBuffer(void)
Checks the data received per CAN. A receive buffer is used because CAN frames are received in an inte...
Header for the driver for the CAN module.
void DATA_Task(void)
trigger of database manager
STD_RETURN_TYPE_e DATA_Initialize(void)
Initialization of database manager.
void DIAG_UpdateFlags(void)
update function for diagnosis flags
Headers for the driver for the DMA module.
#define FAS_ASSERT(x)
Assertion macro that asserts that x is true.
#define FAS_TRAP
Define that evaluates to essential boolean false thus tripping an assert.
void FRAM_Initialize(void)
Initializes the addresses to be written in the FRAM.
Header for the driver for the FRAM module.
OS_TASK_DEFINITION_s ftsk_taskDefinitionAfe
Task configuration of the continuously running task for AFEs.
OS_TASK_DEFINITION_s ftsk_taskDefinitionCyclic100ms
Task configuration of the cyclic 100 ms task.
void FTSK_RunUserCodeAfe(void)
Continuously running task for AFEs.
void FTSK_InitializeUserCodeEngine(void)
Initializes the database.
void FTSK_RunUserCodeEngine(void)
Engine task for the database and the system monitoring module.
OS_TASK_DEFINITION_s ftsk_taskDefinitionEngine
Definition of the engine task.
OS_TASK_DEFINITION_s ftsk_taskDefinitionCyclic1ms
Task configuration of the cyclic 1 ms task.
#define TASK_100MS_COUNTER_FOR_1S
void FTSK_RunUserCodeIdle(void)
Idle task.
OS_TASK_DEFINITION_s ftsk_taskDefinitionCyclicAlgorithm100ms
Task configuration of the cyclic 100 ms task for algorithms.
void FTSK_RunUserCodeCyclic100ms(void)
Cyclic 100 ms task.
void FTSK_InitializeUserCodePreCyclicTasks(void)
Initialization function before all tasks started.
void FTSK_RunUserCodeCyclic10ms(void)
Cyclic 10 ms task.
#define TASK_10MS_COUNTER_FOR_50MS
void FTSK_RunUserCodeCyclic1ms(void)
Cyclic 1 ms task.
OS_TASK_DEFINITION_s ftsk_taskDefinitionCyclic10ms
Task configuration of the cyclic 10 ms task.
void FTSK_RunUserCodeCyclicAlgorithm100ms(void)
Cyclic 100 ms task for algorithms.
Task configuration header.
#define FTSK_TASK_CYCLIC_1MS_STACK_SIZE_IN_BYTES
Stack size of cyclic 1 ms task.
#define FTSK_TASK_CYCLIC_10MS_PRIORITY
Priority of cyclic 10 ms task.
#define FTSK_TASK_ENGINE_STACK_SIZE_IN_BYTES
Stack size of engine task.
#define FTSK_TASK_CYCLIC_1MS_PRIORITY
Priority of cyclic 1ms task.
#define FTSK_TASK_CYCLIC_100MS_STACK_SIZE_IN_BYTES
Stack size of cyclic 100 ms task.
#define FTSK_TASK_CYCLIC_10MS_PV_PARAMETERS
pvParameters of the 10ms task
#define FTSK_TASK_CYCLIC_1MS_CYCLE_TIME
Cycle time of 1ms task.
#define FTSK_TASK_AFE_STACK_SIZE_IN_BYTES
Stack size of continuously running task for AFEs.
#define FTSK_TASK_CYCLIC_10MS_STACK_SIZE_IN_BYTES
Stack size of cyclic 10 ms task.
#define FTSK_TASK_ENGINE_CYCLE_TIME
Cycle time of engine task.
#define FTSK_TASK_CYCLIC_ALGORITHM_100MS_PRIORITY
Priority of cyclic 100 ms task for algorithms.
#define FTSK_TASK_CYCLIC_ALGORITHM_100MS_CYCLE_TIME
Cycle time of 100ms task for algorithms.
#define FTSK_TASK_CYCLIC_100MS_PV_PARAMETERS
pvParameters of the 100ms task
#define FTSK_TASK_CYCLIC_10MS_CYCLE_TIME
Cycle time of 10 ms task.
TaskHandle_t ftsk_taskHandleAfe
Definition of task handles.
#define FTSK_TASK_CYCLIC_ALGORITHM_100MS_PV_PARAMETERS
pvParameters of the 100ms task for algorithms
#define FTSK_TASK_ENGINE_PRIORITY
Phase of engine task.
#define FTSK_TASK_CYCLIC_100MS_PRIORITY
Priority of cyclic 100 ms task.
#define FTSK_TASK_AFE_CYCLE_TIME
Cycle time of continuously running task for AFEs.
#define FTSK_TASK_AFE_PHASE
Phase of continuously running task for AFEs.
#define FTSK_TASK_ENGINE_PV_PARAMETERS
pvParameters of the engine task
#define FTSK_TASK_CYCLIC_1MS_PV_PARAMETERS
pvParameters of the 1ms task
#define FTSK_TASK_CYCLIC_100MS_CYCLE_TIME
Cycle time of 100ms task.
#define FTSK_TASK_AFE_PV_PARAMETERS
pvParameters of the continuously running task for AFEs
#define FTSK_TASK_CYCLIC_100MS_PHASE
Phase of cyclic 100 ms task.
#define FTSK_TASK_CYCLIC_ALGORITHM_100MS_PHASE
Phase of cyclic 100 ms task for algorithms.
#define FTSK_TASK_CYCLIC_1MS_PHASE
Phase of cyclic 1ms task.
#define FTSK_TASK_CYCLIC_ALGORITHM_100MS_STACK_SIZE_IN_BYTES
Stack size of cyclic 100 ms task for algorithms.
#define FTSK_TASK_AFE_PRIORITY
Priority of continuously running task for AFEs.
#define FTSK_TASK_CYCLIC_10MS_PHASE
Phase of cyclic 10 ms task.
#define FTSK_TASK_ENGINE_PHASE
Phase of engine task.
void HTSEN_Trigger(void)
triggers a measurement of the I2C humidity/temperature sensor.
Header for the driver for the Sensirion SHT35-DIS I2C humidity/temperature sensor.
Header for the driver for the I2C module.
STD_RETURN_TYPE_e IMD_Trigger(void)
trigger function for the IMD driver state machine.
API header for the insulation monitoring device.
void ILCK_Trigger(void)
trigger function for the ILCK driver state machine.
Headers for the driver for the interlock.
void LED_SetToggleTime(uint32_t onOffTime_ms)
Set debug LED with defined frequency.
void LED_Trigger(void)
Trigger function to periodically toggle debug LED. Frequency can be set via function LED_SetToggleTim...
Header file of the debug LED driver.
#define LED_NORMAL_OPERATION_ON_OFF_TIME_ms
void MEAS_Control(void)
Control function that is called from the task every 1ms.
STD_RETURN_TYPE_e MEAS_Initialize(void)
Headers for the driver for the measurements needed by the BMS (e.g., I,V,T).
void OS_IncrementTimer(void)
Increments the system timer os_timer.
void PEX_SetPin(uint8_t portExpander, uint8_t pin)
sets pin to high.
void PEX_SetPinDirectionOutput(uint8_t portExpander, uint8_t pin)
sets pin to input.
void PEX_Initialize(void)
initialize local variable containing state of port expander.
void PEX_Trigger(void)
implements reading/writing to the port expander registers.
Header for the driver for the NXP PCA9539 port expander module.
#define PEX_PORT_EXPANDER3
STD_RETURN_TYPE_e MRC_Initialize(void)
Function to initalize redundancy module.
STD_RETURN_TYPE_e MRC_ValidateAfeMeasurement(void)
Function to validate the measurement between redundant measurement values for cell voltage and cell t...
STD_RETURN_TYPE_e MRC_ValidatePackMeasurement(void)
Function to validate the measurements of pack values (string values, pack values)
Header fileS for handling redundancy between redundant cell voltage and cell temperature measurements...
void SBC_Trigger(SBC_STATE_s *pInstance)
trigger function for the SYS driver state machine.
SBC_STATE_s sbc_stateMcuSupervisor
Header for the driver for the SBC module.
void SOF_Calculation(void)
triggers SOF calculation
Header for SOX module, responsible for current derating calculation.
Headers for the driver for the SPI module.
void SPS_Initialize(void)
Initialize IOs for the SPS driver.
void SPS_Ctrl(void)
Control function for the CONT driver state machine.
Headers for the driver for the smart power switches.
void SE_RunStateEstimations(void)
Main function to perform state estimations.
Header for state-estimation module responsible for the estimation of state-of-charge (SOC),...
struct for FreeRTOS task definition
SYS_RETURN_TYPE_e SYS_SetStateRequest(SYS_STATE_REQUEST_e stateRequest)
sets the current state request of the state variable sys_state.
STD_RETURN_TYPE_e SYS_Trigger(SYS_STATE_s *pSystemState)
tick function, call this to advance the state machine
@ SYS_STATE_INITIALIZATION_REQUEST
void SYSM_CheckNotifications(void)
overall system monitoring
void SYSM_UpdateFramData(void)
Commits the stored changes to FRAM if necessary.
STD_RETURN_TYPE_e SYSM_Init(void)
initialization function for system monitoring