Tick Interrupt Configuration for RTOS Time Accuracy

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing technologies for low power consumption in RTOS systems face inaccuracies in system time due to frequent time compensation errors caused by non-tick interrupts, leading to inefficient power management and system inaccuracy.

Innovation Solution

A method and apparatus for setting tick interrupts that decouple tick interrupts from Idle tasks, performing time compensation only for tick interrupts, and correcting next tick interrupt times based on updated timeout tasks when entering low power mode, thereby reducing the need for system-wide time compensation and improving accuracy.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Loss of energy

If the system dynamically calculates and sets the time of next tick interrupt in an Idle task, then power consumption is reduced by allowing the MCU to enter low power mode, but system time accuracy deteriorates due to frequent time compensation errors from non-tick interrupts

Engineering Contradiction:
Improvepower consumptionVSAvoidsystem time accuracy
Core Design Contradiction:
Loss of energyVSMeasurement precision

Solution Approach 1:

The patent segments the interrupt handling by creating separate mechanisms for tick interrupts and non-tick interrupts. Tick interrupts continue to wake the MCU and trigger time compensation, while non-tick interrupts use a different notification mechanism that does not require waking the MCU or performing time compensation, thus isolating the time accuracy issue to only necessary tick interruptions

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces an intermediary mechanism (event flags or notification registers) that allows non-tick interrupts to notify the system of events without directly waking the MCU or triggering the full interrupt handling sequence. This intermediary layer filters out unnecessary wake-ups while still maintaining system responsiveness

Inventive Principle:
Principle #24Intermediary (Mediator)

2Speed

If the MCU wakes up for every non-tick interrupt to perform time compensation, then system responsiveness is improved, but power consumption increases and time accuracy deteriorates due to frequent wake-ups and rounding errors

Engineering Contradiction:
Improvesystem responsivenessVSAvoidpower consumption
Core Design Contradiction:
SpeedVSLoss of energy

Solution Approach 1:

The patent segments interrupt handling into two paths: tick interrupts that require full processing including time compensation and MCU wake-up, and non-tick interrupts that use a simplified notification path that does not wake the MCU or perform time compensation, allowing selective responsiveness based on interrupt type

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent applies partial action by implementing only the necessary portion of interrupt handling for non-tick interrupts - setting event flags or notification registers without performing the full wake-up and time compensation sequence, thus reducing unnecessary actions while maintaining essential system functionality

Inventive Principle:
Principle #16Partial or excessive action

3Measurement precision

If tick interrupts are decoupled from Idle tasks and configured at system level, then system time accuracy is improved by reducing compensation frequency, but device complexity increases due to separate interrupt configuration mechanisms

Engineering Contradiction:
Improvesystem time accuracyVSAvoidinterrupt configuration complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The patent extracts the tick interrupt configuration from the Idle task context and establishes it as a separate system-level mechanism. This extraction allows tick interrupts to operate independently with dedicated time compensation logic, isolating them from the complexity of task scheduling while maintaining system time accuracy

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent creates a universal interrupt configuration mechanism that handles both tick and non-tick interrupts through a unified framework with specialized sub-routines. The system uses a common interrupt controller and notification mechanism that can handle different interrupt types, reducing overall complexity despite the specialized handling requirements

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

Data Source

PatentUS11216023B2Clock tick interrupt configuration method and apparatus
Publication Date: 2022.01.04 CLOUD INTELLIGENCE ASSETS HOLDING (SINGAPORE) PTE LTD
  • US11216023B2 patent drawing
  • US11216023B2 patent drawing
  • US11216023B2 patent drawing

AI summary

A method and an apparatus for setting a time for a tick interrupt are disclosed. The method includes performing a compensation for a system time when a tick interrupt is executed; setting a time of a next tick interrupt according to a timeout task and a compensated system time if the timeout task exists when the tick interrupt is executed; and when a system enters into a low power mode after the tick interrupt is executed, correcting the time of the next tick interrupt according to the timeout task that is updated when the low power mode is entered. The present disclosure can decouple logic relationships between tick interrupts and Idle tasks, thereby reduces the number of division operations that involve rounding, reduces such accumulated error associated with compensation time, and improves the accuracy of the system time, as compared to the existing technologies.