CN102637126A - Method, device and system for timing embedded system - Google Patents

Method, device and system for timing embedded system Download PDF

Info

Publication number
CN102637126A
CN102637126A CN2011100386484A CN201110038648A CN102637126A CN 102637126 A CN102637126 A CN 102637126A CN 2011100386484 A CN2011100386484 A CN 2011100386484A CN 201110038648 A CN201110038648 A CN 201110038648A CN 102637126 A CN102637126 A CN 102637126A
Authority
CN
China
Prior art keywords
timer
time
module
hardware
regularly
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN2011100386484A
Other languages
Chinese (zh)
Other versions
CN102637126B (en
Inventor
道远
黄河清
马奎
王刚
张亮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jiangsu Perceptual Hengan Technology Co ltd
Original Assignee
WUXI RESEARCH AND DEVELOPMENT CENTER OF HIGH-TECH WEINA SENSOR NETWORKS ENGINEERING TECHNOLOGY CAS
Wuxi Sensing Net Industrialization Research Institute
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by WUXI RESEARCH AND DEVELOPMENT CENTER OF HIGH-TECH WEINA SENSOR NETWORKS ENGINEERING TECHNOLOGY CAS, Wuxi Sensing Net Industrialization Research Institute filed Critical WUXI RESEARCH AND DEVELOPMENT CENTER OF HIGH-TECH WEINA SENSOR NETWORKS ENGINEERING TECHNOLOGY CAS
Priority to CN201110038648.4A priority Critical patent/CN102637126B/en
Publication of CN102637126A publication Critical patent/CN102637126A/en
Application granted granted Critical
Publication of CN102637126B publication Critical patent/CN102637126B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a method, a device and a system for timing an embedded system. The method comprises the following steps of: receiving a first timing request carrying timer expiration time t1 and a callback function; judging whether a value t2 of a software component of the present time of the system is earlier than the timer expiration time t1; if the t2 is earlier than the t1, judging whether the t1 is up in a present hardware timing period according to the t2 and the timing period of a hardware timer; if the t2 is up in the timing period of the hardware timer, configuring a value of a comparison register to be a hardware component of the expiration time t2; and receiving an expiration pause signal transmitted by the comparison register, and invoking the callback function carried in the first timing request. The timing method of the embodiment of the invention has the advantages of higher timing precision and no need of frequent overflow pause of a hardware timer.

Description

The timing method of embedded system, device and system
Technical field
The present invention relates to the embedded system technology field, be specifically related to a kind of timing method, device and system of embedded system.
Background technology
At present, the technology of Internet of things that uses embedded system is in industry widespread uses such as industry, traffic, medical treatment, electric power.In order to reduce power consumption and to improve information transfer efficiency; Often use in the technology of Internet of things and have the periodically time division multiple access (TDMA) (TDMA of sleep mode; Time Division Multiple Access) agreement, and the TDMA agreement needs the timer support of high precision, long span.
Existing embedded system provides a kind of software timer, and it mainly whenever produces at a distance from one period regular time (for example 1 millisecond) through the configure hardware timer and overflows interruption, and drive software timing variable is realized clocking capability from the Calais.Timings all in the embedded system all realize based on this software timer.
The inventor finds that in the process of research prior art the time precision of existing software timer is produced the cycle decision of overflowing interruption by hardware timer.Owing to too frequent overflow interruption and can reduce system performance, so the precision of existing software timer is restricted, and is difficult to satisfy the demand of high time precision.
Summary of the invention
The present invention provides a kind of timing method, device and system of embedded system, can high-precision timing be provided avoiding hardware timer frequently to overflow under the situation of interruption.
For solving the problems of the technologies described above, the embodiment of the invention realizes through following technical scheme:
The timing method of the embedded system that the embodiment of the invention provides, it comprises:
Receive the first regularly request, said first regularly carries timer expiration time t1 and call back function in the request;
Whether the value t2 of software components that judges the current time in system is early than said timer expiration time t1;
If t2 is early than t1, then according to judging whether said t1 expires in time-count cycle at current hardware the time-count cycle of t2 and hardware timer;
If t1 expires in time-count cycle at current hardware, then the value of comparand register is set to the hardware component of said expiration time t1;
Receive the interruption that expires that said comparand register sends, call the call back function that carries in the said first timing request.
The embodiment of the invention also provides a kind of timing device of embedded system, and it comprises:
Regularly ask receiver module, be used to receive the first regularly request, said first regularly carries timer expiration time t1 and call back function in the request;
First judge module is connected with said timing request receiver module, and whether the software components t2 that is used to judge the current time in system is early than said timer expiration time t1;
Second judge module is connected with said first judge module, is used at said t2 early than said t1, then according to judging whether said t1 expires in time-count cycle at current hardware the time-count cycle of t2 and hardware timer;
Register is provided with module, is connected with the comparand register and second judge module respectively, is used for judging t1 when current hardware expired in time-count cycle, and then the value of comparand register is set to the hardware component of said t1;
The interruption processing module that expires respectively with comparand register and regularly ask receiver module to be connected, is used to receive interruptions that expire that said comparand register sends, and calls the call back function that said first timing is carried in asking.
The embodiment of the invention also provides a kind of embedded timing system, and it comprises:
Hardware timer is used for generation time-count cycle of every separated hardware and overflows interruption;
With the software timer that said hardware timer is connected, said software timer is used for the software components of interrupting providing the current time in system of overflowing according to said hardware timer;
With the comparand register that said hardware timer is connected, said comparand register is used for when the time of setting expires, producing the interruption that expires;
Regularly ask receiver module, be used to receive the first regularly request, said first regularly carries timer expiration time t1 and call back function in the request;
First judge module is connected with said timing request receiver module, software timer respectively, and whether the software components t2 that is used to judge the current time in system is early than said timer expiration time t1;
Second judge module is connected with said first judge module, is used at said t2 early than said t1, then according to judging whether said t1 expires in time-count cycle at current hardware the time-count cycle of t2 and hardware timer;
Register is provided with module, is connected with said comparand register, second judge module respectively, is used at t1 when current hardware expired in time-count cycle, and then the value of comparand register is set to the hardware component of said t1;
The interruption processing module that expires respectively with comparand register and regularly ask receiver module to be connected, is used to receive interruptions that expire that said comparand register sends, and calls the call back function that said first timing is carried in asking.
In the timing method of the embedded system that the embodiment of the invention provides; If regularly the timer expiration time t1 in the request expires in time-count cycle at current hardware; Then the value of comparand register is set to the hardware component of t1 and t1; Then comparand register to after date, sends to interim breaking at the hardware component of t1, the call back function that the embodiment of the invention is carried in regularly asking according to this interrupt call first that expires.Compare the interrupt cycle of overflowing that only depends on hardware timer with timing accuracy of the prior art; The embodiment of the invention is divided into the software components t2 of current time in system and hardware component two parts of t1 with the expiration time of timer; The timing accuracy of the embodiment of the invention can be identical with the precision of the clock of hardware timer; The precision of the clock of hardware timer is higher than overflowing interrupt cycle of hardware timer; Therefore the timing accuracy of the timing method that provides of the embodiment of the invention is higher, and do not need hardware timer frequent overflow interruption.
Description of drawings
In order to be illustrated more clearly in the technical scheme in the embodiment of the invention; To do to introduce simply to the accompanying drawing of required use among prior art and the embodiment below; Obviously, the accompanying drawing in describing below only is some embodiments of the present invention, for those of ordinary skills; Under the prerequisite of not paying creative work, can also obtain other accompanying drawing according to these accompanying drawings.
Fig. 1 is the process flow diagram of the timing method of the embedded system that provides of the embodiment of the invention one;
Fig. 2 is the process flow diagram of the timing method of the embedded system that provides of the embodiment of the invention two;
Fig. 3 is the process flow diagram of the timing method of the embedded system that provides of the embodiment of the invention three;
Fig. 4 is the structural representation of the timing device of the embedded timing system that provides of the embodiment of the invention four;
Fig. 5 is the structural representation of the embedded timing system that provides of the embodiment of the invention five;
Fig. 6 is the structural representation of the embedded timing system that provides of the embodiment of the invention six;
Fig. 7 is the method flow diagram that embedded timing system that the embodiment of the invention six provides is obtained the software components of current time in system;
Fig. 8 is that the embedded timing system that the embodiment of the invention provides is carried out the regularly method flow diagram of request;
Fig. 9 is the method flow diagram of the embedded timing system handling interrupt that provides of the embodiment of the invention;
Figure 10 sets next expiration time module to carry out the next regularly method flow diagram of request in the orderly timing queue in the embedded timing system that provides of the embodiment of the invention;
Figure 11 is that the embedded timing system that the embodiment of the invention provides is carried out the regularly method flow diagram of request of cancellation;
Figure 12 is the course of work synoptic diagram of the embedded timing system that provides of the embodiment of the invention.
Embodiment
To combine the accompanying drawing in the embodiment of the invention below, the technical scheme in the embodiment of the invention is carried out clear, intactly description, obviously, described embodiment only is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills are not making the every other embodiment that is obtained under the creative work prerequisite, all belong to the scope of the present invention's protection.
The invention provides a kind of timing method, device and system of embedded system.Technical scheme for a better understanding of the present invention describes in detail embodiment provided by the invention below in conjunction with accompanying drawing.
Referring to Fig. 1, Fig. 1 is the process flow diagram of the timing method of the embedded system that provides of the embodiment of the invention one.
The timing method of the embedded system that the embodiment of the invention one provides can comprise:
A1, regularly request of reception first, first regularly carries timer expiration time t1 and call back function in the request.
Concrete, the embodiment of the invention is called the first regularly request with the current timing request that receives, so that distinguish with the follow-up timing request that receives.First regularly carries timer expiration time t1 and call back function in the request.
A2, judge the current time in system the value t2 of software components whether early than timer expiration time t1.
Concrete, the embodiment of the invention is obtained the value t2 of the software components of current time in system, and whether the software components t2 that judges the current time in system is early than timer expiration time t1.If above-mentioned condition satisfies, then this timing request of explanation can be carried out, and the present invention continues execution in step A3.If above-mentioned condition does not satisfy, then this timing request of explanation can't be carried out, and returns regularly failure.Wherein, the software components of current time in system confirms according to the interrupt cycle of overflowing of hardware timer, and its value in the embodiment of the invention, is obtained the currency t2 of software components along with the variation of hardware time-count cycle and change.The hardware component of current time in system was confirmed according to the clock period of hardware timer.For example, the current time in system is 1.5 milliseconds, and then 1 millisecond is the software components of current time in system, and 0.5 millisecond then is the hardware component of current time in system.Accordingly, the timer expiration time also comprises software components and hardware component.
Wherein, the comparand register required time being set can confirm according to concrete comparand register.In embodiments of the present invention, the current time in system comprises software components and hardware component, and the software components of current time in system confirms that according to the interrupt cycle of overflowing of hardware timer the hardware component of current time in system is confirmed according to the reading of hardware timer.
A3, if t2 early than t1, then according to judging whether t1 expires in time-count cycle at current hardware the time-count cycle of t2 and hardware timer.
Concrete, the embodiment of the invention is t2 during early than t1 in judged result, according to judging that t1 is whether at current hardware in time-count cycle the time-count cycle of hardware timer in t2 and the system.If t1 current hardware in time-count cycle then, execution in step A4 then.If t1 not current hardware in time-count cycle then; Then show the first regularly regularly success of request; And need regularly not ask to handle in time-count cycle to this at current hardware; Can be when next hardware arrive time-count cycle, trigger to carry out and judge that whether first timing ask in current hardware then step (being above-mentioned steps A3) in time-count cycle according to the software components t2 of current time in system and t1.In embodiments of the present invention, with abbreviating the time-count cycle of hardware timer hardware time-count cycle as.
Need to prove; The embodiment of the invention is when returning execution in step A3; Change has taken place in the software components of current time in system, the embodiment of the invention need judge according to the software components t2 of new current time in system first regularly request whether current hardware in time-count cycle then.
A4, if t1 expire in time-count cycle at current hardware, then the value of comparand register is set to the hardware component of t1.
Concrete, the value of the comparand register in the embodiment of the invention in the hardware is set to the hardware component of t1 so that comparand register at the t4 that sets to after date, turn back to interim breaking.Wherein, the hardware component of t1 equals the time interval t4 of t2 and t1, and the value that the embodiment of the invention also can comparand register is set to the time interval t4 of t2 and t1.
The call back function that carries in the first timing request is called in the interruption that expires that A5, reception comparand register send.
Concrete, comparand register turns back to interim disconnected, the hardware component that t1 then is described then, promptly first regularly request expire, call first call back function that regularly carry in the request this moment.
In the timing method of the embedded system that the embodiment of the invention provides; If the timer expiration time t1 in the first timing request expires in time-count cycle at current hardware; Then the value of comparand register is set to the hardware component of t1; Comparand register arrives after date in the time that is provided with, and sends to interim breaking, the call back function that the embodiment of the invention is carried in regularly asking according to this interrupt call first that expires.Compare the interrupt cycle of overflowing that only depends on hardware timer with timing accuracy in the software timer of prior art; The embodiment of the invention is divided into the software components t2 of current time in system and hardware component two parts of t1 with the expiration time of timer; The timing accuracy of the embodiment of the invention can be identical with the precision of the clock of hardware timer; The precision of the clock of hardware timer is higher than overflowing interrupt cycle of hardware timer; Therefore the timing accuracy of the timing method that provides of the embodiment of the invention is higher, and do not need hardware timer frequent overflow interruption.
Referring to Fig. 2, Fig. 2 is the process flow diagram of the timing method of the embedded system that provides of the embodiment of the invention two.
The timing method of the embedded system that the embodiment of the invention two provides comprises:
B1, regularly request of reception first, first regularly carries timer expiration time t1 and call back function in the request.
B2, judge the current time in system software components t2 whether early than timer expiration time t1.
Wherein, the implementation of step B1-B2 is identical with steps A 1-A2 in the foregoing description one in the embodiment of the invention, and details no longer are repeated in this description at this referring to the foregoing description.
B3, if t2 early than t1, then with first regularly request join in the orderly timer queue according to the sequencing of expiration time.
Wherein, Can there be a plurality of timing requests in the orderly timer queue that presets; A plurality of timing requests are arranged according to the sequencing of expiration time, and overdue at first timing request is positioned at the first node of orderly timer queue, and last overdue timing request is positioned at the end of formation.
B4, judge receive first regularly request whether be positioned at the first node of orderly timer queue, if then trigger according to judging that t1 is whether in current hardware overdue step in time-count cycle the time-count cycle of t2 and hardware timer.
Concrete, if first regularly request be positioned at the first node of orderly timer queue, then trigger according to judging that t1 whether in current hardware overdue step in time-count cycle, promptly triggers execution in step B5 the time-count cycle of t2 and hardware timer.
If the first timing request is not positioned at the first node of orderly timer queue, show then temporarily and regularly do not ask to handle that first regularly asks regularly success, returns the handle of timer to first.
B5, according to judging whether t1 expires in time-count cycle at current hardware the time-count cycle of t2 and hardware timer.
B6, if t1 expire in time-count cycle at current hardware, then the value of comparand register is set to the hardware component of t1.
The call back function that carries in the first timing request is called in the interruption that expires that B7, reception comparand register send.
Wherein, the implementation of step B5-B7 is identical with steps A 3-A5 in the foregoing description one in the embodiment of the invention, and details no longer are repeated in this description at this referring to the foregoing description.
In embodiments of the present invention, join in the orderly timer queue, can handle a plurality of timing requests through the timing request that will receive sequencing according to expiration time.
Further, the timing method that the embodiment of the invention provides can further include after execution in step B7:
B8, regularly request of deletion first from orderly timer queue.
Concrete, after the call back function that the embodiment of the invention is carried in calling the first timing request, regularly request of deletion first from orderly timer queue.Being arranged in orderly timer queue first regularly asks second timing afterwards to ask after deletion first timing is asked, to be positioned at the first node of orderly timer queue.
B9, the second regularly request of obtaining the first node of orderly timer queue, second regularly carries timer expiration time t5 and call back function in the request.
Wherein, the call back function that regularly carries in the request of second call back function that regularly carries in the request that obtains of explorer and first is different.
B10, regularly then whether request to judge second according to the value t6 of the software components of current time in system and t5.
Concrete; If according to the value t6 of the software components of current time in system and t5 judge second regularly request then, for example second regularly request regularly ask perhaps in deletion first, in the process of the software components of obtaining the current time in system then; Execution in step B11 then, otherwise execution in step B12.
Need to prove that the process of embodiment of the invention execution in step B10 has implied the step of the value t6 of the software components of obtaining the current time in system.
B11, second regularly request then then calls the call back function that carries in the second timing request, regularly request of deletion second from orderly timer queue.
The call back function that the embodiment of the invention has been carried in having called the second timing request, regularly request of deletion second from orderly timer queue.
B12, second regularly request does not have not then, then according to judging whether t5 expires in time-count cycle at current hardware the time-count cycle of t6 and hardware timer.
Concrete; If judge that t5 expires in time-count cycle at current hardware; Execution in step B13 then; Otherwise show second regularly request need not handle in time-count cycle at current hardware, can be when next hardware arrives time-count cycle, trigger to carry out and judge that whether second timing ask in current hardware then step (being above-mentioned steps B12) in time-count cycle according to t6 and t5.
B13, if t5 expire in time-count cycle at current hardware, then the value of comparand register is set to the hardware component of t5.
The call back function that carries in the second timing request is called in the interruption that expires that B14, reception comparand register send.
Concrete, the call back function that the embodiment of the invention is carried in calling the second timing request, second regularly asks to be finished.
The embodiment of the invention joins in the orderly timer queue through the timing request that will receive, and in order the first node of timer queue is overdue time at first in the timer that is provided with of all users.Like this, when a timer to after date, can obtain and be provided with the next one expiration time of timer that will expire immediately, because need not travel through, so saved the required time of next timer that is provided with greatly to all timers.When the user sets timer, timer is inserted orderly timer queue through the mode of orderly insertion.Through using orderly timer queue, when can supporting a plurality of expiration time, the timing method that the embodiment of the invention provides sets, can be by each module reuse, synchronous naturally between each module, change between when not required.
The embodiment of the invention can realize the high-precision timing function of long span, through using orderly timer queue, sets when can support a plurality of expiration time, and the scope of application is wider.In addition; The embodiment of the invention can realize high precision timing based on the comparison passage of hardware timer; Extremely low to the hardware resource requirement, it is adapted at realizing on the rare embedded system of hardware resource, with respect to the existing software timing method; It is also less that the embodiment of the invention is interrupted expense, realizes that cost is also lower.
Referring to Fig. 3, Fig. 3 is the process flow diagram of the timing method of the embedded system that provides of the embodiment of the invention three.
The timing method of the embedded system that the embodiment of the invention three provides mainly comprises:
C1, regularly request of reception first, first regularly carries timer expiration time t1 and call back function in the request.
Concrete, the embodiment of the invention is called the first regularly request with the current timing request that receives, so that distinguish with the follow-up timing request that receives.First regularly carries timer expiration time t1 and call back function in the request.
C2, judge the current time in system the value t2 of software components whether early than timer expiration time t1, and whether the hardware component of t1 greater than comparand register required time t3 is set.
Concrete; The embodiment of the invention is obtained the value t2 of the software components of current time in system; And whether the value t2 of software components that judges the current time in system early than timer expiration time t1, and whether the hardware component of t1 is greater than comparand register required time t3 is set.If above-mentioned two conditions all satisfy, then explain this first regularly request can carry out, the present invention continues execution in step C3.If one of above-mentioned two conditions do not satisfy, then explain this first regularly request can't carry out, return regularly failure.
Wherein, the software components of current time in system is according to confirming the interrupt cycle of overflowing of hardware timer.The comparand register required time is set can be confirmed according to concrete comparand register.
C3, if t2 early than t1, and the hardware component of t1 is greater than t3, then according to judging whether t1 expires in time-count cycle at current hardware the time-count cycle of t2 and hardware timer.
Concrete, the embodiment of the invention judged result be t2 early than t1, and the hardware component of t1 is during greater than t3, then according to judging that t1 is whether at current hardware in time-count cycle the time-count cycle of hardware timer in t2 and the system.If t1 current hardware in time-count cycle then, execution in step C4 then.If t1 not current hardware in time-count cycle then; Then show the first regularly regularly success of request; And need regularly not ask to handle in time-count cycle to this at current hardware; Can be when next hardware arrive time-count cycle, trigger to carry out and judge that whether first timing ask in current hardware then step (being above-mentioned steps C3) in time-count cycle according to the software components t2 of current time in system and t1.
Need to prove; The embodiment of the invention is when returning execution in step C3; Change has taken place in the software components of current time in system, the embodiment of the invention need judge according to the software components t2 of new current time in system first regularly request whether current hardware in time-count cycle then.
C4, if t1 expire in time-count cycle at current hardware, then the value of comparand register is set to the hardware component of t1.
Concrete, the value of the comparand register in the embodiment of the invention in the hardware is set to the hardware component of t1 so that comparand register at the hardware component of t1 to after date, turn back to interim breaking.
The call back function that carries in the first timing request is called in the interruption that expires that C5, reception comparand register send.
Concrete, comparand register turns back to interim disconnected, the hardware component that t1 then is described then, promptly first regularly request expire, call first call back function that regularly carry in the request this moment.
In the timing method of the embedded system that the embodiment of the invention provides; Through increase judge t1 the hardware component whether greater than comparand register required time t3 is set; Can avoid useless expiration time is set in comparand register, strengthen the stability of the timing method that the embodiment of the invention provides.
More than the timing method of embedded system that the embodiment of the invention is provided describe in detail, below at the timing device of describing the embedded timing system that the embodiment of the invention provides.
Referring to Fig. 4, Fig. 4 is the structural representation of the timing device of the embedded timing system that provides of the embodiment of the invention four.
The timing device of the embedded timing system that the embodiment of the invention four provides comprises: regularly ask receiver module 110, the first judge modules 130, second judge module 140, register module 150 to be set and the interruption processing module 160 that expires.
Wherein, regularly ask receiver module 110, be used to receive the first regularly request, first regularly carries timer expiration time t1 and call back function in the request;
First judge module 130 and regularly asks receiver module 110 to be connected, and whether the value t2 of software components that is used to judge the current time in system is early than timer expiration time t1;
Second judge module 140 is connected with first judge module 130, is used at t2 early than t1, then according to judging whether t1 expires in time-count cycle at current hardware the time-count cycle of t2 and hardware timer;
Register is provided with module 150, is connected with the comparand register and second judge module 140 respectively, is used at t1 when current hardware expired in time-count cycle, and then the value of this comparand register is set to the hardware component of t1;
The interruption processing module 160 that expires respectively with comparand register and regularly ask receiver module 110 to be connected, is used to receive interruptions that expire that comparand register sends, and calls the call back function that first timing is carried in asking.
The timing device of the embedded system that the embodiment of the invention three provides can use in the timing method that previous embodiment one provides.In embodiments of the present invention; If the timer expiration time t1 in the first timing request expires in time-count cycle at current hardware; Then the value of comparand register is set to the hardware component of t1; Comparand register to after date, sends to interim breaking at the t4 that is provided with, the call back function that the embodiment of the invention is carried in regularly asking according to this interrupt call first that expires.Compare the interrupt cycle of overflowing that only depends on hardware timer with timing accuracy in the software timer of prior art; The embodiment of the invention is divided into the software components t2 of current time in system and hardware component two parts of t1 with the expiration time of timer; The timing accuracy of the embodiment of the invention can be identical with the precision of the clock of hardware timer; The precision of the clock of hardware timer is higher than overflowing interrupt cycle of hardware timer; Therefore the timing accuracy of the timing device that provides of the embodiment of the invention is higher, and do not need hardware timer frequent overflow interruption.
Further, the timing device that provides of the embodiment of the invention can also comprise:
Formation adds module 170, is connected with first judge module 130, is used for, regularly asking to join in the orderly timer queue according to the sequencing of expiration time with first during early than t1 at t2;
The 3rd judge module 180 is used to judge whether the first timing request that receives is positioned at the first node of orderly timer queue;
First trigger module 190; Be connected with second judge module 140 and the 3rd judge module 180 respectively; Be used for when the 3rd judge module 180 judges that the first timing request is positioned at the first node of orderly timer queue, triggering second judge module 140 according to judging whether t1 expires in time-count cycle at current hardware the time-count cycle of t2 and hardware timer.
The timing device that the embodiment of the invention provides adds module 170, the 3rd judge module 180 and first trigger module 190 through increasing formation; Can be so that timing device can be handled a plurality of timing requests; Further strengthened the function of the timing device that the embodiment of the invention provides, made that the adaptability of the timing device that the embodiment of the invention provides is wider.
Further, the timing device that provides of the embodiment of the invention can also comprise:
Formation removing module 200 is connected with the interruption processing module 160 that expires, and is used for after the call back function that the interruption processing module 160 that the expires first timing request of calling is carried regularly request of deletion first from orderly timer queue.
The embodiment of the invention can be after first regularly asks to be finished through increasing formation removing module 200, regularly request of deletion first from orderly timer queue, thus save the storage space of storage queue, promptly save the storage space of timing device.
Further, the timing device that provides of the embodiment of the invention can also comprise:
Second trigger module 120; Be connected with second judge module 140, the 3rd judge module 180 respectively; Be used for judging that at second judge module 140 t1 does not expire in time-count cycle at current hardware; And the 3rd judge module 180 judges that first regularly asks to be positioned at the first node of orderly timer queue; Then when next hardware arrives time-count cycle, trigger second judge module 140 according to the software components t2 of current time in system and t1 judge first regularly request whether current hardware in time-count cycle then.
Need to prove; Contents such as the information interaction in the above-mentioned embedded timing device between each module, implementation; Since with the timing method embodiment of embedded system of the present invention based on same design, particular content can repeat no more referring to the narration among the inventive method embodiment here.
More than the timing device of embedded system that the embodiment of the invention four is provided describe the embedded timing system of the correspondence that the embodiment of the invention also provides in detail.
Referring to Fig. 5, Fig. 5 is the structural representation of the embedded timing system that provides of the embodiment of the invention five.
The embedded timing system that the embodiment of the invention five provides comprises: hardware timer 310, software timer 320, comparand register 330, regularly ask receiver module 340, first judge module 360, second judge module 370, register module 380 to be set and the interruption processing module 390 that expires.
Wherein, hardware timer 310 is used for generation time-count cycle of every separated hardware and overflows interruption, and wherein hardware is relevant with concrete hardware timer time-count cycle;
Software timer 320 is connected with hardware timer 310, is used for the software components of interrupting providing the current time in system of overflowing according to hardware timer 310;
Comparand register 330 is connected with hardware timer 310, and comparand register 330 is used for when the time of setting expires, producing the interruption that expires;
Regularly ask receiver module 340 to be used to receive the first regularly request, first regularly carries timer expiration time t1 and call back function in the request;
First judge module 360 and regularly asks receiver module 340 to be connected, and whether the value t2 of software components that is used to judge the current time in system is early than timer expiration time t1;
Second judge module 370 is connected with first judge module 360, is used at t2 early than t1, then according to judging whether t1 expires in time-count cycle at current hardware the time-count cycle of t2 and hardware timer 310;
Register is provided with module 380, asks receiver module 340 to be connected with comparand register 330, timing respectively, is used at t1 when current hardware expired in time-count cycle, and then the value of comparand register 330 is set to the hardware component of t1;
The interruption processing module 390 that expires respectively with comparand register 330 and regularly ask receiver module 340 to be connected, is used to receive interruptions that expire that comparand register sends, and calls the call back function that first timing is carried in asking.
Embedded timing system in that the embodiment of the invention four provides can be used in the timing method that previous embodiment one provides.In embodiments of the present invention, if the timer expiration time t1 regularly in the request expires in time-count cycle at current hardware, then register value that module 380 comparand registers 330 are set is set to the hardware component of t1.Comparand register 330 at the hardware component of t1 to after date, send to interim disconnected, the call back function that the interruption processing module that expires 390 is regularly carried in the request according to this interrupt call first that expires.Compare the interrupt cycle of overflowing that only depends on hardware timer with timing accuracy of the prior art; The timing system that the embodiment of the invention provides is divided into the software components t2 of current time in system and hardware component two parts of t1 with the expiration time of timer; The timing accuracy of timing device can be identical with the precision of the clock of hardware timer; The precision of the clock of hardware timer is higher than overflowing interrupt cycle of hardware timer; Therefore the timing accuracy of the embedded timing system that provides of the embodiment of the invention is higher, and do not need hardware timer frequent overflow interruption.
Further, the timing system that provides of the embodiment of the invention can also comprise:
Formation adds module 400, is connected with first judge module 360, be used at t2 early than t1, and the hardware component of t1 regularly asks to join in the orderly timer queue according to the sequencing of expiration time with first during greater than t3;
The 3rd judge module 410 is used to judge whether the first timing request that receives is positioned at the first node of orderly timer queue;
First trigger module 420; Be connected with second judge module 370 and the 3rd judge module 410 respectively; Be used for when the 3rd judge module 410 judges that the first timing request is positioned at the first node of orderly timer queue, triggering second judge module 370 according to judging whether t1 expires in time-count cycle at current hardware the time-count cycle of t2 and hardware timer.
The timing device that the embodiment of the invention provides adds module 400, the 3rd judge module 410 and first trigger module 420 through increasing formation; Can be so that timing system be handled a plurality of timing requests simultaneously; Further strengthened the function of the timing system that the embodiment of the invention provides, made that the adaptability of the timing system that the embodiment of the invention provides is wider.
Further, the timing device that provides of the embodiment of the invention can also comprise:
Formation removing module 430 is connected with the interruption processing module 390 that expires, and is used for after the call back function that the interruption processing module 390 that the expires first timing request of calling is carried regularly request of deletion first from orderly timer queue.
The embodiment of the invention can be after first regularly asks to be finished through increasing formation removing module 430, regularly request of deletion first from orderly timer queue, thus save the storage space of storage queue, promptly save the storage space of timing system.
Need to prove; Contents such as the information interaction in the above-mentioned embedded timing system between each module, implementation; Since with the timing method embodiment of embedded system of the present invention based on same design, particular content can repeat no more referring to the narration among the inventive method embodiment here.
Further, the embedded timing system that provides of the embodiment of the invention four also comprises:
Formation update module 440; Be connected with second judge module 370, formation removing module 430 respectively; Be used at formation removing module 430 after orderly timer queue deletion first is regularly asked; Then obtain the second regularly request of the first node of orderly timer queue, trigger software components t2 that second judge module 370 judges the current time in system whether early than second expiration time of request regularly, second carries timer expiration time and call back function in regularly asking;
The embedded system that the embodiment of the invention four provides is through increasing formation update module 440; Can be so that embedded timing system be after the first timing request is finished; Continue to carry out regularly request of second in the orderly timer queue, can realization carry out the timing request in the orderly timer queue in proper order.
Further; Software timer 320 in the embedded timing system that the embodiment of the invention provides also is used for having no progeny receiving overflowing that hardware timer 310 sends, and triggers the second regularly request that formation update module 440 is obtained the first node of orderly timer queue.In embodiments of the present invention; Software timer 320 is had no progeny in receiving and overflowing; The software components that shows the current time in system need add 1, and software timer 320 obtains the second regularly request through triggering formation update module 440, and then first judge module 360 is carried out according to the software components t6 of current time in system and t5 and judged that whether second timing ask step then; If then, then carry out the second regularly request.
Further, the embedded timing system that the embodiment of the invention provides also comprises:
Second trigger module 350; Be connected with second judge module 370; Be used for judging that at second judge module 370 t1 does not expire in time-count cycle at current hardware; Then when next hardware arrives time-count cycle, trigger second judge module 370 according to the software components t2 of current time in system and t1 judge first regularly request whether current hardware in time-count cycle then.
The embedded timing system that the embodiment of the invention provides is through increasing by second trigger module 350; Can be at the first request current hardware in time-count cycle under the overdue situation no longer regularly; When next hardware arrives time-count cycle; Judge once more first regularly request whether current hardware in time-count cycle then so that regularly ask after date first, embedded timing system is carried out regularly request.
Further, the embedded timing system that provides of the embodiment of the invention can also comprise:
Regularly module 450 is cancelled in request; Be connected with formation removing module 430; Be used for receiving regularly request of cancellation; Carry the expiration time t9 that needs the 3rd of cancellation regularly to ask in the cancellation timing request, regularly request cancellation module 450 also is used for triggering formation removing module 430 from orderly timer queue deletion the 3rd timing request.
Wherein, above-mentioned formation removing module 430 also is used for from regularly request of orderly timer queue deletion the 3rd.
The embedded timing system that the embodiment of the invention provides can be so that the embedded system that the embodiment of the invention provides increases cancellation timing function, better adaptability through increasing regularly request cancellation module 450.
Further, in the embedded system that the embodiment of the invention provides:
Said the 3rd judge module 410 also is connected with timing request cancellation module 450, is used to judge whether the 3rd timing request is positioned at the first node of orderly timer queue;
Second judge module 370 also is connected with the 3rd judge module 410; Be used for when the 3rd judge module 410 is judged the 3rd regularly request is positioned at the first node of orderly timer queue, then according to the software components t10 of current time in system with judge whether t9 expires in time-count cycle at current hardware the time-count cycle of hardware timer;
Register is provided with module 380 and is used for also judging that at second judge module 370 t9 expires in time-count cycle at current hardware that then the value with comparand register 330 empties;
The 3rd trigger module 460; With register module 380 is set respectively, formation update module 440 is connected; Be used for after register is provided with module 380 value of comparand register 330 is emptied, triggering the second regularly request that formation update module 440 is obtained the first node of orderly timer queue.
In the embedded timing system that the embodiment of the invention provides, register is provided with module 380 and empties through the value with comparand register 330, and it is interim disconnected to realize cancelling being timed to of comparand register, thereby cancels the 3rd regularly request.
More than embedded system that the embodiment of the invention four is provided describe in detail, for understanding the embodiment of the invention in more detail, provide the particular circuit configurations figure of embodiment of the invention embedded system below.
Referring to Fig. 6, Fig. 6 is the structural representation of the embedded timing system that provides of the embodiment of the invention six.
The embedded timing system that the embodiment of the invention six provides comprises external interface, internal module and hardware support three parts.Need to prove that the embedded timing system in the embodiment of the invention can be called embedded timing system.
Wherein external interface is the interface that other modules of embedded system provide timer function to call, and it comprises acquisition current time module 1011, and timer module 1012 is set, timer cancellation module 1013.Embedded timing system internal module crowd has realized the function logic that it provided on the basis of hardware support.Hardware support is the clock source that drives embedded timing system operate as normal, and it comprises 1051, one comparand registers 1052 of a hardware timer at least and interrupts flag 1053.The function of the internal module of embedded timing system is equivalent to the function of above-mentioned embedded timing device, below is described in detail.
Embedded timing system internal module comprises the upper-layer functionality logic, three types of bottom interrupt logic and intermediate data structures.Corresponding to three functional interfaces that embedded timing system externally provides, the upper-layer functionality logic comprises system time acquisition module 1021, timer setting module 1022 and timer cancellation module 1023.Wherein, the function of the timing request receiver module among the above-mentioned timing device embodiment, first judge module, second judge module is realized by the timer setting module 1022 in the embodiment of the invention.
The bottom interrupt logic is used for the interruption that expires of processing hardware timer 1051, and the interruption that expires is divided into expiring according to interruption status interrupts and overflow the interruption two states.Intermediate data structure is software timer 1031, orderly timer queue 1032 and interruption status variable 1044.
In the embedded timing system that inventive embodiments provides, obtain the software components of 1011 retrieval system current time of current time module, it obtains the software components that 1021 modules obtain the current time in system through the calling system time.
The user is through being provided with the handle that timer module 1012 disposes new timers and obtains new timer; Deploy content comprises the entry address of the expiration time and the call back function 1014 of timer; So that setting-up time is to after date, timer can call this call back function.Timer module 1012 is set receives outside timing request, regularly comprise the expiration time of timer in the request.
Timer cancellation module 1013 is through timer that is in the definition status of timer handle cancellation.
System time acquisition module 1021 obtains the software variable of current time in system.Current time in system comprises software components and hardware component, and wherein software components obtains through the reading of reading software timer 1031, and the hardware component then obtains through directly reading hardware timer 1051.
The timer that timer setting module 1022 process user are provided with.In embodiments of the present invention; In order timer queue is specially orderly timer queue, and first judge module, second judge module, formation add the function that module, the 3rd judge module, formation removing module and register be provided with module and realized by timer setting module 1022 in the timing device.
Timer setting module 1022 through in the timer expiration time in the relatively newer regularly request and the timer queue 1032 in order near the time the timer expiration time; Judge and be inserted into orderly timer queue 1032; Or direct control comparand register 1052, expiration time is set.
The timer that timer cancellation module 1023 has been set through the cancellation of timer handle.Request is not the first node in the orderly timer queue if wait to cancel regularly, then can directly from orderly timer queue, directly delete this timer; If first node then need be operated comparand register 1052 and call the next expiration time module 1033 of setting.
Need to prove; Do not have the first clear and definite judge module, second judge module, the 3rd judge module, the 4th judge module in the embedded timing system that the embodiment of the invention five provides; But the corresponding function of these modules all uses in embedded timing system, and the function with first judge module, second judge module, the 3rd judge module in the embodiment of the invention uses in timer setting module 1022.The function of first judge module also uses in modules such as timer cancellation module 1023, the next expiration time module 1033 of setting, does not enumerate one by one here.In addition; Do not have the first clear and definite trigger module, second trigger module, the 3rd trigger module in the embedded timing system that the embodiment of the invention five provides; But the acting on to have in the embedded timing system of these functional modules uses, the embodiment of the invention will in the function of above-mentioned first trigger module, second trigger module in timer setting module 1022, use.The function of the 3rd trigger module uses in timer cancellation module 1023.
In the embedded timing system that the embodiment of the invention provides, the function of formation update module specifically realizes by setting next expiration time module 1033.Set next expiration time module 1033 and from orderly timer queue 1032, take out first node; Judge whether expiration time is in current hardware time-count cycle (corresponding to first judge module and second judge module); And comparand register 1052 is set to expiration time or overflows the time (module being set corresponding to register), corresponding modification interruption status variable simultaneously.
The down trigger that interruption processing module 1041 is produced by comparand register 1052, it is triggered to interim disconnected processing module 1042 or overflows interruption processing module 1043 through judging the state of interruption status variable 1044.
The interruption processing module that expires 1042 expression timers expire, and it takes out first node from orderly timer queue, and calls the call back function that carries in the regularly request, and calls and set next expiration time module 1033.
Overflow the time-count cycle of overflowing interruption processing module 1043 expression hardware timers, and it triggers software timer 1031 and adds 1, and call and set next expiration time module 1033.
In the embodiment of the invention, the software components of current time in system is according to confirming the time-count cycle of hardware timer 1051.Software timer 1031 is responsible for the software components of maintenance system current time, it can according to hardware timer 1051 overflow interruption from adding 1, each from adding after 1, trigger and set next expiration time module 1033.Wherein, the cycle that adds certainly of software timer 1031 is overflowing the cycle of hardware timer.
Timer queue 1032 is data structures of the timer of storage user setting in order.The timer that the user is provided with is arranged according to the sequencing of expiration time, and overdue at first timer makes number one (first node), and overdue at first timer is the header element of orderly timer queue.Because the main operation of timer is to insert and deletion, so adopted linked list data structure; And timer needs from timer chain meter, find out as early as possible overdue timer when expiring; Therefore adopted the mode of sequential chained list; The first node of chained list is exactly overdue timer, has removed the time delay that travels through whole chained list and the uncertainty of time delay from.
Owing to overflows and interrupt and expire that to interrupt all be that the interruption of multiplexing comparand register 1052 realizes, so the embedded timing system that the embodiment of the invention provides is distinguished interrupt type through interruption status variable 1044.The interruption status variable is made amendment through setting next expiration time module 1033.
For understanding the embedded timing system that the embodiment of the invention provides in more detail, below provide the regularly concrete implementation of request.
To Figure 11, specify the concrete realization flow of each inside modules of the embodiment of the invention with reference to figure 7.
In order to guarantee the stable operation of embedded timing system, the module in the embodiment of the invention all can get into atomic operation when getting into, and when returning, withdraws from atomic operation.
Referring to Fig. 7, Fig. 7 is the method flow diagram that embedded timing system that the embodiment of the invention provides is obtained the software components of current time in system.
The embedded timing system that the embodiment of the invention provides need repeatedly be obtained the software components of current time in system, and acquisition methods comprises:
S601, system time acquisition module 1021 at first read hardware timer, are designated as the software components of current time in system, and read the interruption flag.
The state of flag is interrupted in S602, judgement.
Concrete, system time acquisition module 1021 judges whether interrupt flag is set, and whether the interruption status variable that interrupts being designated is to wait for overflow status.
If interrupting flag, S603 is set; And the interruption status variable overflows for waiting for; The reading of system time acquisition module 1021 reading software timers 1031 then; And the reading in the software timer 1031 added 1, the software components of current time in system is software timer 1031 and adds the reading after 1.
S604, if interruption status variable 1044 is not to wait for overflowing, perhaps interrupt flag and be not set, then the software components of current time in system is exactly the reading of software timer 1031.
The software components of S605, retrieval system current time.
The embodiment of the invention is through judging the state that interrupts flag; Can in the process of system time acquisition module 1021, be called in interrupt mask; And this interrupt mask process has just been crossed over the interruption of overflowing of comparand register 1052; Then software timer 1031 should add 1 and but not add, and system time acquisition module 1021 can interrupt flag through inspection compensate this nonsynchronous situation.
Referring to Fig. 8, Fig. 8 is that the embedded timing system that the embodiment of the invention provides is carried out the regularly method flow diagram of request.
Timer module 1012 is set imports regularly request into, carry timer expiration time t1 and call back function during this is regularly asked.
As shown in Figure 8, the method that embedded timing system is carried out regularly request comprises:
S701, obtain the value t2 of the software components of current time in system.
Concrete, system time acquisition module 1021 obtains the value t2 of the software components of current time in system.
S702, judge the current time in system software components t2 whether early than expiration time t1, and whether the hardware component of t1 greater than comparand register required time t3 is set.
Concrete, if timer setting module 1022 was judged expiration time t1 before the software components t2 of current time in system, perhaps the hardware component of t1 too little (being that expiration time is too fast) less than comparand register required time t3 is set, then returns null pointer; Otherwise, explain that this timing request can carry out execution in step S703.
S703, timer setting module 1022 insert orderly timer queue through the mode of orderly insertion with this new timer.
The expiration time t1 that concrete, timer setting module 1022 will regularly carry in the request and get back to function and insert in the newly assigned timer inserts the sequencing of new timer according to expiration time in the orderly timer queue then.
S704, timer setting module 1022 judge whether this new timer is positioned at first of the formation.
Concrete, if be not in the position of queue heads, then return regularly success, and the handle of this timer is returned to the user if judge new timer; Otherwise, execution in step S705.
S705, timer setting module 1022 judge whether new timer expires at current hardware time-count cycle.
Concrete, timer setting module 1022 judges according to the hardware time-count cycle of new timer expiration time t1, the software components t2 of current time in system current time and hardware timer 1051 whether timer expires at current hardware time-count cycle.If crossing this new timer is not to expire time-count cycle at current hardware, then returns regularly success, and return the handle of time timer; Otherwise, execution in step S706.
S706, the value of comparand register 1052 is revised as the hardware component of t1, and the interruption status variable is set for waiting for the interruption status that expires.
Concrete, the embodiment of the invention can also be returned regularly success after being provided with comparand register 1052 and interruption status variable 1044.
In the embodiment of the invention, timer setting module 1022 is revised as the hardware component of t1 with the value of comparand register 1052, can send to interim disconnected to interruption processing module 1041 so that comparand register 1052 is when the hardware component of t1 arrives.
Referring to Fig. 9, Fig. 9 is the method flow diagram of the embedded timing system handling interrupt that provides of the embodiment of the invention.
The method of the embedded timing system handling interrupt that the embodiment of the invention provides comprises:
S801, interruption processing module 1041 are obtained the interruption status variable, judge whether to be the wait interruption status that expires.
Concrete, comparand register 1052 produces to expire and interrupts or hardware timer 1052 produces the interruption that expires, and then will interrupt flag 1053 and carry out set.Interruption processing module 1041 is had no progeny in receiving, and carries out handled according to the state of interruption status variable 1044.If the state of interruption status variable 1044 is for waiting for the interruption status that expires, then execution in step S802 promptly begins to implement interim disconnected processing, otherwise execution in step S806 promptly begins to carry out and overflows Interrupt Process.
S802, from orderly timing queue, take out first node.
Concrete, timer setting module 1022 (is specially timer chain meter) from orderly timing queue, take out first node, and this first node is overdue timer.
S803, call the call back function of timer.
Concrete, function callback module 1014 is called the call back function of overdue timer, and call back function is very short usually, only sends an incident to task manager, returns immediately then.Call back function is finished, and then this timing request is finished.
The space of S804, timer setting module 1022 release timers.
In the embedded timing system that the embodiment of the invention provides; From the interruption generating that expires of comparand register 1052 to being provided with here before the next timer; Hardware timer 1051 still in operation, and might be crossed over overflow value, so need to be positioned in time and the chained list of more current hardware timer 1051 the timer expiration time of first node here; Judge whether the time of overflowing is crossed in the past, i.e. execution in step S805.
What S805, timer setting module 1022 judged whether above-mentioned timer expiration time cross over hardware timer 1051 overflows some break period.
Concrete, if timer setting module 1022 judges that interruption has taken place to overflow hardware timer 1051, then call immediately and overflow interruption processing module 1043, execution in step S806, otherwise, execution in step S807.In embodiments of the present invention; Overflow the interrupt event point through what judge whether above-mentioned timer expiration time cross over hardware timer; Can avoid losing this and come and following overflow interruption, cause system time software variable mistake, to such an extent as to can not accurately reflect system time.
S806, overflow interruption processing module 1043 and carry out and overflow Interrupt Process.
Concrete, as if overflowing interruption, then overflow interruption processing module 1043 triggering software timers 1031 and add 1 certainly, and call the next timing of next expiration time module 1033 execution and ask, be i.e. execution in step S807.
S807, the next expiration time module 1033 of setting are carried out next regularly request.
Wherein, the next regularly request of setting in the next expiration time module 1033 execution timer chain meters will be described in detail in follow-up embodiment.
Referring to Figure 10, Figure 10 sets next expiration time module to carry out the next regularly method flow diagram of request in the orderly timing queue in the embedded timing system that provides of the embodiment of the invention.
The next regularly method of setting in the embedded timing system that the embodiment of the invention provides in the orderly timing queue of next expiration time module 1033 execution of request mainly comprises:
Take out first node in S901, the orderly timing queue.
Concrete; Next expiration time module 1033 is set from orderly timing queue (timer chain meter), obtains the timer in the first node,, then comparand register is made as overflow value if timer chain meter is empty; And the interruption status variable is set overflows interruption, end operation then for waiting for.If timer chain meter is not empty, the timing request of then obtaining chain heading node, execution in step S902.Wherein, regularly carry expiration time and call back function in the request.
S902, judge whether mistake of timer expiration time.
Concrete, next expiration time module 1033 is set judges whether mistake of timer expiration time according to the software components of current time in system.If expiration time is mistake, then execution in step S903 promptly calls the interruption processing module that expires, then end operation.Do not have as if expiration time, then execution in step S904.
S903, call interruption processing module and carry out Interrupt Process.
Wherein, next expiration time module 1033 is set calls the associated description of the process of interruption processing module 1041 execution Interrupt Process, no longer be repeated in this description at this referring to above-mentioned step S801-S807.
S904, judge whether timer expires in time-count cycle at current hardware.
Concrete; Above-mentioned deterministic process comprises: whether the hardware component of judging the timer expiration time is greater than the time that comparand register is set; If greater than the time that comparand register is set; Judge further then whether the timer expiration time expires in time-count cycle at current hardware, if, execution in step S905 then.Otherwise, execution in step S906.Wherein, the deterministic process among the step S904 can be realized that the function of first judge module and second judge module can be included in and be provided with in the next expiration time module 1033 by first judge module in the embodiment of the invention and second judge module.
S905, the value of comparand register is made as the hardware component of expiration time.
In embodiments of the present invention; Timer setting module 1022 is made as the value of comparand register 1052 the hardware component of expiration time; And interruption status variable 1044 is set for waiting for the interruption that expires, so that comparand register 1052 arrives after date in the time that is provided with, change and interrupt flag.
S906, comparand register is made as overflow value, and the interruption status variable is set overflows interruption for waiting for.
Concrete; Timer setting module 1022 is not equal to the software components of current time in system if judge expiration time; Represent that then the timer expiration time is at current hardware after time-count cycle; Therefore comparand register 1052 is made as overflow value, and the interruption status variable is set overflows interruption, end operation then for waiting for.
Referring to Figure 11, Figure 11 is that the embedded timing system that the embodiment of the invention provides is carried out the regularly method flow diagram of request of cancellation.
Shown in figure 11, the method that the embedded timing system that the embodiment of the invention provides is carried out cancellation timing request mainly comprises:
S1001, timer cancellation module 1023 receive the timer cancellation request that timer cancellation module 1013 is sent.
Concrete, embedded timing system can receive the timer cancellation request that timer cancellation module 1013 is sent, execution in step S1002 then.Wherein, carry the expiration time of the timing request that needs cancellation during cancellation is regularly asked.
Whether S1002, judgement timing request to be cancelled are positioned at the first node of timer chain meter.
Concrete, the handle that timer cancellation module 1023 obtains when timer is set is cancelled corresponding timer.Timer cancellation module 1023 is being obtained the first node of timer chain meter, is empty if judge timer chain meter, then returns mistake; Otherwise judge whether timer to be cancelled is exactly the first node of timer chain meter.
If treat cancellation regularly request be not first node, execution in step S1003 then, otherwise, execution in step S1004.
Whether S1003, judgement timing request to be cancelled are arranged in timer chain meter.
Concrete, timer cancellation module 1023 waits to cancel the first node that regularly request is not positioned at timer chain meter in judgement, judges further then whether timing request to be cancelled is arranged in timer chain meter.Be arranged in timer chain meter as if timing request to be cancelled, then execution in step S1005.If judge and treat that it is not to be in the timer chain meter that cancellation is regularly asked, then return mistake, might be to repeat cancellation to cause.
S1004, regularly request of cancellation is treated in deletion from timer chain meter, discharges storage space.
Concrete, timer cancellation module 1023 is when judgement treats that cancellation regularly asks to be first node, regularly request of cancellation, release storage space, execution in step S1006 are then treated in deletion from timer chain meter.
S1005, regularly request of cancellation is treated in deletion from timer chain meter, discharges storage space.
Concrete; Timer cancellation module 1023 is waited to cancel in judgement and is regularly asked not to be positioned at the first place of timer chain meter, but is arranged in timer chain meter, and then regularly request of cancellation is treated in deletion in the timer chain meter; Discharge storage space, return cancellation timer success message then.
S1006, judgement treat whether cancellation timing request expires.
Concrete; Timer cancellation module 1023 is when judgement treats that cancellation regularly asks to be first node; Deletion is treated cancellation regularly after the request from timer chain meter, further judge this treat cancellation regularly request whether expire, treat that cancellation regularly asks not yet due if timer cancellation module 1023 is judged; Execution in step S1007 then, otherwise execution in step S1009.
S1007, judge treat cancellation regularly request whether current hardware in time-count cycle then.
Concrete, timer cancellation module 1023 is when judgement is treated cancellation regularly request is first node, and deletion is treated cancellation regularly after the request from timer chain meter, further judge treat cancellation regularly request whether current hardware in time-count cycle then.If timer cancellation module 1023 judge this treat cancellation regularly request current hardware in time-count cycle then, execution in step S1008 then, otherwise return cancellation timer success message.
S1008, the next timing request in the timer chain meter is set.
Concrete; Timer cancellation module 1023 judgement treat cancellation regularly request current hardware in time-count cycle then; Then trigger timer setting module 1022 value of comparand register 1052 temporarily is made as current hardware timer times prior little by little, prevent in the following operating process to the interruption that the middle generation of next timing request (step S1012) is not expected is set.
S1009, will interrupt flag and empty.
Concrete, if timer cancellation module 1023 judges that waiting to cancel regularly request expires, and then will interrupt flag and empty, then execution in step S1010.
S1010, judge the current time in system the hardware component whether or will cross over the time point that overflows interruption.
Concrete; Timer cancellation module 1023 will interrupted after flag empties; Further judge hardware timer 1051 demonstration current time in system the hardware component whether or will cross over the time point that overflows interruption, as if having crossed over the time point that overflows interruption, then execution in step S1011; If will cross over the time point that overflows interruption, then wait for and cross over execution in step S1011 afterwards.If the hardware component of the current time in system of hardware timer 1051 is not to cross over the time point that overflows interruption, then execution in step S1012.
In embodiments of the present invention, the thresholding that judges whether to cross over is set according to calling the instruction cycle of overflowing interruption code.
S1011, call interruption processing module and carry out and to overflow Interrupt Process.
Concrete; Timer cancellation module 1023 is when the hardware component of the current time in system of judging hardware timer 1051 has been crossed over the time of overflowing interruption; Perhaps will cross over the time point that overflows interruption at the hardware component of judging hardware timer 1051; Then after waiting for leap, call interruption processing module 1041 execution and overflow Interrupt Process.Wherein, interruption processing module 1041 is carried out and is overflowed the associated description of the process of Interrupt Process referring to above-mentioned steps S801-S807, no longer repeats at this.
S1012, next regularly request is set.
Concrete, timer cancellation module 1023 is not to cross over the time point that overflows interruption at the hardware component of judging the current time in system that hardware timer 1051 shows, then calls next expiration time module 1033 is set, and return success.
For further understanding the embodiment of the invention, provide the typical operation of the embedded timing system that the embodiment of the invention provides below.
Referring to Figure 12, Figure 12 is the course of work synoptic diagram of the embedded timing system that provides of the embodiment of the invention.
At initial phase, comparand register is set to overflow interruption, the time point that overflows interruption generating be the hardware timer timing after 0xFFFF, before the 0x0000,, finish to 0xFFFF so a hardware begins from 0x0000 time-count cycle.
Here suppose that embedded system do not support Dram to distribute; Therefore adopted the method for static resource allocation: system initialisation phase is created an empty timer array; And generate empty timer chain meter; When setting timer, call timer_alloc and from empty timer chain meter, take out an empty timer, insert timer chain meter through the mode of orderly insertion after inserting expiration time and call back function.At initial phase, the user has set four timers equally, and the sequencing according to expiration time inserts timer chain meter.It is pointed out that if embedded system supports Dram to distribute, also can dynamic assignment and recovery resource space.
When initialization, be provided with overflow interruption generating the time; Embedded timing system module at first adds 1 with software timing variable; Visit again the first node timer 1 in the timer chain meter; And the expiration time of finding it is in current hardware time-count cycle, so comparand register is set to the hardware component of timer 1 expiration time, and with the interruption of being arranged to expire of interruption status variable.
When expiring interruption generating; From timer chain meter, eject timer 1 again; Call its call back function, visit the first node timer 2 in the timer chain meter then, the expiration time of finding it still is in current hardware time-count cycle; So comparand register is set to the hardware component of timer 2 expiration time, and with the interruption of being arranged to expire of interruption status variable.
When expiring interruption generating; From timer chain meter, eject timer 2; Call its call back function, visit the first node timer 3 in the timer chain meter then, the expiration time of finding it is not in current hardware time-count cycle; So comparand register is set to overflow time point, and the interruption status variable is arranged to overflow interruption.
When overflowing interruption generating; At first software timing variable is added 1; Visit again the first node timer 3 in the timer chain meter; And the expiration time of finding it is in current hardware time-count cycle, so comparand register is set to the hardware component of timer 3 expiration times, and with the interruption of being arranged to expire of interruption status variable.
The rest may be inferred, and when the interruption generating of comparand register, disconnected therein the processing in the function all need be set next value of relatively depositing it, and this value possibly be the interruption that expires, and also possibly be to overflow interruption, and this drives the timing and the timing of embedded timing system.
The beneficial effect of the present invention's mixing timer is that it not only can realize high-precision timing of long span and clocking capability, can also be by each module reuse, setting when supporting a plurality of timer; And; It need only use among the MCU in the hardware timer one relatively passage; The lowest to hardware resource; Therefore it is adapted at realizing on the rare embedded system of hardware resource, and the system cross platform transplantability that uses this to mix timer is very strong, and its break pin also than general software timer lack many.
One of ordinary skill in the art will appreciate that all or part of flow process that realizes in the foregoing description method; Be to instruct relevant hardware to accomplish through computer program; Program can be stored in the computer read/write memory medium; This program can comprise the flow process like the embodiment of above-mentioned each side method when carrying out.Wherein, storage medium can be magnetic disc, CD, read-only storage memory body (Read-Only Memory, ROM) or at random store memory body (Random Access Memory, RAM) etc.
More than timing method, device and the system of embedded system that the embodiment of the invention is provided carried out detailed introduction; For one of ordinary skill in the art; Thought according to the embodiment of the invention; The part that on embodiment and range of application, all can change, this description should not be construed as limitation of the present invention.

Claims (18)

1. the timing method of an embedded system is characterized in that, comprising:
Receive the first regularly request, said first regularly carries timer expiration time t1 and call back function in the request;
Whether the value t2 of software components that judges the current time in system is early than said timer expiration time t1;
If t2 is early than t1, then according to judging whether said t1 expires in time-count cycle at current hardware the time-count cycle of t2 and hardware timer;
If t1 expires in time-count cycle at current hardware, then the value of comparand register is set to the hardware component of said expiration time t1;
Receive the interruption that expires that said comparand register sends, call the call back function that carries in the said first timing request.
2. timing method according to claim 1 is characterized in that, also comprises:
If t1 do not expire in time-count cycle at current hardware, then when next hardware arrives time-count cycle, return execution and judge that according to the software components t2 of current time in system and t1 whether said first regularly ask in current hardware then step in time-count cycle.
3. timing method according to claim 1 is characterized in that, also comprises:
Whether the hardware component of judging said t1 is greater than comparand register required time t3 is set;
If said t2 is early than t1, then according to judging that whether t1 expires in time-count cycle at current hardware, comprising the time-count cycle of t2 and hardware timer:
If t2 is early than t1, and the hardware component of said t1 is greater than t3, then according to judging whether said t1 expires in time-count cycle at current hardware the time-count cycle of t2 and hardware timer.
4. timing method according to claim 1 is characterized in that,
Early than t1, and judge that said t1 whether between current hardware expired in time-count cycle, also comprises said time-count cycle at said judgement t2 according to t2 and hardware timer:
Regularly ask to join in the orderly timer queue with said first according to the sequencing of expiration time;
Judge receive said first regularly request whether be positioned at the first node of said orderly timer queue, if then trigger and judge that t1 is whether in current hardware overdue step in time-count cycle said time-count cycle according to t2 and hardware timer.
5. timing method according to claim 4 is characterized in that, said call first call back function that regularly carry in the request after, also comprise,
Regularly request of deletion said first from said orderly timer queue.
6. timing method according to claim 5 is characterized in that, after the said first timing request of deletion, also comprises from orderly timer queue said:
Obtain the second regularly request of the first node of said orderly timer queue; Return carry out judge the current time in system software components t2 whether early than said second step of the expiration time t5 of request regularly, said second carries timer expiration time t5 and call back function in regularly asking.
7. the timing device of an embedded system is characterized in that, comprising:
Regularly ask receiver module, be used to receive the first regularly request, said first regularly carries timer expiration time t1 and call back function in the request;
First judge module is connected with said timing request receiver module, and whether the software components t2 that is used to judge the current time in system is early than said timer expiration time t1;
Second judge module is connected with said first judge module, is used at said t2 early than said t1, then according to judging whether said t1 expires in time-count cycle at current hardware the time-count cycle of t2 and hardware timer;
Register is provided with module, is connected with the comparand register and second judge module respectively, is used for judging t1 when current hardware expired in time-count cycle, and then the value of comparand register is set to the hardware component of said t1;
The interruption processing module that expires respectively with comparand register and regularly ask receiver module to be connected, is used to receive interruptions that expire that said comparand register sends, and calls the call back function that said first timing is carried in asking.
8. device according to claim 7 is characterized in that, also comprises:
Formation adds module, is connected with first judge module, is used for, regularly asking to join in the orderly timer queue according to the sequencing of expiration time with said first during early than said t1 at said t2;
The 3rd judge module is used to judge whether the said first timing request that receives is positioned at the first node of said orderly timer queue;
First trigger module; Be connected with second judge module and the 3rd judge module respectively; Be used for when said the 3rd judge module judges that the said first timing request is positioned at the first node of said orderly timer queue, triggering said second judge module according to judging whether said t1 expires in time-count cycle at current hardware the time-count cycle of t2 and hardware timer.
9. timing device according to claim 8 is characterized in that, also comprises:
The formation removing module is connected with the interruption processing module that expires, and is used for after the call back function that the first timing request of calling of the said interruption processing module that expires is carried regularly request of deletion said first from said orderly timer queue.
10. timing device according to claim 8 is characterized in that, also comprises:
Second trigger module; Be connected with said second judge module, the 3rd judge module respectively; Be used for judging that at said second judge module t1 does not expire in time-count cycle at current hardware; And the 3rd judge module judges that said first regularly asks to be positioned at the first node of said orderly timer queue; Then when next hardware arrives time-count cycle, trigger second judge module according to the software components t2 of current time in system and t1 judge said first regularly request whether current hardware in time-count cycle then.
11. an embedded timing system is characterized in that, comprising:
Hardware timer is used for generation time-count cycle of every separated hardware and overflows interruption;
With the software timer that said hardware timer is connected, said software timer is used for the software components of interrupting providing the current time in system of overflowing according to said hardware timer;
With the comparand register that said hardware timer is connected, said comparand register is used for when the time of setting expires, producing the interruption that expires;
Regularly ask receiver module, be used to receive the first regularly request, said first regularly carries timer expiration time t1 and call back function in the request;
First judge module is connected with said timing request receiver module, software timer respectively, and whether the software components t2 that is used to judge the current time in system is early than said timer expiration time t1;
Second judge module is connected with said first judge module, is used at said t2 early than said t1, then according to judging whether said t1 expires in time-count cycle at current hardware the time-count cycle of t2 and hardware timer;
Register is provided with module, is connected with said comparand register, second judge module respectively, is used at t1 when current hardware expired in time-count cycle, and then the value of comparand register is set to the hardware component of said t1;
The interruption processing module that expires respectively with comparand register and regularly ask receiver module to be connected, is used to receive interruptions that expire that said comparand register sends, and calls the call back function that said first timing is carried in asking.
12. embedded timing system according to claim 11 is characterized in that, also comprises:
Formation adds module, is connected with first judge module, is used for, regularly asking to join in the orderly timer queue according to the sequencing of expiration time with said first during early than said t1 at said t2;
The 3rd judge module is used to judge whether the said first timing request that receives is positioned at the first node of said orderly timer queue;
First trigger module; Be connected with second judge module and the 3rd judge module respectively; Be used for when said the 3rd judge module judges that the said first timing request is positioned at the first node of said orderly timer queue, triggering said second judge module according to judging whether said t1 expires in time-count cycle at current hardware the time-count cycle of t2 and hardware timer.
13. embedded timing system according to claim 12 is characterized in that, also comprises:
The formation removing module is connected with the interruption processing module that expires, and is used for after the call back function that the first timing request of calling of the said interruption processing module that expires is carried regularly request of deletion said first from said orderly timer queue.
14. embedded timing system according to claim 13 is characterized in that, also comprises:
The formation update module; Be connected with said second judge module, said formation removing module respectively; Be used at said formation removing module after said orderly timer queue deletion said first is regularly asked; Then obtain the second regularly request of the first node of said orderly timer queue; Trigger software components t2 that said second judge module judges the current time in system whether early than said second expiration time of request regularly, said second regularly carries timer expiration time and call back function in the request.
15. embedded timing system according to claim 14 is characterized in that,
Said software timer also is used for having no progeny receiving overflowing that said hardware timer sends, and triggers the second regularly request that said formation update module is obtained the first node of said orderly timer queue.
16. embedded timing system according to claim 12 is characterized in that, also comprises:
Second trigger module; Be connected with said second judge module, the 3rd judge module respectively; Be used for judging that at said second judge module t1 does not expire in time-count cycle at current hardware; And said the 3rd judge module judges that said first regularly asks to be positioned at the first node of said orderly timer queue; Then when next hardware arrives time-count cycle, trigger second judge module according to the software components t2 of current time in system and t1 judge said first regularly request whether current hardware in time-count cycle then.
17. according to each described embedded timing system of claim 11-16, it is characterized in that, also comprise:
Regularly module is cancelled in request; Be connected with said formation removing module; Be used for receiving regularly request of cancellation; Carry the expiration time t9 that needs the 3rd of cancellation regularly to ask in the said cancellation timing request, said timing request cancellation module also is used for triggering said formation removing module from regularly request of orderly timer queue deletion the 3rd;
Said formation removing module also is used for from regularly request of orderly timer queue deletion the said the 3rd.
18. embedded timing system according to claim 17 is characterized in that, also comprises:
The 4th judge module is connected with said timing request cancellation module, is used to judge that the said the 3rd regularly asks whether to be positioned at the first node of said orderly timer queue;
Said second judge module also is connected with said the 4th judge module; Be used for when said the 4th judge module is judged the said the 3rd regularly request is positioned at the first node of said orderly timer queue, then according to the software components t10 of current time in system with judge whether said t9 expires in time-count cycle at current hardware the time-count cycle of hardware timer;
Said register is provided with module and is used for also judging that at said second judge module said t9 expires in time-count cycle at current hardware that then the value with said comparand register empties;
The 3rd trigger module; With said register module is set respectively, the formation update module is connected; Be used for after said register is provided with module the value of said comparand register is emptied, triggering the second regularly request that said formation update module is obtained the first node of said orderly timer queue.
CN201110038648.4A 2011-02-15 2011-02-15 Method, device and system for timing embedded system Expired - Fee Related CN102637126B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110038648.4A CN102637126B (en) 2011-02-15 2011-02-15 Method, device and system for timing embedded system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110038648.4A CN102637126B (en) 2011-02-15 2011-02-15 Method, device and system for timing embedded system

Publications (2)

Publication Number Publication Date
CN102637126A true CN102637126A (en) 2012-08-15
CN102637126B CN102637126B (en) 2015-05-13

Family

ID=46621529

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110038648.4A Expired - Fee Related CN102637126B (en) 2011-02-15 2011-02-15 Method, device and system for timing embedded system

Country Status (1)

Country Link
CN (1) CN102637126B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104834347A (en) * 2015-04-29 2015-08-12 杭州东信捷峻科技有限公司 Implementation method for dynamic time duration timer in favor of low power consumption and free of accumulated error
CN108196934A (en) * 2016-12-08 2018-06-22 阿里巴巴集团控股有限公司 The time set method, apparatus and virtual equipment of a kind of timer
CN109413725A (en) * 2018-11-07 2019-03-01 漳州立达信光电子科技有限公司 Extend the method, device and equipment of low-power consumption internet of things equipment battery
WO2019140551A1 (en) * 2018-01-16 2019-07-25 深圳市汇顶科技股份有限公司 Timer implementation method and device
CN111240815A (en) * 2020-01-03 2020-06-05 杭州涂鸦信息技术有限公司 Infrared signal modulation method and system based on linux
CN111562809A (en) * 2020-04-15 2020-08-21 漳州市德恒电子有限公司 Movement stability control method applied to four-stage driving

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1877535A (en) * 2006-07-07 2006-12-13 浙江大学 Timing method for high efficient traverse of embedded real-time operating system
US20080201500A1 (en) * 2007-02-20 2008-08-21 Ati Technologies Ulc Multiple interrupt handling method, devices and software
CN101299193A (en) * 2008-04-07 2008-11-05 谢维信 Method for enhancing computer inner core timer control precision

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1877535A (en) * 2006-07-07 2006-12-13 浙江大学 Timing method for high efficient traverse of embedded real-time operating system
US20080201500A1 (en) * 2007-02-20 2008-08-21 Ati Technologies Ulc Multiple interrupt handling method, devices and software
CN101299193A (en) * 2008-04-07 2008-11-05 谢维信 Method for enhancing computer inner core timer control precision

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104834347A (en) * 2015-04-29 2015-08-12 杭州东信捷峻科技有限公司 Implementation method for dynamic time duration timer in favor of low power consumption and free of accumulated error
CN104834347B (en) * 2015-04-29 2017-08-25 杭州东信捷峻科技有限公司 Be conducive to the dynamic duration timer realization method without cumulative errors of low-power consumption
CN108196934A (en) * 2016-12-08 2018-06-22 阿里巴巴集团控股有限公司 The time set method, apparatus and virtual equipment of a kind of timer
CN108196934B (en) * 2016-12-08 2022-04-26 阿里巴巴集团控股有限公司 Timing setting method and device of timer and virtualization equipment
WO2019140551A1 (en) * 2018-01-16 2019-07-25 深圳市汇顶科技股份有限公司 Timer implementation method and device
CN109413725A (en) * 2018-11-07 2019-03-01 漳州立达信光电子科技有限公司 Extend the method, device and equipment of low-power consumption internet of things equipment battery
CN109413725B (en) * 2018-11-07 2021-05-28 漳州立达信光电子科技有限公司 Method, device and equipment for prolonging service life of battery of low-power-consumption Internet of things equipment
CN111240815A (en) * 2020-01-03 2020-06-05 杭州涂鸦信息技术有限公司 Infrared signal modulation method and system based on linux
CN111240815B (en) * 2020-01-03 2023-09-26 杭州涂鸦信息技术有限公司 Infrared signal modulation method and system based on linux
CN111562809A (en) * 2020-04-15 2020-08-21 漳州市德恒电子有限公司 Movement stability control method applied to four-stage driving
CN111562809B (en) * 2020-04-15 2023-03-31 漳州市德恒电子有限公司 Movement stability control method applied to four-stage driving

Also Published As

Publication number Publication date
CN102637126B (en) 2015-05-13

Similar Documents

Publication Publication Date Title
CN102637126B (en) Method, device and system for timing embedded system
May Occam
US8301872B2 (en) Pipeline configuration protocol and configuration unit communication
CN114586004A (en) Quiescing reconfigurable data processors
CN105991463B (en) Method, message main node, token server and system for realizing flow control
US20140325175A1 (en) Pipeline configuration protocol and configuration unit communication
CN101770362B (en) Distributed dynamic process generating unit meeting System C processor
US20090055837A1 (en) Real-Time Distributed Processor Environment
CN102880473A (en) Method and device for task execution based on quartz framework
CN103970714A (en) Apparatus and method for sharing function logic and reconfigurable processor thereof
CN102334108A (en) Processor with assignable general purpose register set
CN102982145A (en) System for allocating database operating requests
Volz et al. Timing issues in the distributed execution of Ada programs
US6993766B2 (en) Integrated circuits for multi-tasking support in single or multiple processor networks
CN103942155B (en) Memory block control method and device
CN103593148A (en) CDF side off-line call ticket data quick access method and device
US20040148483A1 (en) Configurable memory system
CN103399949B (en) A kind of database storage block state control method and device
EP0287600A1 (en) Method and device to execute two instruction sequences in an order determined in advance.
KR20190118521A (en) Method and device for error handling in a communication between distributed software components
Worley A Portable Implementation of Partitioned Point-To-Point Communication Primitives
KR100401560B1 (en) Kernel Stack Dynamic Allocation Method In Operating System
Shang Asynchronous communication circuits: Design, test, and synthesis
Butenuth The COSY–Kernel as an Example for Efficient Kernel Call Mechanisms on Transputers
Pi et al. Modeling AADL data communication with BIP

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20190718

Address after: 214135 9th Building, Gemini A Building, No. 18 Zhenze Road, Xinwu District, Wuxi City, Jiangsu Province

Patentee after: WSN TECH LTD.

Address before: Wuxi District of Jiangsu city of Wuxi province Zhenze road 214135 No. 18 Wuxi Software Park Gemini A

Co-patentee before: Wuxi High-tech micro-nano sensor Network Engineering Technology Research & Development Center, Chinese Academy of Sciences

Patentee before: Wuxi Research Institute of Internet of Things

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20191009

Address after: 214135 8 / F, building a, Gemini, Wuxi Software Park, No. 18, Zhenze Road, Xinwu District, Wuxi City, Jiangsu Province

Patentee after: Jiangsu perceptual HengAn Technology Co.,Ltd.

Address before: 214135 9th Building, Gemini A Building, No. 18 Zhenze Road, Xinwu District, Wuxi City, Jiangsu Province

Patentee before: WSN TECH LTD.

CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20150513