Embedded Device Abnormal Interruption Detection via Stack Pointer Analysis

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Embedded devices equipped with embedded systems face challenges in comprehensive detection due to their closed system environment, making it difficult to perform abnormality detection and correction effectively.

Innovation Solution

A method and system for detecting abnormal interruptions in embedded devices by using a detection device to obtain a stack pointer and program counter, identifying the first target function, and correcting the task by finding and analyzing the second target function before the first target function is executed, utilizing a status file to record and analyze the operating status and memory information.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Ease of manufacture

If embedded devices use closed system environment for specific functions, then device optimization (size, cost) is improved, but detection capability deteriorates

Engineering Contradiction:
Improvedevice optimizationVSAvoiddetection capability
Core Design Contradiction:
Ease of manufactureVSDifficulty of detecting and measuring

Solution Approach 1:

The patent introduces a detection device as an intermediary component that interfaces with the embedded device through predefined communication interfaces. This mediator enables external detection capabilities without altering the closed-system nature of the embedded device itself, allowing abnormality detection while maintaining system optimization

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The system separates the embedded device (which maintains its optimized closed structure) from the detection device (which provides detection functionality). By segmenting the detection function into a separate component, the patent enables comprehensive detection without compromising the embedded device's size, cost, or structural optimization

Inventive Principle:
Principle #1Segmentation

2Measurement precision

If comprehensive detection is performed in embedded devices, then detection accuracy is improved, but system complexity increases

Engineering Contradiction:
Improvedetection accuracyVSAvoidsystem complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The detection device serves as an intermediary that handles the complexity of comprehensive detection externally. It captures status files, analyzes stack pointers and program counters, and traces function calling sequences without adding complexity to the embedded device's internal structure

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The detection device creates a copy of the embedded device's status information through status files and register data. By analyzing these copies rather than directly instrumenting the embedded system, the patent achieves comprehensive detection while avoiding the addition of complex detection infrastructure within the embedded device itself

Inventive Principle:
Principle #26Copying

3Measurement precision

If status file recording is implemented for abnormal interruption analysis, then error identification accuracy is improved, but data processing time increases

Engineering Contradiction:
Improveerror identification accuracyVSAvoiddata processing time
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The system performs preliminary action by recording status files and preserving register data (stack pointer, program counter) at the moment of abnormal interruption. This immediate capture of execution state eliminates the need for time-consuming retrospective analysis, as all necessary debugging information is already preserved in structured format

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The status file creates a snapshot copy of the embedded device's memory and register state at the time of interruption. This copy contains pre-organized information including stack pointer and program counter values, eliminating the need for time-consuming data collection during analysis and enabling rapid error identification

Inventive Principle:
Principle #26Copying

Data Source

PatentUS11853151B1Task abnormality detection system and embedded device detection method
Publication Date: 2023.12.26 REALTEK SEMICON CORP
  • US11853151B1 patent drawing
  • US11853151B1 patent drawing
  • US11853151B1 patent drawing

AI summary

An embedded device detection method, comprising the following steps: executing a task by an embedded device, wherein the task comprises multiple functions; when an abnormal interruption occurs to the task, obtaining a stack pointer and a program counter corresponding to the abnormal interruption by a detection device, wherein the program counter is configured to record a memory address in use when the abnormal interruption occurs to the task; obtaining a stack space corresponding to a first target function being executed according to the program counter when the abnormal interruption occurs to the task; finding out a second target function before the first target function is executed according to the stack pointer and the stack space; and correcting the task according to the second target function.