Embedded System Exception Handling via Callback Linked List

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional exception handling mechanisms in embedded systems suffer from poor portability and robustness due to hardware architecture dependencies, leading to decreased reliability and potential system failures when handling exceptions, especially in complex multi-task environments where secondary exceptions can propagate and cause system instability.

Innovation Solution

The implementation of a method using an exception callback linked list structure that allows for multi-level exception handling, enabling registration and execution of exception handling functions at task, application, and system levels, thereby avoiding direct hardware operations and enhancing portability and robustness.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If conventional exception handling mechanism is used, then exception can be handled at task level, but exception handling program has poor portability and robustness due to hardware architecture dependencies

Engineering Contradiction:
Improveexception handling reliabilityVSAvoidportability of exception handling program
Core Design Contradiction:
ReliabilityVSAdaptability or versatility

Solution Approach 1:

The patent introduces an intermediary layer between hardware exceptions and handling functions. The exception monitoring device captures exceptions and uses a dispatch table (software intermediary) to match exception types with handling functions, eliminating direct hardware architecture dependencies in the handling program itself while maintaining reliable exception handling.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent segments the exception handling system into distinct components: exception capture module, dispatch table (mapping exception types to handlers), and handling function execution module. This segmentation allows the core handling logic to be architecture-independent while the capture layer handles hardware-specific details, improving portability without sacrificing reliability.

Inventive Principle:
Principle #1Segmentation

2Device complexity

If conventional exception handling mechanism is used, then simple task-level processing is achieved, but secondary exceptions during handling cannot be resolved and may spread to application programs

Engineering Contradiction:
Improvesimplicity of exception handling mechanismVSAvoidsystem stability against exception spread
Core Design Contradiction:
Device complexityVSReliability

Solution Approach 1:

The patent implements nested exception handling where the exception monitoring device wraps around the application program, creating multiple protective layers. When an exception occurs, it is handled at the monitoring device level rather than propagating to the application program. This nested structure allows complex multi-layer protection while maintaining a relatively simple interface for application developers.

Inventive Principle:
Principle #7Nested doll (Nesting)

Solution Approach 2:

The patent establishes exception monitoring and handling mechanisms beforehand (prior cushioning) to prevent secondary exceptions from spreading. The dispatch table and handling functions are pre-configured to catch and resolve exceptions before they can propagate to application programs, cushioning the system against exception-related failures.

Inventive Principle:
Principle #11Beforehand cushioning (Prior cushioning)

3Reliability

If exception handling program is modified for each exception according to processor architecture, then specific exceptions can be handled, but development complexity increases and robustness decreases

Engineering Contradiction:
Improveexception handling capabilityVSAvoidcomplexity of exception handling program
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent creates a universal exception handling mechanism through the dispatch table that can handle multiple exception types through a single software layer. Rather than writing architecture-specific handling code for each exception type, the system uses a universal dispatch mechanism that maps various exception types to appropriate handlers, reducing development complexity while maintaining comprehensive exception handling capability.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Data Source

PatentEP2431876B1Method and device for exception handling in embedded system
Publication Date: 2020.07.22 ZTE CORP
  • EP2431876B1 patent drawingFigure 1
  • EP2431876B1 patent drawingFigure 2
  • EP2431876B1 patent drawingFigure 3

AI summary

A method and a device for handling exceptions in an embedded system are disclosed. The method comprises: establishing an exception callback linked list for an application program when the application program is running; registering an exception handling function and the corresponding relation between the exception handling function and the exception information into the exception callback linked list by the application program; when the exception is captured, searching the corresponding relation between the exception handling function and the exception information to locate an exception handling function matching the captured exception, according to the exception information of the captured exception; after a matched exception handling function is located, calling and executing the matched exception handling function to perform the exception handling. By adopting the method and the device, the direct operation of the exception handling function to the bottom layer hardware is avoided, and the portability and robustness of the software are improved.