![]() |
FuSa 8-Bit Libraries Safety Framework
|
#include <stdint.h>#include <define_tasks_config.h>#include <midware_clock_manager.h>#include <midware_error_manager.h>#include <midware_interrupt_manager.h>#include <midware_memory_manager.h>#include <midware_power_manager.h>#include <midware_watchdog_manager.h>Go to the source code of this file.
Macros | |
| #define | STRICT_SAFE_STATE DISABLED |
| Configures whether to use a strict Safe State to Mission Mode transition in TM_PreStartup and TM_Startup. | |
| #define | HEARTBEAT_OUTPUT ENABLED |
| Enables the heartbeat output signal on an I/O pin before entering Mission Mode. | |
| #define | SWDT_OPEN_WINDOW 1000U |
| Configures the open window size used for the Synchronous Watchdog (SWDT). | |
| #define | WWDT_CLOSED_WINDOW WDT_TIMEOUT_CLK8 |
| Configures the Windowed Watchdog Timer (WWDT) closed window duration in Mission Mode. | |
| #define | WWDT_OPEN_WINDOW WDT_TIMEOUT_CLK128 |
| Configures the Windowed Watchdog Timer (WWDT) Open Window duration in Mission Mode. | |
| #define | INIT_WDT_DURATION WDT_TIMEOUT_CLK128 |
| Configures the timeout period, from executing T_InitSafetySystem to the first T_HandleWatchdog call, in OSC32K clock cycles. | |
| #define | INIT_SWDT_DURATION 4000UL |
| Configures the run-time duration between executing T_InitSafetySystem and the first T_HandleSyncWatchdog call in main clock cycles. | |
| #define | INIT_CLOCK_FRQ CLK_FRQ_20_MHZ |
| Configures the clock frequency for the device. | |
| #define | INIT_CLOCK_DIV CLK_FRQ_DIV_OFF |
| Configures the clock division for the device. | |
| #define | INIT_REDUNDANT_CFD ENABLED |
| Enables or disables redundant CFD initialization. | |
| #define | INIT_CFM0_WIN_REF 20U |
| Configures the reference value for the Clock Frequency Measure 0 (CFM0) window. | |
| #define | INIT_CFM0_WIN_HIGH 13427U |
| Configures the high value of the Clock Frequency Measure 0 (CFM0) window. | |
| #define | INIT_CFM0_WIN_LOW 10986U |
| Configures the low value of the Clock Frequency Measure 0 (CFM0) window. | |
| #define | INIT_REDUNDANT_CFM DISABLED |
| Enables or disables redundant CFM initialization. | |
| #define | INIT_ERRCTRL_TIMEOUT 255U |
| Configures the ALARM and CONFIG state timeout period for the Error Controller. | |
| #define | INIT_FLOAT_NONCRITICAL DISABLED |
| Configures whether all I/O pins should be floated (tri-stated) when an error controller channel, errCh_t, with errCrit_t of NON_CRITICAL is set. | |
| #define | INIT_FLOAT_NOTIFICATION DISABLED |
| Configures whether all I/O pins should be floated (tri-stated) when an error controller channel, errCh_t, with errCrit_t of NOTIFICATION is set. | |
| #define | INIT_INT_ROUND_ROBIN DISABLED |
| Configures round robin schedule scheme for level 0 interrupts. | |
| #define | INIT_INT_ALT_VECTOR_LOC DISABLED |
| Configures alternative interrupt vector location when using a bootloader. | |
| #define | INIT_INT_LVL0_START 0U |
| Configures the execution priority order of level 0 (normal priority) interrupt vectors. | |
| #define | INIT_INT_LVL1 0U |
| Configures which interrupt vector should have the level 1 (highest) priority. | |
| #define | INIT_VMON_ALWAYS_ON ENABLED |
| Configures whether the Voltage Regulator Monitor (VMON) is enabled in deep sleep modes. | |
| #define | INIT_VMON_FULL_POWER_MODE DISABLED |
| Configures the Voltage Regulator Monitor (VMON) power mode. | |
| #define | INIT_VLM_THRESHOLD VLM_THRESHOLD_PCT_15 |
| Configures the Voltage Level Monitor threshold. | |
| #define | INIT_VLM_TRIGGER VLM_TRIGGER_FALLING |
| Configures the Voltage Level Monitor trigger condition. | |
| #define | INIT_NVM_ECC_ALL_ONES ECC_ALL_ONES_ALL |
| Configures the "ECC all ones" scheme in Non-Volatile Memory. | |
| #define | INIT_STACK_LIMIT 0x7E6FU |
| Configures the max depth of the hardware call stack by setting the Stack Pointer limit address. | |
| #define | INIT_STACK_LIMIT_LOCK ENABLED |
| Configures whether the Stack Pointer Limit (SPLIM) LOCK should be enabled or disabled. | |
| #define | DIAG_STARTUP_CFD0 DISABLED |
| Enables or disables execution of the CFD0 diagnostic in T_RunStartupDiagnostics. | |
| #define | DIAG_STARTUP_CFD1 DISABLED |
| Enables or disables execution of the CFD1 diagnostic in T_RunStartupDiagnostics. | |
| #define | DIAG_STARTUP_CFM0 ENABLED |
| Enables or disables execution of the CFM0 diagnostic in T_RunStartupDiagnostics. | |
| #define | DIAG_STARTUP_CFM1 DISABLED |
| Enables or disables execution of the CFM1 diagnostic in T_RunStartupDiagnostics. | |
| #define | DIAG_STARTUP_ECC_EEPROM DISABLED |
| Enables or disables execution of the EEPROM diagnostic in T_RunStartupDiagnostics. | |
| #define | DIAG_STARTUP_ERRCH_SPLIM ENABLED |
| Enables or disables execution of the SPLIM error channel diagnostic in T_RunStartupDiagnostics. | |
| #define | DIAG_STARTUP_ERRCH_CFD0 ENABLED |
| Enables or disables execution of the CFD0 error channel diagnostic in T_RunStartupDiagnostics. | |
| #define | DIAG_STARTUP_ERRCH_CFD1 ENABLED |
| Enables or disables execution of the CFD1 error channel diagnostic in T_RunStartupDiagnostics. | |
| #define | DIAG_STARTUP_ERRCH_CFM0 DISABLED |
| Enables or disables execution of the CFM0 error channel diagnostic in T_RunStartupDiagnostics. | |
| #define | DIAG_STARTUP_ERRCH_CFM1 DISABLED |
| Enables or disables execution of the CFM1 error channel diagnostic in T_RunStartupDiagnostics. | |
| #define | DIAG_STARTUP_ERRCH_EEPROM ENABLED |
| Enables or disables execution of the EEPROM error channel diagnostic in T_RunStartupDiagnostics. | |
| #define | DIAG_STARTUP_ERRCH_EVSYS0 DISABLED |
| Enables or disables execution of the EVSYS0 error channel diagnostic in T_RunStartupDiagnostics. | |
| #define | DIAG_STARTUP_ERRCH_EVSYS1 DISABLED |
| Enables or disables execution of the EVSYS1 error channel diagnostic in T_RunStartupDiagnostics. | |
| #define | DIAG_PERIODIC_SWDT_COUNT ENABLED |
| Enables or disables execution of the SWDT count diagnostic in T_HandleSyncWatchdog. | |
| #define | DIAG_PERIODIC_WDT_COUNT DISABLED |
| Enables or disables periodic completion of the WDT Count diagnostic in T_HandleWatchdog. | |
| #define | DIAG_PERIODIC_CFD0 DISABLED |
| Enables or disables execution of the CFD0 diagnostic in T_RunNextLatentFaultDiag. | |
| #define | DIAG_PERIODIC_CFD1 DISABLED |
| Enables or disables execution of the CFD1 diagnostic in T_RunNextLatentFaultDiag. | |
| #define | DIAG_PERIODIC_CFM0 ENABLED |
| Enables or disables execution of the CFM0 diagnostic in T_RunNextLatentFaultDiag. | |
| #define | DIAG_PERIODIC_CFM1 DISABLED |
| Enables or disables execution of the CFM1 diagnostic in T_RunNextLatentFaultDiag. | |
| #define | DIAG_PERIODIC_VMON DISABLED |
| Enables or disables execution of the VMON diagnostic in T_RunNextLatentFaultDiag. | |
| #define | DIAG_PERIODIC_SWDT_EXPIRE DISABLED |
| Enables or disables execution of the SWDT expire diagnostic in T_RunNextLatentFaultDiag. | |
| #define | DIAG_PERIODIC_ECC_EEPROM DISABLED |
| Enables or disables execution of the EEPROM parity error diagnostic in T_RunNextLatentFaultDiag. | |
| #define | DIAG_PERIODIC_ERRCH_SPLIM ENABLED |
| Enables or disables execution of the SPLIM error channel diagnostic in T_RunNextLatentFaultDiag. | |
| #define | DIAG_PERIODIC_ERRCH_CFD0 DISABLED |
| Enables or disables execution of the CFD0 error channel diagnostic in T_RunNextLatentFaultDiag. | |
| #define | DIAG_PERIODIC_ERRCH_CFD1 ENABLED |
| Enables or disables execution of the CFD1 error channel diagnostic in T_RunNextLatentFaultDiag. | |
| #define | DIAG_PERIODIC_ERRCH_CFM0 ENABLED |
| Enables or disables execution of the CFM0 error channel diagnostic in T_RunNextLatentFaultDiag. | |
| #define | DIAG_PERIODIC_ERRCH_CFM1 DISABLED |
| Enables or disables execution of the CFM1 error channel diagnostic in T_RunNextLatentFaultDiag. | |
| #define | DIAG_PERIODIC_ERRCH_EEPROM DISABLED |
| Enables or disables execution of the EEPROM error channel diagnostic in T_RunNextLatentFaultDiag. | |
| #define | DIAG_PERIODIC_ERRCH_EVSYS0 DISABLED |
| Enables or disables execution of the EVSYS0 error channel diagnostic in T_RunNextLatentFaultDiag. | |
| #define | DIAG_PERIODIC_ERRCH_EVSYS1 DISABLED |
| Enables or disables execution of the EVSYS1 error channel diagnostic in T_RunNextLatentFaultDiag. | |
| #define | DUR_RUN_STARTUP_DIAGNOSTICS 35000UL |
| Configures the run-time duration for T_RunStartupDiagnostics in system clock cycles. | |
| #define | DUR_START_MISSION_MODE 1500UL |
| Configures the run-time duration for T_StartMissionMode in system clock cycles. | |
| #define | DUR_UNTIL_FIRST_SCHEDULE 200UL |
| Configures the run-time duration between exiting TM_Startup and the first T_HandleSyncWatchdog call in system clock cycles. | |
| #define | DUR_RUN_NEXT_LATENT_FAULT_DIAG 2500UL |
| Configures the run-time duration for T_RunNextLatentFaultDiag in system clock cycles. | |
| #define | DUR_HANDLE_NOTIFICATION_ERRORS 9000UL |
| Configures the run-time duration for T_HandleNotificationErrors in system clock cycles. | |
| #define | DUR_HANDLE_RESET_REASON 2000UL |
| Configures the run-time duration for T_HandleResetReason in system clock cycles. | |
| #define | DUR_INITIATE_IDLE_SLEEP 1000UL |
| Configures the run-time duration for T_InitiateIdleSleep in system clock cycles. | |
| #define | PRE_STARTUP_SWDT_RESET_VAL 4000UL |
| Configures the new SWDT reset value after performing the SWDT Expire diagnostic in T_RunResetDiagnosticFsm. | |
| #define | DIAG_PERIODIC_SWDT_RESET_VAL 2400UL |
| Configures the new SWDT reset value after performing the SWDT Expire diagnostic in T_RunNextLatentFaultDiag. | |
Variables | |
| const rstCallback_t | resetReasonCallback |
| Configures the user-configurable callback function used for application specific reset handling in T_HandleResetReason. | |