FuSa 8-Bit Libraries Safety Framework
Loading...
Searching...
No Matches
Error Handler Config

Declares configurations for the Error Handler. More...

Files

file  error_handler_config.c
 Defines and initializes configurations for the Error Handler.

Macros

#define NOTIFICATION_LOG_SIZE   5U
 Configures the maximum number of Error IDs allowed in the Notification Error Log.

Variables

const errCrit_t errorIdCritLut [ERRID_MAX]
 Configures the criticality of all Error IDs for handling in EH_HandleError.
const errCallback_t nonCriticalErrorCallback = &EH_NonCriticalErrorExampleCallback
 Configures the callback function used for 'NON_CRITICAL' Error IDs in EH_HandleError.
const errCallback_t notificationErrorCallback = &EH_NotificationErrorExampleCallback
 Configures the callback function used for 'NOTIFICATION' Error IDs in EH_ProcessNotificationLog.
const errCrit_t errorIdCritLut [ERRID_MAX]
 Configures the criticality of all Error IDs for handling in EH_HandleError.
const errCallback_t nonCriticalErrorCallback
 Configures the callback function used for 'NON_CRITICAL' Error IDs in EH_HandleError.
const errCallback_t notificationErrorCallback
 Configures the callback function used for 'NOTIFICATION' Error IDs in EH_ProcessNotificationLog.

Detailed Description

Declares configurations for the Error Handler.

Version
1.0.0-alpha.1

This file declares the external configuration constants used by the Error Handler. These constants are defined and initialized in error_handler_config.c to ensure a single instance across all translation units using the configuration.

Macro Definition Documentation

◆ NOTIFICATION_LOG_SIZE

#define NOTIFICATION_LOG_SIZE   5U

Configures the maximum number of Error IDs allowed in the Notification Error Log.

This macro limits the how many errId_t can be added to the Notification Error Log before being processed by EH_ProcessNotificationLog. Any Error IDs pushed to the log are discarded by EH_PushNotificationLog when the log is full. It is recommended to process the log often rather than having a large log.

Valid range is between 1 and UINT8_MAX.

Definition at line 90 of file error_handler_config.h.

Variable Documentation

◆ errorIdCritLut [1/2]

const errCrit_t errorIdCritLut[ERRID_MAX]
Initial value:
= {
}
@ ERRID_WWDT_TIMEOUT_VAL
@ ERRID_EVSYS1_CLEAR
@ ERRID_NMI_UNKNOWN
@ ERRID_DIAG_ERRCH_CFM0
@ ERRID_FLASH2_COMP
@ ERRID_SWDT_EXP
@ ERRID_SWDT_RESET_VAL
@ ERRID_EEPROM_ECC1
@ ERRID_CFD1_CH
@ ERRID_SWDT_CH
@ ERRID_BUSERR_PARITYD
@ ERRID_OPC_PARITYI
@ ERRID_VREGFAIL_VUV
@ ERRID_DIAG_SWDT_EXPIRE
@ ERRID_CFM1_CH
@ ERRID_DIAG_ERRCH_EVSYS1
@ ERRID_VREGWARN_CH
@ ERRID_SWDT_UC
@ ERRID_VREGWARN_VSLP
@ ERRID_INIT_WATCHDOGS
@ ERRID_GPR_FLAGS
@ ERRID_DIAG_WDT_EXPIRE
@ ERRID_RAM2_COMP
@ ERRID_VREGFAIL_VOV
@ ERRID_VREGWARN_SERR
@ ERRID_BUSERR_CH
@ ERRID_EVSYS0_CLEAR
@ ERRID_DIAG_CPU_COMP
@ ERRID_DIAG_ERRCH_EVSYS0
@ ERRID_DIAG_ERRCH_CFM1
@ ERRID_DIAG_PARITY_NVM
@ ERRID_FLASH1_CH
@ ERRID_GPR_VALS
@ ERRID_RAM1_CH
@ ERRID_DIAG_CFD0
@ ERRID_VREGFAIL_CH
@ ERRID_INIT_CLOCKS
@ ERRID_SPLIM_CH
@ ERRID_VREGWARN_VDEXIT
@ ERRID_EEPROM_CH
@ ERRID_NMI
@ ERRID_NONE
@ ERRID_INIT_INTERRUPTS
@ ERRID_SWDT_BADPC
@ ERRID_DIAG_CFM1
@ ERRID_CFD0_CH
@ ERRID_DIAG_WDT_COUNT
@ ERRID_EVSYS0_CH
@ ERRID_ERRID_VAL
@ ERRID_SWDT_BADC
@ ERRID_RAM_PARITY
@ ERRID_VREGWARN_VDENTER
@ ERRID_INT_DISABLED
@ ERRID_DIAG_PARITY_RAM
@ ERRID_DIAG_ECC_EEPROM
@ ERRID_DIAG_VMON_OVER
@ ERRID_INIT_POWER
@ ERRID_BAD_IRQ
@ ERRID_DIAG_ERRCH_CFD1
@ ERRID_DIAG_ERRCH_EEPROM
@ ERRID_FLASH2_ECC2
@ ERRID_CRC_FLASH
@ ERRID_DIAG_CFM0
@ ERRID_BOD_VLM
@ ERRID_SAFE_IO
@ ERRID_DIAG_ERRCH_SPLIM
@ ERRID_VREGWARN_VERR
@ ERRID_OPC_OPC
@ ERRID_OPC_CH
@ ERRID_BUSERR_BUSERR
@ ERRID_ERRFLAG_VAL
@ ERRID_FORCE_FLOAT
@ ERRID_RAM2_ECC2
@ ERRID_DIAG_CFD1
@ ERRID_DIAG_ECC_FLASH
@ ERRID_DIAG_ECC_RAM
@ ERRID_VREGWARN_VDIS
@ ERRID_INIT_ERRCTRL
@ ERRID_NVM_PARITY
@ ERRID_FLASH2_CH
@ ERRID_EEPROM_ECC2
@ ERRID_DIAG_SWDT_COUNT
@ ERRID_RAM2_CH
@ ERRID_DIAG_ERRCH_CFD0
@ ERRID_CFM0_CH
@ ERRID_EVSYS1_CH
@ ERRID_INIT_MEMORIES
@ ERRID_DIAG_VMON_UNDER

