AVR SD Safety Framework 1.0.0
Loading...
Searching...
No Matches
Error Handler Callbacks Example

Contains API prototypes for Error Handler callback examples. More...

Files

file  error_handler_callbacks_example.c
 Implements APIs for Error Handler Callbacks.
file  error_handler_callbacks_example.h
 Contains API prototypes for Error Handler callback examples.

Functions

void EH_NonCriticalErrorExampleCallback (errId_t id)
 Placeholder implementation of a NON_CRITICAL Error Handler callback function.
void EH_NotificationErrorExampleCallback (errId_t id)
 Placeholder implementation of a NOTIFICATION Error Handler callback function.

Detailed Description

Contains API prototypes for Error Handler callback examples.

Function Documentation

◆ EH_NonCriticalErrorExampleCallback()

void EH_NonCriticalErrorExampleCallback ( errId_t id)

Placeholder implementation of a NON_CRITICAL Error Handler callback function.

Note

The example implementation is intentionally left empty, as the appropriate handling is highly application specific and would require initialization of peripherals such as USART or a debug print interface before use.

This callback can be called by the Error Handler when a NON_CRITICAL error is reported for application-specific error handling. Possible uses include:

  • Adding a debug breakpoint and watching the stored Error ID variable during development
  • Sending the Error ID over a communication interface (e.g., USART, SPI, TWI)
  • Storing the Error ID to non-volatile memory (e.g., EEPROM) for later analysis
  • Triggering application-specific recovery or logging behavior
  • Initiating a software reset after the error is handled

Warning

An application-specific error handling callback should be implemented for proper error handling.

Warning

Ensure that any hardware or software resources required by this callback for error recovery or diagnostics are fully initialized before this callback is invoked the first time. Refer to TM_Startup for startup sequencing details.

Parameters
idError ID indicating the cause of the NON_CRITICAL error.

◆ EH_NotificationErrorExampleCallback()

void EH_NotificationErrorExampleCallback ( errId_t id)

Placeholder implementation of a NOTIFICATION Error Handler callback function.

Note

The example implementation is intentionally left empty, as the appropriate handling is highly application specific and would require initialization of peripherals such as USART or a debug print interface before use.

This callback can be called by the Error Handler during processing of the notification error log for application-specific handling of NOTIFICATION errors. Possible uses include:

  • Adding a debug breakpoint and watching the stored Error ID variable during development
  • Sending the Error ID over a communication interface (e.g., USART, SPI, TWI)
  • Storing the Error ID to non-volatile memory (e.g., EEPROM) for later analysis
  • Triggering application-specific recovery or logging behavior
  • Attempting to fix an error and initiating a software reset if unsuccessful

Warning

An application-specific error handling callback should be implemented for proper error handling.

Warning

Ensure that any hardware or software resources required by this callback for error recovery or diagnostics are fully initialized before this callback is invoked the first time. Refer to TM_Startup for startup sequencing details.

Parameters
idError ID indicating the cause of the NOTIFICATION error.