ICARUS OS (Intelligent Cooperative Architecture for Real-time Unified Systems) 0.1.0
Preemptive Real-Time Operating System for ARM Cortex-M7
Loading...
Searching...
No Matches
error.c File Reference

ICARUS OS Error Handling Implementation. More...

#include "bsp/error.h"

Go to the source code of this file.

Macros

#define SRC_BSP_ERROR_C_
 

Functions

void Error_Handler (void)
 System error handler for unrecoverable faults.
 

Detailed Description

ICARUS OS Error Handling Implementation.

Version
0.1.0

Provides system-wide error handling for unrecoverable faults. The Error_Handler enters an infinite loop with interrupts disabled to prevent further system corruption.

Error Recovery:
The Error_Handler does not return. System recovery requires:
  • Hardware reset (NRST pin)
  • Power cycle
  • Watchdog timeout (if enabled)
See also
docs/do178c/design/SDD.md Section 7 - Error Handling
Author
Souham Biswas
Date
2025

Definition in file error.c.

Macro Definition Documentation

◆ SRC_BSP_ERROR_C_

#define SRC_BSP_ERROR_C_

Definition at line 27 of file error.c.

Function Documentation

◆ Error_Handler()

void Error_Handler ( void  )

System error handler for unrecoverable faults.

Called when a fatal error is detected that cannot be recovered. Disables all interrupts and enters an infinite loop to prevent further system corruption.

Typical Callers:
  • HAL initialization failures
  • Clock configuration errors
  • Peripheral initialization failures
  • Stack overflow detection (if enabled)
Warning
This function never returns!
All interrupts are disabled - watchdog will not be serviced
Note
For debugging, set a breakpoint on this function to catch errors
Consider adding LED blink pattern for field diagnosis

Definition at line 50 of file error.c.

Referenced by HAL_I2C_MspInit(), HAL_RTC_MspInit(), HAL_SPI_MspInit(), MX_I2C2_Init(), MX_RTC_Init(), MX_SPI4_Init(), MX_TIM1_Init(), and SystemClock_Config().