FuSa 8-Bit Libraries Safety Framework
Loading...
Searching...
No Matches
define_error_inject_reset.h File Reference

Defines type for storing the reason of a device reset caused by an error injection. More...

Go to the source code of this file.

Enumerations

enum  errInjectReset_t { ERRINJ_RESET_NONE = 0x0 , ERRINJ_RESET_CPU = 0x1 , ERRINJ_RESET_WDT = 0x2 , ERRINJ_RESET_CORRUPT = 0x3 }
 Defines possible reasons for a device reset due to an error injection. More...

Detailed Description

Defines type for storing the reason of a device reset caused by an error injection.

Definition in file define_error_inject_reset.h.

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).
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.
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

Definition at line 44 of file define_error_inject_reset.h.