85 .illegalRequestsCounter = 0u,
87 .requestWatchdogTrigger = 0u,
91 .watchdogPeriod_10ms = 10u,
218 bool watchdogHasBeenTriggered =
false;
225 watchdogHasBeenTriggered =
true;
234 return watchdogHasBeenTriggered;
257 return pInstance->
state;
276 if (pInstance->
timer > 0u) {
277 if ((--pInstance->
timer) > 0u) {
283 switch (pInstance->
state) {
327 uint8_t requiredWatchdogTrigger = 0;
401 #ifdef UNITY_UNIT_TEST
402 extern bool TEST_SBC_TriggerWatchdogIfRequired(
SBC_STATE_s *pInstance) {
#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 FS85_InitializeNumberOfRequiredWatchdogRefreshes(FS85_STATE_s *pInstance, uint8_t *requiredWatchdogRefreshes)
Calculates the number of required watchdog refresh to reset fault error counter.
FS85_STATE_s fs85xx_mcuSupervisor
STD_RETURN_TYPE_e FS85_InitializeFsPhase(FS85_STATE_s *pInstance)
Configures SBC during INIT_FS phase.
STD_RETURN_TYPE_e SBC_TriggerWatchdog(FS85_STATE_s *pInstance)
Trigger watchdog.
STD_RETURN_TYPE_e FS85_SafetyPathChecks(FS85_STATE_s *pInstance)
Performs SBC safety path checks.
STD_RETURN_TYPE_e FS85_CheckFaultErrorCounter(FS85_STATE_s *pInstance)
Checks if fault error counter is zero.
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.
SBC_STATEMACHINE_e SBC_GetState(SBC_STATE_s *pInstance)
gets the current state of passed state variable
static bool SBC_TriggerWatchdogIfRequired(SBC_STATE_s *pInstance)
Triggers the watchdog if the timing requires it.
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.
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
@ SBC_ALREADY_INITIALIZED
@ SBC_STATE_ERROR_REQUEST
@ SBC_PERIODIC_WATCHDOG_DEACTIVATED
@ SBC_PERIODIC_WATCHDOG_ACTIVATED
#define SBC_STATEMACHINE_LONGTIME
#define SBC_STATEMACHINE_SHORTTIME
@ SBC_INIT_RESET_FAULT_ERROR_COUNTER_PART2
@ SBC_INITIALIZE_SAFETY_PATH_CHECK
@ SBC_INIT_RESET_FAULT_ERROR_COUNTER_PART1
SBC_STATEMACHINE_SUB_e lastSubstate
FS85_STATE_s * pFs85xxInstance
SBC_STATE_REQUEST_e stateRequest
SBC_STATEMACHINE_e lastState
SBC_PERIODIC_WATCHDOG_STATE_e watchdogState
uint32_t illegalRequestsCounter
SBC_STATEMACHINE_SUB_e substate
uint16_t watchdogPeriod_10ms