Embedded Task Frequency Monitoring With Timer-Based Error Detection
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional real-time operating systems lack the ability to monitor and ensure tasks are executed at a predetermined frequency, leading to potential delays and performance issues in multitasking environments where precise timing is critical.
Innovation Solution
A method and system that utilize a timer and processing resource to calculate the difference between timer count values, determining if the execution frequency of a task falls within a user-defined range, and setting an error flag accordingly to facilitate corrective actions.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If conventional real-time operating systems are used, then the system can perform basic multitasking, but the system lacks the ability to monitor and ensure tasks are executed at a predetermined frequency, leading to potential delays and performance issues
Solution Approach 1:
The system uses the existing timer resource to monitor task execution frequency. The timer automatically generates time stamps and the processing resource calculates the frequency by comparing consecutive time stamps, enabling self-monitoring without external intervention or additional monitoring hardware.
Solution Approach 2:
The system sets an error flag when task execution frequency deviates from the predetermined frequency. This feedback mechanism allows the system to detect and report frequency deviations, enabling corrective actions to maintain reliable task execution.
2Measurement precision
If precise timing monitoring is implemented, then task execution frequency can be accurately monitored, but the system complexity and computational overhead increase
Solution Approach 1:
The existing timer resource is utilized to provide time stamps for task execution. The timer already operates independently and generates time information, so the monitoring system leverages this existing capability rather than adding separate timing hardware or continuous high-precision measurement mechanisms.
Solution Approach 2:
The system monitors frequency by sampling at task execution points rather than continuously monitoring. It calculates frequency based on the difference between consecutive time stamps only when tasks are executed, avoiding unnecessary continuous measurement and reducing computational overhead while maintaining adequate precision.
Data Source
AI summary
A method includes reading first and second timer count values from a timer, wherein the first timer count value is associated with a first time point and the second timer count value is associated with a second time point, calculating a difference between the first and the second timer count values, and determining whether the difference is within a range, wherein the range is based on a desired executing frequency to perform a computing task, a variation of the desired executing frequency, and a timer frequency. Further, based on the difference not being within the range, the method includes setting an error flag value to be true and incrementing an error count value.

