82 .illegalRequestsCounter = 0u,
84 .requestWatchdogTrigger = 0u,
88 .watchdogPeriod_10ms = 10u,
233 return pInstance->
state;
264 if (pInstance->
timer > 0u) {
265 if ((--pInstance->
timer) > 0u) {
271 switch (pInstance->
state) {
315 uint8_t requiredWatchdogTrigger = 0;
#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.
#define NULL_PTR
Null pointer.
STD_RETURN_TYPE_e FS85X_InitFS(FS85xx_STATE_s *pInstance)
Configures SBC during INIT_FS phase.
STD_RETURN_TYPE_e SBC_TriggerWatchdog(FS85xx_STATE_s *pInstance)
Trigger watchdog.
STD_RETURN_TYPE_e FS85X_CheckFaultErrorCounter(FS85xx_STATE_s *pInstance)
Checks if fault error counter is zero.
STD_RETURN_TYPE_e FS85X_Init_ReqWDGRefreshes(FS85xx_STATE_s *pInstance, uint8_t *requiredWatchdogRefreshes)
Calculates the number of required watchdog refresh to reset fault error counter.
STD_RETURN_TYPE_e FS85X_SafetyPathChecks(FS85xx_STATE_s *pInstance)
Performs SBC safety path checks.
FS85xx_STATE_s fs85xx_mcuSupervisor
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.
Implementation of the tasks used by the system, headers.
SBC_STATEMACHINE_e SBC_GetState(SBC_STATE_s *pInstance)
gets the current state of passed state variable
void SBC_Trigger(SBC_STATE_s *pInstance)
trigger function for the SYS driver state machine.
static void SBC_SaveLastStates(SBC_STATE_s *pInstance)
Saves the last state and last substate.
static SBC_CHECK_REENTRANCE_e SBC_CheckReEntrance(SBC_STATE_s *pInstance)
Re-entrance check of SBC state machine trigger function.
static SBC_RETURN_TYPE_e SBC_CheckStateRequest(SBC_STATE_s *pInstance, SBC_STATE_REQUEST_e stateRequest)
checks the state requests that are made.
SBC_STATE_s sbc_stateMcuSupervisor
static SBC_STATE_REQUEST_e SBC_TransferStateRequest(SBC_STATE_s *pInstance)
Transfers the current state request to the state machine.
enum SBC_CHECK_REENTRANCE SBC_CHECK_REENTRANCE_e
SBC_RETURN_TYPE_e SBC_SetStateRequest(SBC_STATE_s *pInstance, SBC_STATE_REQUEST_e stateRequest)
sets the current state request of passed state variable
Header for the driver for the SBC module.
@ SBC_STATEMACHINE_RUNNING
@ SBC_STATEMACHINE_UNINITIALIZED
@ SBC_STATEMACHINE_INITIALIZATION
enum SBC_RETURN_TYPE SBC_RETURN_TYPE_e
@ SBC_STATE_ERROR_REQUEST
enum SBC_STATEMACHINE SBC_STATEMACHINE_e
#define SBC_STATEMACHINE_LONGTIME
enum SBC_STATE_REQUEST SBC_STATE_REQUEST_e
#define SBC_STATEMACHINE_SHORTTIME
@ SBC_INIT_RESET_FAULT_ERROR_COUNTER_PART2
@ SBC_INITIALIZE_SAFETY_PATH_CHECK
@ SBC_INIT_RESET_FAULT_ERROR_COUNTER_PART1
@ SBC_ALREADY_INITIALIZED
@ SBC_PERIODIC_WATCHDOG_DEACTIVATED
@ SBC_PERIODIC_WATCHDOG_ACTIVATED
SBC_STATEMACHINE_SUB_e lastSubstate
SBC_STATEMACHINE_e lastState
SBC_STATE_REQUEST_e stateRequest
SBC_STATEMACHINE_SUB_e substate
SBC_PERIODIC_WATCHDOG_STATE_e watchdogState
FS85xx_STATE_s * pFs85xxInstance
uint32_t illegalRequestsCounter
uint16_t watchdogPeriod_10ms