IP Library Granted Patent US 8,872,548
Granted Patent B2
US 8,872,548 · App. 14/034,909 · Granted Oct 28, 2014

Method and apparatus for calibrating low frequency clock

View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 8,872,548
App. No.
14/034,909
Granted
Oct 28, 2014
Kind
B2
Abstract

A method and an apparatus for calibrating a low frequency clock are disclosed. The method includes: calculating a frequency of a low frequency clock in a current low frequency clock calibration; and calculating an average value of low frequency clock frequencies in n clock calibrations before the current calibration, where n is greater than 1 and is an integer; judging whether a difference between the frequency of the low frequency clock in the current low frequency clock calibration and the average value is smaller than a preset threshold for the difference; and if the difference between the frequency of the low frequency clock in the current low frequency clock calibration and the average value is smaller than the preset threshold for the difference, calculating the number of sleep cycles according to the calculated and obtained frequency of the low frequency clock in the current low frequency clock calibration.

Claims (26)

1. A method for calibrating a low frequency clock, comprising:

calculating a frequency of a low frequency clock in a current low frequency clock calibration;

calculating an average value of low frequency clock frequencies in n low frequency clock calibrations before the current low frequency clock calibration, wherein n is greater than 1 and is an integer;

judging whether a difference between the frequency of the low frequency clock in the current low frequency clock calibration and the average value is smaller than a preset threshold for the difference; and

calculating the number of sleep cycles according to the calculated and obtained frequency of the low frequency clock in the current low frequency clock calibration when the difference between the frequency of the low frequency clock in the current low frequency clock calibration and the average value is smaller than the preset threshold for the difference.

2. The method according to claim 1 , further comprising returning to the calculation step and re-performing a low frequency clock calibration when it is judged that the difference between the frequency of the low frequency clock in the current low frequency clock calibration and the average value is not smaller than the preset threshold for the difference.

3. The method according to claim 1 , wherein calculating the frequency of the low frequency clock in the current low frequency clock calibration comprises:

starting a low frequency clock counter and a high frequency clock counter;

determining the number M of high frequency clock cycles corresponding to preset N low frequency clock cycles;

calculating a ratio of the number of low frequency clock cycles N to the number of high frequency clock cycles M; and

using the ratio as the frequency of the low frequency clock in the current low frequency clock calibration, wherein N and M are integers greater than 1.

4. An apparatus for calibrating a low frequency clock, comprising:

a first calculating unit configured to calculate a frequency of a low frequency clock in a current low frequency clock calibration and calculate an average value of low frequency clock frequencies in n clock calibrations before the current low frequency clock calibration, wherein n is greater than 1 and is an integer;

a judging unit configured to judge whether a difference between the frequency of the low frequency clock in the current low frequency clock calibration and the average value is smaller than a preset threshold for the difference; and

a second calculating unit configured to calculate the number of sleep cycles according to the calculated and obtained frequency of the low frequency clock in the current low frequency clock calibration when the difference between the frequency of the low frequency clock in the current low frequency clock calibration and the average value is smaller than the preset threshold for the difference.

5. The apparatus according to claim 4 , further comprising a processing unit configured to control the calculating units to restart a low frequency clock calibration when it is judged that the difference between the frequency of the low frequency clock in the current low frequency clock calibration and the average value is not smaller than the preset threshold for the difference.

6. The apparatus according to claim 4 , wherein the first calculating unit comprises:

a starting subunit configured to start a low frequency clock counter and a high frequency clock counter;

a determining subunit configured to determine the number M of high frequency clock cycles corresponding to preset N low frequency clock cycles;

a first calculating subunit configured to calculate a ratio of the number of low frequency clock cycles N to the number of high frequency clock cycles M, and use the ratio as the frequency of the low frequency clock in the current low frequency clock calibration, wherein N and M are integers greater than 1; and

a second calculating subunit configured to calculate an average value of low frequency clock frequencies in preset n low frequency clock calibrations before the current low frequency clock calibration, wherein n is greater than 1 and is an integer.

7. The apparatus according to claim 5 , wherein the first calculating unit comprises:

a starting subunit configured to start a low frequency clock counter and a high frequency clock counter;

a determining subunit configured to determine the number M of high frequency clock cycles corresponding to preset N low frequency clock cycles;

a first calculating subunit configured to calculate a ratio of the number of low frequency clock cycles N to the number of high frequency clock cycles M, and use the ratio as the frequency of the low frequency clock in the current low frequency clock calibration, wherein N and M are integers greater than 1; and

a second calculating subunit configured to calculate an average value of low frequency clock frequencies in preset n low frequency clock calibrations before the current low frequency clock calibration, wherein n is greater than 1 and is an integer.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 13, 2021
From: HUAWEI TECHNOLOGIES CO., LTD.
To: HONOR DEVICE CO., LTD.
Reel/Frame 055919/0344 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 1, 2013
From: LIU, DONGSHENG; LIU, YU
To: HUAWEI TECHNOLOGIES CO., LTD.
Reel/Frame 031318/0460 →