AVR SD Safety Framework 1.0.0
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.
file  error_handler_config.h
 Declares 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.

Detailed Description

Declares configurations for the Error Handler.

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 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 configurations: between 1 and UINT8_MAX.

Warning
It is assumed that the selected notification log size is suitable to meet application requirements.

Variable Documentation

◆ errorIdCritLut

const errCrit_t errorIdCritLut[ERRID_MAX]
Initial value:
= {
}
@ ERRID_WWDT_TIMEOUT_VAL
Definition define_error_ids.h:56
@ ERRID_EVSYS1_CLEAR
Definition define_error_ids.h:115
@ ERRID_NMI_UNKNOWN
Definition define_error_ids.h:72
@ ERRID_DIAG_ERRCH_CFM0
Definition define_error_ids.h:135
@ ERRID_FLASH2_COMP
Definition define_error_ids.h:86
@ ERRID_SWDT_EXP
Definition define_error_ids.h:108
@ ERRID_SWDT_RESET_VAL
Definition define_error_ids.h:55
@ ERRID_EEPROM_ECC1
Definition define_error_ids.h:110
@ ERRID_CFD1_CH
Definition define_error_ids.h:101
@ ERRID_SWDT_CH
Definition define_error_ids.h:104
@ ERRID_BUSERR_PARITYD
Definition define_error_ids.h:80
@ ERRID_OPC_PARITYI
Definition define_error_ids.h:89
@ ERRID_VREGFAIL_VUV
Definition define_error_ids.h:75
@ ERRID_DIAG_SWDT_EXPIRE
Definition define_error_ids.h:117
@ ERRID_CFM1_CH
Definition define_error_ids.h:103
@ ERRID_DIAG_ERRCH_EVSYS1
Definition define_error_ids.h:139
@ ERRID_VREGWARN_CH
Definition define_error_ids.h:93
@ ERRID_SWDT_UC
Definition define_error_ids.h:107
@ ERRID_VREGWARN_VSLP
Definition define_error_ids.h:97
@ ERRID_INIT_WATCHDOGS
Definition define_error_ids.h:59
@ ERRID_GPR_FLAGS
Definition define_error_ids.h:58
@ ERRID_DIAG_WDT_EXPIRE
Definition define_error_ids.h:119
@ ERRID_RAM2_COMP
Definition define_error_ids.h:83
@ ERRID_VREGFAIL_VOV
Definition define_error_ids.h:74
@ ERRID_VREGWARN_SERR
Definition define_error_ids.h:99
@ ERRID_BUSERR_CH
Definition define_error_ids.h:76
@ ERRID_EVSYS0_CLEAR
Definition define_error_ids.h:113
@ ERRID_DIAG_CPU_COMP
Definition define_error_ids.h:116
@ ERRID_DIAG_ERRCH_EVSYS0
Definition define_error_ids.h:138
@ ERRID_DIAG_ERRCH_CFM1
Definition define_error_ids.h:136
@ ERRID_DIAG_PARITY_NVM
Definition define_error_ids.h:128
@ ERRID_FLASH1_CH
Definition define_error_ids.h:92
@ ERRID_GPR_VALS
Definition define_error_ids.h:57
@ ERRID_RAM1_CH
Definition define_error_ids.h:91
@ ERRID_DIAG_CFD0
Definition define_error_ids.h:123
@ ERRID_VREGFAIL_CH
Definition define_error_ids.h:73
@ ERRID_INIT_CLOCKS
Definition define_error_ids.h:60
@ ERRID_SPLIM_CH
Definition define_error_ids.h:90
@ ERRID_VREGWARN_VDEXIT
Definition define_error_ids.h:95
@ ERRID_EEPROM_CH
Definition define_error_ids.h:109
@ ERRID_NMI
Definition define_error_ids.h:71
@ ERRID_NONE
Definition define_error_ids.h:50
@ ERRID_INIT_SLEEP
Definition define_error_ids.h:66
@ ERRID_INIT_INTERRUPTS
Definition define_error_ids.h:62
@ ERRID_SWDT_BADPC
Definition define_error_ids.h:105
@ ERRID_DIAG_CFM1
Definition define_error_ids.h:122
@ ERRID_CFD0_CH
Definition define_error_ids.h:100
@ ERRID_DIAG_WDT_COUNT
Definition define_error_ids.h:120
@ ERRID_EVSYS0_CH
Definition define_error_ids.h:112
@ ERRID_ERRID_VAL
Definition define_error_ids.h:52
@ ERRID_SWDT_BADC
Definition define_error_ids.h:106
@ ERRID_RAM_PARITY
Definition define_error_ids.h:78
@ ERRID_VREGWARN_VDENTER
Definition define_error_ids.h:94
@ ERRID_INT_DISABLED
Definition define_error_ids.h:67
@ ERRID_DIAG_PARITY_RAM
Definition define_error_ids.h:127
@ ERRID_DIAG_ECC_EEPROM
Definition define_error_ids.h:131
@ ERRID_DIAG_VMON_OVER
Definition define_error_ids.h:125
@ ERRID_INIT_CRCSCAN
Definition define_error_ids.h:65
@ ERRID_INIT_POWER
Definition define_error_ids.h:63
@ ERRID_BAD_IRQ
Definition define_error_ids.h:70
@ ERRID_DIAG_ERRCH_CFD1
Definition define_error_ids.h:134
@ ERRID_DIAG_ERRCH_EEPROM
Definition define_error_ids.h:137
@ ERRID_FLASH2_ECC2
Definition define_error_ids.h:85
@ ERRID_CRC_FLASH
Definition define_error_ids.h:69
@ ERRID_DIAG_CFM0
Definition define_error_ids.h:121
@ ERRID_BOD_VLM
Definition define_error_ids.h:68
@ ERRID_SAFE_IO
Definition define_error_ids.h:53
@ ERRID_DIAG_ERRCH_SPLIM
Definition define_error_ids.h:132
@ ERRID_VREGWARN_VERR
Definition define_error_ids.h:96
@ ERRID_OPC_OPC
Definition define_error_ids.h:88
@ ERRID_DIAG_CRCSCAN
Definition define_error_ids.h:140
@ ERRID_OPC_CH
Definition define_error_ids.h:87
@ ERRID_BUSERR_BUSERR
Definition define_error_ids.h:77
@ ERRID_ERRFLAG_VAL
Definition define_error_ids.h:51
@ ERRID_FORCE_FLOAT
Definition define_error_ids.h:54
@ ERRID_RAM2_ECC2
Definition define_error_ids.h:82
@ ERRID_DIAG_CFD1
Definition define_error_ids.h:124
@ ERRID_DIAG_ECC_FLASH
Definition define_error_ids.h:130
@ ERRID_DIAG_ECC_RAM
Definition define_error_ids.h:129
@ ERRID_VREGWARN_VDIS
Definition define_error_ids.h:98
@ ERRID_INIT_ERRCTRL
Definition define_error_ids.h:61
@ ERRID_NVM_PARITY
Definition define_error_ids.h:79
@ ERRID_FLASH2_CH
Definition define_error_ids.h:84
@ ERRID_EEPROM_ECC2
Definition define_error_ids.h:111
@ ERRID_DIAG_SWDT_COUNT
Definition define_error_ids.h:118
@ ERRID_RAM2_CH
Definition define_error_ids.h:81
@ ERRID_DIAG_ERRCH_CFD0
Definition define_error_ids.h:133
@ ERRID_CFM0_CH
Definition define_error_ids.h:102
@ ERRID_EVSYS1_CH
Definition define_error_ids.h:114
@ ERRID_INIT_MEMORIES
Definition define_error_ids.h:64
@ ERRID_DIAG_VMON_UNDER
Definition define_error_ids.h:126
@ IGNORE
Definition define_error_criticality.h:39
@ NOTIFICATION
Definition define_error_criticality.h:38

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.

Valid configurations: see errId_t and errCrit_t.

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.

◆ nonCriticalErrorCallback

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.

Valid configuration: Only functions with the errCallback_t type signature.

Warning
Setting this to NULL is not a valid configuration.

◆ notificationErrorCallback

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.

Valid configuration: Only functions with the errCallback_t type signature.

Warning
Setting this to NULL is not a valid configuration.