AVR SD Safety Framework 1.0.0
Loading...
Searching...
No Matches
Optional APIs and Config

Task Manager For Standby And Power-down Sleep

The framework includes a Task Manager that is considered optional, only to be used if deeper sleep modes are required by the application:

Refer to the API documentation of the specific functions for more information.

Additionally, the following configs are unused if TM_Shutdown is not called:
SHUTDOWN_CRCSCAN, DIAG_SHUTDOWN_CRCSCAN, SHUTDOWN_SAFE_STATE, SHUTDOWN_WDT_DURATION, SHUTDOWN_SUSPEND_CFD_CFM, SHUTDOWN_POWER_DOWN and DUR_UNTIL_SAFE_SHUTDOWN.


Optional Application Schedule Tasks

The framework includes several Tasks that are intended to be used in the application schedules, depending on the applications requirements:

Refer to Using Optional Tasks in the Application Startup Schedule and Using Optional Tasks in the Application Schedule in Tips and Tricks and the API documentation of the specific functions for more information and relevant configs.


Diagnostic APIs Requiring Application Specific Handling

The following CFD diagnostic APIs are not called by the framework and are intended to be called by the application if enabling the CFD diagnostics (DIAG_STARTUP_CFD0, DIAG_STARTUP_CFD1, DIAG_PERIODIC_CFD0, DIAG_PERIODIC_CFD1) in order to correctly time the diagnostics:

Refer to Using CFD diagnostics in Startup and Using CFD diagnostics in Mission Mode in Tips and Tricks and the API documentation of the specific functions for more information.

The following WDT diagnostic APIs are not called by the framework and are intended to be called by the application if enabling the WDT diagnostics (DIAG_PERIODIC_WDT_COUNT) in order to correctly time the diagnostics:

Refer to Using WDT Count Diagnostic in Tips and Tricks and the API documentation of the specific functions for more information.

The framework performs VMON diagnostics during initialization and optionally in Mission Mode (DIAG_PERIODIC_VMON) without the need for application specific handling, but MW_IsDiagVmonOngoing is available for the instances where the application requires to check if the VMON is in diagnostic mode.


Optional CRC Scanning APIs

In addition to offering CRC scanning options through TM_Shutdown and T_EnterIdleSleep, the framework also includes some CRC scanning related APIs that are not used by any Task Manager or Task, but are intended to be used by the application depending on requirements.

Refer to Using CRCSCAN for Application Data and Using CRCSCAN for Device Configuration in Tips and Tricks and the API documentation of the specific functions for more information.


Middleware APIs with non-configurable input in Tasks

Select middleware APIs have inputs where the framework Tasks only pass a fixed value. For some of these, the fixed value reflects a default that the application is encouraged to reconfigure in application-specific Tasks. For others, the alternate value is not supported by the Task layer of the framework and is not intended to be changed.

  • In MW_SetCrcScanInterrupts, useNmi is always false when used by framework Tasks since T_HandleNmiInterrupt does not support it.
  • In MW_StartCfd0 and MW_StartCfd1, src and ref are always CFD_SRC_MAINCLK and CFD_REF_OSC32K when used by framework Task. The framework cannot assume that an external clock source has been initialized. If an external source is available, reconfiguration in an application Task is encouraged.
  • In MW_StartCfm0 and MW_StartCfm1, src and ref are always CFM_SRC_MAINCLK and CFM_REF_OSC32K, and useContinuous is always true when used by framework Tasks. The framework cannot assume that an external clock source has been initialized. If an external source is available, reconfiguration in an application Task is encouraged. Continuous measurement is recommended, but oneshot is acceptable when CFM1 is used to diagnose multiple sources.
  • In MW_SetAlarmInterruptType, useNmi is always false when used by framework Tasks since T_HandleNmiInterrupt does not support it.
  • In MW_SetIntVectorLayout, expectCompactTable is always false when used by framework Tasks since the framework has one handler per interrupt vector. Alternate interrupt setups can set up a compact table with custom interrupt handlers.
  • In MW_EnableSwdt, useCcp is always true, and useLock and useInstrMode are always false when used by framework Tasks. Register protection prevents accidental writes, locking is not used since the Task layer reconfigures the SWDT throughout the application lifecycle, and instruction mode is not used since all duration configs are given in clock cycles.
  • In MW_SetWdtTimeout, useLock is always false when used by framework Tasks, since the WDT is reconfigured in different Task Managers.