Configures the criticality of all Error IDs for handling in EH_HandleError.

This array is used as a Look-Up Table (LUT) for the Error Handler to identify the criticality for all defined Error IDs. Each index in the LUT corresponds to an errId_t value. This LUT, together with the errId_t enum, facilitates a centralized error handling system, allowing for expansion by adding new Error IDs as required by the application. The array is defined and configured in error_handler_config.c.

Warning
Ensure that ERRID_MAX is set to the highest enumerator value in errId_t to prevent out-of-bounds access when indexing the array.
Note
This array serves as the single source of truth for the criticality of both hardware and software flags. See errId_t for more information.
Warning
It is assumed that each Error ID is set to a criticality suitable to meet application requirements. All Error IDs are set to NOTIFICATION by default to enhance the development and debugging experience.

Definition at line 37 of file error_handler_config.c.

◆ errorIdCritLut [2/2]

const errCrit_t errorIdCritLut[ERRID_MAX]
extern

Configures the criticality of all Error IDs for handling in EH_HandleError.

This array is used as a Look-Up Table (LUT) for the Error Handler to identify the criticality for all defined Error IDs. Each index in the LUT corresponds to an errId_t value. This LUT, together with the errId_t enum, facilitates a centralized error handling system, allowing for expansion by adding new Error IDs as required by the application. The array is defined and configured in error_handler_config.c.

Warning
Ensure that ERRID_MAX is set to the highest enumerator value in errId_t to prevent out-of-bounds access when indexing the array.
Note
This array serves as the single source of truth for the criticality of both hardware and software flags. See errId_t for more information.
Warning
It is assumed that each Error ID is set to a criticality suitable to meet application requirements. All Error IDs are set to NOTIFICATION by default to enhance the development and debugging experience.

Definition at line 37 of file error_handler_config.c.

◆ nonCriticalErrorCallback [1/2]

const errCallback_t nonCriticalErrorCallback = &EH_NonCriticalErrorExampleCallback

Configures the callback function used for 'NON_CRITICAL' Error IDs in EH_HandleError.

This callback setting is configured in the error_handler_config.c file and should be set to point to a function with a errCallback_t type signature in order to implement application-specific error handling for any Error ID reported with NON_CRITICAL criticality.

Definition at line 132 of file error_handler_config.c.

◆ nonCriticalErrorCallback [2/2]

const errCallback_t nonCriticalErrorCallback
extern

Configures the callback function used for 'NON_CRITICAL' Error IDs in EH_HandleError.

This callback setting is configured in the error_handler_config.c file and should be set to point to a function with a errCallback_t type signature in order to implement application-specific error handling for any Error ID reported with NON_CRITICAL criticality.

Definition at line 132 of file error_handler_config.c.

◆ notificationErrorCallback [1/2]

const errCallback_t notificationErrorCallback = &EH_NotificationErrorExampleCallback

Configures the callback function used for 'NOTIFICATION' Error IDs in EH_ProcessNotificationLog.

This callback setting is configured in the error_handler_config.c file and should be set to point to a function with a errCallback_t type signature in order to implement application-specific error handling for any Error ID reported with NOTIFICATION criticality.

Definition at line 138 of file error_handler_config.c.

◆ notificationErrorCallback [2/2]

const errCallback_t notificationErrorCallback
extern

Configures the callback function used for 'NOTIFICATION' Error IDs in EH_ProcessNotificationLog.

This callback setting is configured in the error_handler_config.c file and should be set to point to a function with a errCallback_t type signature in order to implement application-specific error handling for any Error ID reported with NOTIFICATION criticality.

Definition at line 138 of file error_handler_config.c.