Processing method for solving problem of time interleaving of timer during frequency measurement through cycle measuring method
A technology for measuring frequency and processing method, which is applied in the field of processing the problem of timer sequence interleaving when measuring frequency by using the cycle measurement method, which can solve problems such as strong interference fluctuation and achieve the effect of avoiding carry
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0045] refer to figure 1, the hardware background in this embodiment is: multi-stage cascading of timers, without hardware capture function. use figure 1 In the process shown, the read high and low data of the timer completely avoids the situation of interspersed carry and ensures the correct length of the subsequent calculation cycle. The selection of the limit X should ensure that: if the condition in c) is not satisfied, no timer carry will occur between a) and b). Among them, "high bits at all levels" means that if the timers are cascaded to more than two levels, they are collectively referred to as "high bits at all levels" except for the lowest level.
[0046] In this case, the method for dealing with the timing interleaving problem of the timer when measuring the frequency by the cycle measurement method includes the following steps:
[0047] a) Read the high-order timer;
[0048] b) read the low timer;
[0049] c) If the read value of the low-order timer is less t...
Embodiment 2
[0051] refer to figure 2 , the hardware background in this embodiment is: multi-stage cascading of timers, and its low bits have hardware capture functions. Used in the capture interrupt routine figure 2 In the flow shown, when there is a possibility of a carry immediately after the capture time, the final high value of the timer obtained is actually the value before the capture, which also completely avoids the interspersed carry and ensures the correct length of the subsequent calculation cycle .
[0052] In this case, the method for dealing with the timing interleaving problem of the timer when measuring the frequency by the cycle measurement method includes the following steps:
[0053] a) Take the capture value as the low bit of this timing value, and this step can also be moved to any moment before the low bit of this timing value is used later;
[0054] b) Read the high-order timer and temporarily use it as the high-order value of this timing value;
[0055] c) re...
Embodiment 3
[0062] refer to image 3 , the hardware and software background in the present embodiment is: the timer has a hardware capture function, and when the timer overflows, an interrupt can be generated, and the variable V is incremented in the timer overflow interrupt service routine. Used in the capture interrupt program (interrupts are turned off when entering) image 3 The flow shown obtains V and vbak for use below. When there is a possibility that the timer is full and overflows immediately before and after the capture time, it can be guaranteed that the finally obtained vbak is actually the theoretical value before capture, and also completely avoids the occurrence of errors due to timing interleaving.
[0063] In this case, the method of dealing with the timing interleaving problem of the timer when measuring the frequency by the cycle measurement method, the operation of reading the current timing value in the capture interrupt includes the following steps:
[0064] a) Fo...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More - R&D
- Intellectual Property
- Life Sciences
- Materials
- Tech Scout
- Unparalleled Data Quality
- Higher Quality Content
- 60% Fewer Hallucinations
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2025 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com
