Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Software timer implementation method for embedded system

A technology of embedded system and implementation method, applied in the direction of instrument, program startup/switching, program control design, etc., can solve the problems of low processing efficiency and high processor resource occupation of embedded systems

Active Publication Date: 2018-11-20
WUHAN HONGXIN TECH DEV CO LTD
View PDF5 Cites 3 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] The embodiment of the present application provides a method for implementing a software timer for an embedded system, which solves the problems in the prior art that the software timer occupies more processor resources and the processing efficiency of the embedded system is lower

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Software timer implementation method for embedded system
  • Software timer implementation method for embedded system
  • Software timer implementation method for embedded system

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0056] In order to better understand the above-mentioned technical solution, the above-mentioned technical solution will be described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0057] Users of software timers first need to create and activate the timer to make it effective. When activated, the timer will be inserted into the global activation list. The activation list is sorted by timer expiration time (absolute time).

[0058] The software timer is driven by periodic hardware interrupts, updates the system ticks in the interrupt handler, and queries the minimum expiration time of the system, if it is consistent with the current ticks, it means that the user space has a timer that expires, then wake up the software timer After the software timer task is awakened, it queries the activation linked list and sends a message to the task corresponding to the expired timer; after the task receives the timer expiration message,...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention belongs to the technical field of embedded systems, and discloses a software timer implementation method for an embedded system. The embedded system maintains a global linked list and the minimum expiration time; the global linked list is arranged in an ascending order according to the expiration time of software to a timer, and the software timer is driven by periodic hardware interrupt; the system beat number is updated in an interrupt processing program, and the minimum expiration time of the system is inquired; if the minimum expiration time is consistent with the current beat number, a software timer task is awakened; after the software timer task is awakened, an activation linked list is inquired, and a message is sent to a task corresponding to an expiration timer; andafter the task receives a timer expiration message, the corresponding service is processed. The technical scheme of the invention has simple implementation, high precision and small system overhead.

Description

technical field [0001] The invention relates to the technical field of embedded systems, in particular to a software timer implementation method for embedded systems. Background technique [0002] Software timer is an indispensable basic component in embedded operating system. For upper-layer applications, especially in the field of mobile communication, many services need to be implemented with the help of the basic component of software timing. For example, in mobile communication protocols, timers are used to manage data packet timeouts, and in communication devices, timers are used to report timing status. The network management server uses timers to manage user timeouts. [0003] The purpose of using a timer is nothing more than to perform a certain task periodically, or to perform a certain task at a specified time. However, the usage scenarios are different, and the implementation considerations for timers are also different. [0004] Generally speaking, the operat...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F9/48
CPCG06F9/4812
Inventor 陶琴陈辉
Owner WUHAN HONGXIN TECH DEV CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products