AVR SD Safety Framework 1.0.0
Loading...
Searching...
No Matches
Task Defines

Defines types and macro constants used by Tasks. More...

Files

file  define_error_inject_reset.h
 Defines type for storing the reason of a device reset caused by an error injection.
file  define_reset_info.h
 Defines types for identifying and storing reset information.
file  define_tasks_configs.h
 Defines macros used to configure Tasks in the tasks_config.h file.

Data Structures

struct  resetInfo_t
 Defines a data structure for storing information about a device reset. More...

Macros

#define FOREVER   true
 Allows testing of infinite while loops by replacing the definition during testing.
#define ENABLED   (1U)
 Used to enable optional Task features through macro configurations.
#define DISABLED   (0U)
 Used to disable optional Task features through macro configurations.

Typedefs

typedef void(* rstCallback_t) (resetInfo_t resetInfo)
 Defines a function pointer type for a reset handler callback function.

Enumerations

enum  errInjectReset_t
 Defines possible reasons for a device reset due to an error injection. More...

Detailed Description

Defines types and macro constants used by Tasks.

Macro Definition Documentation

◆ DISABLED

#define DISABLED   (0U)

Used to disable optional Task features through macro configurations.

◆ ENABLED

#define ENABLED   (1U)

Used to enable optional Task features through macro configurations.

◆ FOREVER

#define FOREVER   true

Allows testing of infinite while loops by replacing the definition during testing.

Typedef Documentation

◆ rstCallback_t

typedef void(* rstCallback_t) (resetInfo_t resetInfo)

Defines a function pointer type for a reset handler callback function.

The function pointer type is used to configure which callback to issue for handling reset reasons in T_HandleResetReason.

Parameters
resetInfoThe reset information passed by the Task for application specific reset handling.

Enumeration Type Documentation

◆ errInjectReset_t

Defines possible reasons for a device reset due to an error injection.

This enum is used by several tasks to store possible reasons for a device reset due to an error injection in persistent memory. See T_DetermineResetReason, T_RunResetDiagnosticFsm, T_HandleResetReason and T_HandlePreStartupErrors.

Warning

It is assumed that ERRINJ_RESET_NONE is zero to ensure it is the default value when persistent memory is cleared in software or due to a Power-On Reset (POR) or Brown-Out Reset (BOR).

Warning

It is assumed that ERRINJ_RESET_CORRUPT is the highest value for data validation and that the enum value only requires 2-bits of storage in persistent memory.

Warning
Each reason value is encoded using a specific bit pattern as an additional safety measure such that a single bit flip in the data will not cause infinite reset loops.
Enumerator
ERRINJ_RESET_NONE 

0b00 Device reset was not due to an error injection

ERRINJ_RESET_CPU 

0b01 Device reset was due to a CPU lockstep error injection

ERRINJ_RESET_WDT 

0b10 Device reset was due to a WDT expire error injection

ERRINJ_RESET_CORRUPT 

0b11 The stored device reset reason is corrupted