![]() |
AVR SD Safety Framework 1.0.0
|
Defines and declares configurations for Tasks. More...
#include <stdint.h>#include <define_reset_info.h>#include <define_tasks_configs.h>#include <midware_clock_manager.h>#include <midware_memory_manager.h>#include <midware_power_manager.h>#include <midware_watchdog_manager.h>#include <xc.h>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 DISABLED |
| Enables the heartbeat output signal on an I/O pin before entering Mission Mode. | |
| #define | SWDT_OPEN_WINDOW 500U |
| Configures the open window size used for the Synchronous Watchdog (SWDT). | |
| #define | WWDT_CLOSED_WINDOW WDT_TIMEOUT_CLK128 |
| Configures the Windowed Watchdog Timer (WWDT) closed window duration in Mission Mode. | |
| #define | WWDT_OPEN_WINDOW WDT_TIMEOUT_CLK64 |
| 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 4700UL |
| 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 25U |
| Configures the reference value for the Clock Frequency Measure 0 (CFM0) window. | |
| #define | INIT_CFM0_WIN_HIGH 17293U |
| Configures the high value of the Clock Frequency Measure 0 (CFM0) window. | |
| #define | INIT_CFM0_WIN_LOW 13594U |
| 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 0xFFU |
| 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 ENABLED |
| 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_APPDATA_EEPROM |
| Configures the "ECC all ones" scheme in Non-Volatile Memory. | |
| #define | INIT_STACK_LIMIT (INTERNAL_SRAM_START + INTERNAL_SRAM_SIZE - 250U) |
| 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 ECC error 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 ECC 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 ENABLED |
| 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 DISABLED |
| 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 ENABLED |
| 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 | PERIODIC_CRCSCAN DISABLED |
| Enables or disables periodic CRCSCAN of Flash in T_EnterIdleSleep. | |
| #define | PERIODIC_CRCSCAN_PIT DISABLED |
| Enables or disables automatic wake-up from periodic CRCSCAN in T_EnterIdleSleep. | |
| #define | SHUTDOWN_CRCSCAN DISABLED |
| Enables or disables running a CRCSCAN on Flash in TM_Shutdown before entering sleep. | |
| #define | CRCSCAN_BOOT_SECTION ENABLED |
| Enables or disables running a CRCSCAN on the BOOT Flash Section in T_EnterIdleSleep and T_VerifyFlashIntegrity. | |
| #define | CRCSCAN_APPCODE_SECTION DISABLED |
| Enables or disables running a CRCSCAN on the APPCODE Flash Section in T_EnterIdleSleep and T_VerifyFlashIntegrity. | |
| #define | CRCSCAN_APPDATA_SECTION DISABLED |
| Enables or disables running a CRCSCAN on the APPDATA Flash Section in T_EnterIdleSleep and T_VerifyFlashIntegrity. | |
| #define | CRCSCAN_CRC32 DISABLED |
| Enables using 32-bit CRC width or the default 16-bit when running a CRCSCAN in T_EnterIdleSleep and T_VerifyFlashIntegrity. | |
| #define | DIAG_PERIODIC_CRCSCAN ENABLED |
| Enables or disables execution of the CRCSCAN error injection diagnostic in T_EnterIdleSleep. | |
| #define | DIAG_SHUTDOWN_CRCSCAN ENABLED |
| Enables or disables execution of the CRCSCAN error injection diagnostic in T_VerifyFlashIntegrity. | |
| #define | SHUTDOWN_SAFE_STATE ENABLED |
| Enables or disables entering a Safe State in T_InitSafeShutdown before shutdown sleep. | |
| #define | SHUTDOWN_WDT_DURATION WDT_TIMEOUT_CLK8K |
| Configures the Watchdog Timer (WDT) timeout used during sleep in TM_Shutdown. | |
| #define | SHUTDOWN_SUSPEND_CFD_CFM ENABLED |
| Enables or disables suspending clock monitors before shutdown sleep in TM_Shutdown. | |
| #define | SHUTDOWN_POWER_DOWN DISABLED |
| Configures whether to use Standby or Power-Down sleep mode in TM_Shutdown. | |
| #define | DUR_RUN_STARTUP_DIAGNOSTICS 24000UL |
| Configures the run-time duration for T_RunStartupDiagnostics in system clock cycles. | |
| #define | DUR_START_MISSION_MODE 400UL |
| Configures the run-time duration for T_StartMissionMode in system clock cycles. | |
| #define | DUR_UNTIL_FIRST_SCHEDULE 400UL |
| 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 2600UL |
| Configures the run-time duration for T_RunNextLatentFaultDiag in system clock cycles. | |
| #define | DUR_HANDLE_NOTIFICATION_ERRORS 11000UL |
| Configures the run-time duration for T_HandleNotificationErrors in system clock cycles. | |
| #define | DUR_HANDLE_RESET_REASON 700UL |
| Configures the run-time duration for T_HandleResetReason in system clock cycles. | |
| #define | DUR_ENTER_IDLE_SLEEP 150UL |
| Configures the run-time duration for T_EnterIdleSleep in system clock cycles. | |
| #define | DUR_UNTIL_SAFE_SHUTDOWN 100000UL |
| Configures the run-time duration between completing the application-specific shutdown Task and entering shutdown sleep in system clock cycles. | |
| #define | PRE_STARTUP_SWDT_RESET_VAL 0xFFFFUL |
| Configures the new SWDT reset value after performing the SWDT Expire diagnostic in T_RunResetDiagnosticFsm in system clock cycles. | |
| #define | DIAG_PERIODIC_SWDT_RESET_VAL 3500UL |
| Configures the new Synchronous Watchdog Timer (SWDT) reset value after performing the SWDT Expire diagnostic in T_RunNextLatentFaultDiag in system clock cycles. | |
| #define | DIAG_FLASH_ADDRESS PROGMEM_START |
| Configures the Flash address used by Flash ECC error injection diagnostics. | |
| #define | DIAG_EEPROM_ADDRESS EEPROM_START |
| Configures the EEPROM address used by NVM parity and EEPROM ECC error injection diagnostics. | |
Variables | |
| const rstCallback_t | resetReasonCallback |
| Configures the user-configurable callback function used for application specific reset handling in T_HandleResetReason. | |
Defines and declares configurations for Tasks.
This file declares the global defines and external constants used by Tasks. The constants are defined and initialized in tasks_config.c to ensure a single instance across all translation units using the configuration.