57 #ifndef FOXBMS__SBC_H_
58 #define FOXBMS__SBC_H_
79 #define SBC_STATEMACHINE_TASK_CYCLE_CONTEXT_MS (10u)
81 #if SBC_STATEMACHINE_TASK_CYCLE_CONTEXT_MS != FTSK_TASK_CYCLIC_10MS_CYCLE_TIME
82 #error "Invalid SBC configuration. Make sure that SBC timing is configured correctly!"
89 #define SBC_STATEMACHINE_SHORTTIME (1u)
95 #define SBC_STATEMACHINE_MEDIUMTIME (5u)
101 #define SBC_STATEMACHINE_LONGTIME (10u)
106 #define SBC_WINDOW_WATCHDOG_PERIOD_MS (100u)
212 #ifdef UNITY_UNIT_TEST
213 extern bool TEST_SBC_TriggerWatchdogIfRequired(
SBC_STATE_s *pInstance);
Task configuration header.
General macros and definitions for the whole platform.
Header for the driver for the FRAM module.
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.
@ SBC_STATEMACHINE_RUNNING
@ SBC_STATEMACHINE_UNINITIALIZED
@ SBC_STATEMACHINE_INITIALIZATION
@ SBC_STATEMACHINE_UNDEFINED
@ SBC_ALREADY_INITIALIZED
@ SBC_STATE_ERROR_REQUEST
SBC_PERIODIC_WATCHDOG_STATE_e
@ SBC_PERIODIC_WATCHDOG_DEACTIVATED
@ SBC_PERIODIC_WATCHDOG_ACTIVATED
SBC_STATE_s sbc_stateMcuSupervisor
@ SBC_INITIALIZE_VOLTAGE_SUPERVISOR_PART3
@ SBC_INIT_RESET_FAULT_ERROR_COUNTER_PART2
@ SBC_INITIALIZE_SAFETY_PATH_CHECK
@ SBC_INITIALIZE_VOLTAGE_SUPERVISOR_PART4
@ SBC_INIT_RESET_FAULT_ERROR_COUNTER_PART1
SBC_RETURN_TYPE_e SBC_SetStateRequest(SBC_STATE_s *pInstance, SBC_STATE_REQUEST_e stateRequest)
sets the current state request of passed state variable
SBC_STATEMACHINE_SUB_e lastSubstate
FS85_STATE_s * pFs85xxInstance
SBC_STATE_REQUEST_e stateRequest
SBC_STATEMACHINE_e lastState
uint8_t requestWatchdogTrigger
SBC_PERIODIC_WATCHDOG_STATE_e watchdogState
uint32_t illegalRequestsCounter
SBC_STATEMACHINE_SUB_e substate
uint16_t watchdogPeriod_10ms