CN111934678B - Method for automatically calibrating clock frequency in chip and related product - Google Patents

Method for automatically calibrating clock frequency in chip and related product Download PDF

Info

Publication number
CN111934678B
CN111934678B CN202011040947.7A CN202011040947A CN111934678B CN 111934678 B CN111934678 B CN 111934678B CN 202011040947 A CN202011040947 A CN 202011040947A CN 111934678 B CN111934678 B CN 111934678B
Authority
CN
China
Prior art keywords
oscillator
frequency
parameter
ref
calibration module
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.)
Active
Application number
CN202011040947.7A
Other languages
Chinese (zh)
Other versions
CN111934678A (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.)
Shenzhen Injoinic Technology Co Ltd
Original Assignee
Shenzhen Injoinic Technology Co Ltd
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 Shenzhen Injoinic Technology Co Ltd filed Critical Shenzhen Injoinic Technology Co Ltd
Priority to CN202011040947.7A priority Critical patent/CN111934678B/en
Priority to CN202110210274.3A priority patent/CN114285409A/en
Publication of CN111934678A publication Critical patent/CN111934678A/en
Application granted granted Critical
Publication of CN111934678B publication Critical patent/CN111934678B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03LAUTOMATIC CONTROL, STARTING, SYNCHRONISATION OR STABILISATION OF GENERATORS OF ELECTRONIC OSCILLATIONS OR PULSES
    • H03L7/00Automatic control of frequency or phase; Synchronisation
    • H03L7/06Automatic control of frequency or phase; Synchronisation using a reference signal applied to a frequency- or phase-locked loop
    • H03L7/08Details of the phase-locked loop
    • H03L7/099Details of the phase-locked loop concerning mainly the controlled oscillator of the loop
    • H03L7/0991Details of the phase-locked loop concerning mainly the controlled oscillator of the loop the oscillator being a digital oscillator, e.g. composed of a fixed oscillator followed by a variable frequency divider
    • H03L7/0992Details of the phase-locked loop concerning mainly the controlled oscillator of the loop the oscillator being a digital oscillator, e.g. composed of a fixed oscillator followed by a variable frequency divider comprising a counter or a frequency divider

Landscapes

  • Stabilization Of Oscillater, Synchronisation, Frequency Synthesizers (AREA)

Abstract

The embodiment of the application provides an on-chip clock frequency automatic calibration method and a related product, wherein the on-chip clock frequency automatic calibration method comprises the following steps: the calibration module obtains N contained in the reference clock generationrefOne periodA reference level of; the calibration module counts the width of the reference level through the current clock of the oscillator and includes NoA period of time; if the theoretical number of cycles NosAnd NoThe absolute value of the difference value is greater than a set error DN, and the calibration module adjusts a frequency control parameter through the parameter adjusting module, wherein the frequency control parameter is used for changing the current frequency of the oscillator; n is a radical ofosReference frequency based on reference clock, target frequency of oscillator and NrefDetermining; if N is presentosAnd NoThe absolute value of the difference value is less than the set error DN, and the calibration module determines that the oscillator is calibrated successfully. The embodiment of the application can shorten the calibration time of the clock frequency in the chip.

Description

Method for automatically calibrating clock frequency in chip and related product
Technical Field
The application relates to the technical field of chips, in particular to an automatic calibration method for clock frequency in a chip and a related product.
Background
A clock (clock) is an indispensable component of a chip as a unified bar of a sequential circuit. There are generally two methods for designing the clock source of the chip. One is to hang a quartz crystal oscillator outside the chip, and to provide a clock source for the chip through the chip pin input, which has the advantages of accurate clock frequency and high cost. The other method is to design an oscillator circuit in a chip to generate a clock, which has the advantages of high integration level and low cost, and has the defect that the period of the oscillator can change along with process deviation or voltage and temperature change, so that the individual difference of the clock frequency on a plurality of chips is large. This is particularly important for internal oscillator frequency calibration.
Fig. 1 shows a conventional clock frequency calibration scheme. The existing calibration scheme is to divide a clock generated by an Oscillator (OSC) inside a chip to a kilohertz (KHz) level, output the clock to the outside of the chip through a chip pin, sample the divided clock by using an accurate clock at a megahertz (MHz) level outside the chip, and calculate the actual frequency of the divided clock; then, adjusting the frequency parameters inside the chip according to the deviation direction and amplitude of the actual frequency and the target frequency, generating a new clock frequency by the oscillator under the new frequency parameters, and measuring the current oscillator frequency outside the chip again; this loops until the frequency calibration parameters are found so that the frequency of the clock oscillator coincides with the target frequency, and the calibration process is complete.
However, the applicant has found that the prior art has the following disadvantages:
1. when the frequency of the internal oscillator is high, due to the speed limitation of the chip pin, the high-frequency clock signal cannot be directly output to the outside of the chip, and the frequency needs to be divided to a low frequency before being released.
2. When a low-frequency clock is measured outside a chip, because the period of the low-frequency clock is long, the time consumed for measuring one period is long, and in order to achieve the accuracy of measurement, a plurality of periods of the low-frequency clock are measured and then averaged, so that the test time and the chip test cost are obviously increased.
3. The result of measurement and calculation outside the chip needs to be fed back to the inside of the chip through a special communication interface, so that a peripheral test circuit of the chip is complex.
Disclosure of Invention
The embodiment of the application provides an automatic calibration method of clock frequency in a chip and a related product, which can finish the automatic calibration of the clock frequency in the chip, shorten the calibration time, save peripheral test circuits, effectively shorten the chip test time and reduce the chip test cost.
A first aspect of an embodiment of the present application provides a method for automatically calibrating a clock frequency in a chip, where the chip is externally connected to a calibrated reference clock, the chip includes an oscillator, a calibration module, and a parameter adjustment module, and the method includes:
the calibration module obtains the reference clock generated to include NrefA reference level for each period;
the calibration module counts N contained in the width of the reference level through the current clock of the oscillatoroA period of time;
if the theoretical number of cycles NosAnd said NoThe absolute value of the difference value is greater than a set error DN, and the calibration module adjusts a frequency control parameter through the parameter adjustment module, wherein the frequency control parameter is used for changing the current frequency of the oscillator; said N isosBased on a reference frequency of the reference clock, a target frequency of the oscillator, and the NrefDetermining;
if said N isosAnd said NoIs less than the set error DN, the calibration module determines that the oscillator calibration is successful.
The reference clock in the embodiment of the present application may be calibrated, the clock frequency of the reference clock may be used for the chip to reference, and the clock frequency of the reference clock may also be referred to as the reference frequency. The reference clock may be from the clock of the oscillator of other calibrated chips, or may be from a crystal oscillator, and the embodiments of the present application are not limited.
Further, the calibration module calculates the theoretical number of cycles N of the oscillator according to the following formulaos
Nos=(fosc/fref)* Nref
Wherein f isoscIs the target frequency of the oscillator, frefIs the reference frequency of the reference clock.
Further, after the calibration module adjusts the frequency control parameter through the parameter adjustment module, the method further includes: the calibration module continues to perform the acquiring the reference clock generation including NrefA step of counting the reference level by the current clock of the oscillator for a period of NoAnd (5) a periodic step.
Further, the number N of the theoretical cyclesosAnd said NoThe absolute value of the difference value is greater than a set error DN, and the calibration module adjusts the frequency control parameter through the parameter adjustment module, including:
if N is presentO-NOS>DN, the calibration module increases the current frequency parameter of the oscillator by a minimum adjustable unit through the parameter adjustment module so as to reduce the current frequency of the oscillator;
if N is presentOS-NO>DN, the calibration module reduces the current frequency parameter of the oscillator by a minimum adjustable unit through the parameter adjustment module so as to increase the current frequency of the oscillator.
Further, if NO-NOS>DN, the calibration module adjusts the frequency of the oscillator through the parameter adjustment moduleAfter increasing the previous frequency parameter by a minimum adjustable unit to decrease the current frequency of the oscillator, the method further comprises:
if N is presentOS-NO>DN, the calibration module determines that the oscillator calibration failed.
Further, if NOS-NO>DN, the calibration module reduces the current frequency parameter of the oscillator by a minimum adjustable unit through the parameter adjustment module, so as to increase the current frequency of the oscillator, and the method further comprises:
if N is presentO-NOS>DN, the calibration module determines that the oscillator calibration failed.
Further, the method further comprises:
in the case that the frequency control parameter is increased to the maximum, if N isO-NOS>DN, the calibration module determining that the oscillator calibration failed;
in the case that the frequency control parameter is reduced to a minimum, if NOS-NO>DN, the calibration module determines that the oscillator calibration failed.
Further, said NrefDetermined according to the following formula:
Nref≥fref/[β*(1-α)* fosc];
wherein f isoscIs the target frequency of the oscillator, frefAnd taking the reference frequency of the reference clock, wherein alpha is the deviation error of the current frequency of the oscillator and the target frequency, and beta is the statistical error of the reference level counted by the calibration module through the current clock of the oscillator.
Further, the setting error DN is determined according to the following formula:
DN= Nref* fosc*γ/fref
wherein f isoscIs the target frequency of the oscillator, frefγ is a frequency adjustment accuracy of the oscillator.
Further, the calibration module obtains the reference clock generated including NrefBefore the reference level of one cycle, the method further comprises:
the calibration module receives a calibration starting signal, and the calibration starting signal is used for indicating the calibration module to enter a waiting state from an idle state;
and after the calibration module enters a waiting state for a preset time, switching from the waiting state to a calibration state.
Further, after the calibration module increases the current frequency parameter of the oscillator by a minimum adjustable unit through the parameter adjustment module to decrease the current frequency of the oscillator, the method includes:
the calibration module enters the wait state.
Further, after the calibration module reduces the current frequency parameter of the oscillator by a minimum adjustable unit through the parameter adjustment module to increase the current frequency of the oscillator, the method includes:
the calibration module enters the wait state.
Further, after the calibration module determines that the oscillator calibration is successful, the method further comprises:
the calibration module enters the idle state.
Further, after the calibration module determines that the oscillator calibration failed, the method further comprises:
the calibration module enters the idle state.
Further, the calibration module obtains the reference clock generated including NrefA reference level of one period, the calibration module counts N included in the width of the reference level through the current clock of the oscillatoroA cycle comprising:
the calibration module counts N contained in the width of the reference level through the reference clockrefA period within which the reference level is counted by the current clock of the oscillatorContaining NoAnd (4) one period.
Further, before the calibration module increases the current frequency parameter of the oscillator by the minimum adjustable unit through the parameter adjustment module to decrease the current frequency of the oscillator, the method further includes:
if N is presentO-NOS>DN, the calibration module determines NO-NOSWhether it is less than a first threshold;
in NO-NOSIf the current frequency parameter is smaller than the first threshold, the calibration module executes the step of increasing the current frequency parameter of the oscillator by a minimum adjustable unit through the parameter adjustment module;
before the calibration module reduces the current frequency parameter of the oscillator by a minimum adjustable unit through the parameter adjustment module to increase the current frequency of the oscillator, the method further includes:
if N is presentOS-NO>DN, the calibration module determines NOS-NOWhether less than a second threshold;
in NOS-NOAnd if the current frequency parameter is smaller than the second threshold, the calibration module executes the step of reducing the current frequency parameter of the oscillator by a minimum adjustable unit through the parameter adjustment module.
Further, the method further comprises:
in NO-NOSIf the difference value is greater than the first threshold value, the calibration module determines N according to the mapping from the difference value set to the minimum adjustable unit number setO-NOSCorresponding N minimum adjustable units, wherein N is greater than or equal to 2;
the calibration module increases the current frequency parameter of the oscillator by the N target adjustable units through the parameter adjustment module to reduce the current frequency of the oscillator;
in NOS-NOIf the difference value is larger than the second threshold value, the calibration module is used for collecting the difference value to a minimum adjustable unit number collectionIs determined with NOS-NOCorresponding M minimum tunable units, wherein M is greater than or equal to 2;
the calibration module reduces the current frequency parameter of the oscillator by the M target adjustable units through the parameter adjusting module so as to increase the current frequency of the oscillator;
wherein the set of differences comprises at least two differences and the set of minimum number of tunable units comprises at least two minimum numbers of tunable units; the mapping of the at least two difference values to the at least two minimum number of tunable units is a monotonically increasing function.
In a second aspect of the present invention, a chip is provided, where the chip includes an oscillator, a calibration module and a parameter adjustment module, and the chip is externally connected to a calibrated reference clock;
the calibration module is used for acquiring the reference clock generated NrefA reference level for each period;
the calibration module is further used for counting that the width of the reference level contains N through the current clock of the oscillatoroA period of time;
the calibration module is also used for calibrating the calibration module at the theoretical period number NosAnd said NoUnder the condition that the absolute value of the difference value is greater than a set error DN, adjusting a frequency control parameter through the parameter adjusting module, wherein the frequency control parameter is used for changing the current frequency of the oscillator; said N isosBased on a reference frequency of the reference clock, a target frequency of the oscillator, and the NrefDetermining;
the calibration module is further used for calibrating the reference voltage at the NosAnd said NoIs less than the set error DN, it is determined that the oscillator calibration is successful.
In a third aspect of the present invention, a calibration module for calibrating a clock frequency in a chip is provided, where the chip is externally connected to a calibrated reference clock, the chip includes an oscillator, the calibration module and a parameter adjustment module, and the calibration module includes:
an acquisition unit for acquiring the reference timeClock generation including NrefA reference level for each period;
a counting unit for counting N included in the width of the reference level by the current clock of the oscillatoroA period of time;
a parameter adjusting unit for adjusting the parameter at the theoretical cycle number NosAnd said NoUnder the condition that the absolute value of the difference value is greater than a set error DN, adjusting a frequency control parameter through the parameter adjusting module, wherein the frequency control parameter is used for changing the current frequency of the oscillator; said N isosBased on a reference frequency of the reference clock, a target frequency of the oscillator, and the NrefDetermining;
a determination unit for determining the NosAnd said NoIs less than the set error DN, it is determined that the oscillator calibration is successful.
In a fourth aspect of the invention, there is provided a computer readable storage medium having stored thereon a computer program comprising program instructions which, when executed by a processor, cause the processor to perform the method of the first aspect of the invention.
The invention mainly has the following beneficial effects:
by adopting the technical scheme, the invention compares NosAnd NoWhether the absolute value of the difference value is larger than the set error DN or not is judged to be successfully calibrated, the automatic calibration of the internal clock frequency of the chip can be completed only by externally hanging a calibrated reference clock on the chip, the calibration time is shortened, a peripheral test circuit is not needed, the chip test circuit is simplified, the chip test time is effectively shortened, and the chip test cost is reduced.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a schematic diagram of a conventional on-chip clock frequency calibration method;
fig. 2 is a schematic structural diagram of a chip provided in an embodiment of the present application;
FIG. 3 is a diagram illustrating the number of cycles included in the width of a reference clock and the current clock statistical reference level of an oscillator according to an embodiment of the present application;
fig. 4 is a schematic flowchart of an on-chip clock frequency automatic calibration method according to an embodiment of the present disclosure;
fig. 5 is a schematic flowchart of another method for automatically calibrating a clock frequency on a chip according to an embodiment of the present disclosure;
FIG. 6 is a schematic diagram illustrating a state change of a calibration module according to an embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of a calibration module for an on-chip clock frequency according to an embodiment of the present disclosure.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms "first," "second," and the like in the description and claims of the present application and in the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
Reference in the specification to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the specification. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
In the embodiment of the present application, please refer to fig. 2, fig. 2 is a schematic structural diagram of a chip provided in the embodiment of the present application, and as shown in fig. 2, the chip 200 includes an oscillator 201, a calibration module 202, and a parameter adjustment module 203.
The calibration module 202 is configured to obtain the reference clock generated by the reference clock including NrefA reference level for each period;
the calibration module 202 is further configured to count, by using the current clock of the oscillator 201, that the reference level includes N within the widthoA period of time;
the calibration module 202 is further configured to calibrate the calibration module for a theoretical number of cycles NosAnd said NoIf the absolute value of the difference is greater than the set error DN, the parameter adjusting module 203 adjusts a frequency control parameter, where the frequency control parameter is used to change the current frequency of the oscillator 201; said N isosA reference frequency based on the reference clock, a target frequency of the oscillator 201, and the NrefDetermining;
the calibration module 202 is further configured to calibrate the calibration module at the NosAnd said NoIs less than the set error DN, it is determined that the oscillator 201 is calibrated successfully.
The oscillator 201 may be an RC oscillator 201, an LC oscillator 201, or the like. The oscillator 201 generally includes a capacitor, and may further include one or a combination of a resistor and an inductor. The oscillator 201 is an energy conversion device that can convert dc power into ac power having a certain frequency. The oscillator 201 is an electronic component for generating a repetitive signal (e.g., a sine wave signal, a square wave signal, etc.), and the circuit formed by the oscillator is called an oscillation circuit. The oscillator 201 can convert the dc power into an ac power having a certain frequency and output the ac power. The oscillator 201 is of various types, and can be divided into a self-excited oscillator 201 and an independent-excited oscillator 201 according to an oscillation excitation mode; the circuit structure can be divided into a resistance-capacitance oscillator 201, an inductance-capacitance oscillator 201, and the like.
For example, reference clock generation includes NrefThe reference level of each period may be a periodic square wave level signal or a periodic sine wave level signal. The current clock of the oscillator 201 may count N included in the width of the reference level by the generated periodic square wave level signal or sine wave level signaloAnd (4) one period. The reference clock and the current clock of the oscillator 201 generate the same type of level signal, such as both periodic square wave level signals or both periodic sine wave level signals.
The oscillator 201 of the present invention is an oscillator 201 provided inside a chip, and is different from the crystal oscillator 201. The crystal oscillator 201 is bulky, consumes high power, and cannot be placed inside a chip. The crystal oscillator 201 may be provided outside the chip.
The calibration module 202 is used to calibrate the clock frequency of the oscillator 201. For example, if the target frequency of the oscillator 201 is 2.4 megahertz (MHz), the calibration module 202 is to calibrate the clock frequency of the oscillator 201 to 2.4 MHz.
The parameter adjusting module 203 is used for adjusting the current frequency of the oscillator 201. Specifically, the parameter adjustment module 203 may change the current frequency of the oscillator 201 by adjusting the parameters of the components of the oscillator 201. For example, if the oscillator 201 is the RC oscillator 201, the parameter adjustment module 203 may change the current frequency of the oscillator 201 by adjusting the magnitudes of the resistance and the capacitance of the oscillator 201; if the oscillator 201 is an LC oscillator 201, the parameter adjustment module 203 may change the current frequency of the oscillator 201 by adjusting the magnitudes of the inductance and the capacitance of the oscillator 201.
Due to the aging of the electronic components in the oscillator 201, the difference in the electronic components in the manufacturing process of the electronic components, and the influence of the environment in which the electronic components are subjected to temperature, humidity, and the like, the clock frequency of the oscillator 201 may drift and may deviate from the target frequency set previously. Therefore, the clock frequency of the oscillator 201 needs to be calibrated.
The reference clock in the embodiment of the present application may be calibrated, the clock frequency of the reference clock may be used for the chip to reference, and the clock frequency of the reference clock may also be referred to as the reference frequency. The reference clock may be from the clock of the oscillator 201 of another calibrated chip, or may be from the crystal oscillator 201, and the embodiment of the present application is not limited.
The reference clock may generate a segment containing NrefReference level of one period, the width of the reference level is Nref*fref,frefIs the reference frequency. For example, if the clock frequency of the reference clock (i.e., the reference frequency) is 4MHz, NrefEqual to 10000, the width of the reference level is 2.5 milliseconds (ms).
The calibration module 202 counts the width of the reference level by the current clock of the oscillator 201 to include NoAnd (4) one period. For example, if the width of the reference level is 2.5ms, and the frequency of the current clock of the oscillator 201 (i.e., the current frequency of the oscillator 201) is 1.95MHz (actually, the magnitude of the current frequency of the oscillator 201 is not known by the calibration module 202), the current clock of the oscillator 201 counts that N is included in the width of the reference levelo=2.5*10-3*1.95*106=4875 cycles.
Specifically, referring to fig. 3, fig. 3 is a schematic diagram illustrating the number of cycles included in the width of the reference clock and the current clock statistical reference level of the oscillator according to an embodiment of the present application. FIG. 3 illustrates, for a square wave signal, a reference clock (reference frequency of 4 MHz) generating N within the same reference level width (2 μ s)refA square wave of =8 cycles, the current clock of the oscillator 201 (the frequency of the current clock is 2 MHz) statistically generating No=4 cycles of square wave. It can be seen that the width at the same reference levelIn the case of degrees, the greater the frequency, the greater the number of square waves generated.
The calibration module 202 is configured to calibrate the reference clock according to the reference frequency of the reference clock, the target frequency of the oscillator 201, and the NrefCalculating the theoretical number of cycles N of the oscillator 201os. Wherein N isos=(fosc/fref)* Nref;foscIs the target frequency of the oscillator 201, frefIs the reference frequency of the reference clock. For example, if the reference frequency is 4MHz, Nref10000, the target frequency of the oscillator 201 is 2MHz, the theoretical number N of cycles of the oscillator 201os=(2/4)*10000=5000。
If said N isosAnd said NoIs less than the set error DN, the calibration module 202 determines that the oscillator 201 is successfully calibrated.
Wherein the setting error DN is based on the frequency adjustment accuracy of the oscillator 201 and the target frequency f of the oscillator 201oscReference frequency frefAnd NrefTo be determined. A factor that affects the frequency adjustment accuracy of the oscillator 201 is the influence of the smallest adjustable unit of the electronic components of the oscillator 201 on the frequency of the oscillator 201. For example, factors affecting the frequency adjustment accuracy of the oscillator 201 are the resistance value and the capacitance value of the RC circuit of the oscillator 201, and the minimum adjustable unit of the resistance value and the minimum adjustable unit of the capacitance value. If the minimum adjustment unit of the resistance value is 1 ohm (Ω) and the minimum adjustment unit of the capacitance value is 0.1 microfarad (μ f), the current resistance of the RC circuit of the oscillator 201 increases by 1 Ω, and after the current capacitance increases by 1uf, if the current frequency of the oscillator 201 varies between 0.6% and 1%, the frequency adjustment accuracy of the oscillator 201 is 0.6%.
If N is presentosAnd said NoIs less than the set error DN, the calibration module 202 determines that the oscillator 201 is successfully calibrated.
If N is presentosAnd said NoIs greater than the set error DN, the calibration module 202 adjusts the frequency control parameter through the parameter adjustment module 203, theThe frequency control parameter is used to change the current frequency of the oscillator 201. After the current frequency adjustment of oscillator 201, continue to compare NosWith new NoIf the absolute value of the difference is less than the set error DN, and if still greater than the set error DN, the current frequency of the oscillator 201 continues to be adjusted until NosAnd NoIf the absolute value of the difference value is less than the set error DN, the calibration is determined to be successful.
Optionally, the calibration module 202 calculates the theoretical number N of cycles of the oscillator 201 according to the following formulaos
Nos=(fosc/fref)* Nref
Wherein f isoscIs the target frequency of the oscillator 201, frefIs the reference frequency of the reference clock.
Optionally, the calibration module 202 is further configured to continue to obtain the N-content generated by the reference clock after the frequency control parameter is adjusted by the parameter adjusting module 203refA step of counting the reference level by the current clock of the oscillator 201 for a period of time, or continuing to perform the counting of the reference level for a width including NoAnd (5) a periodic step.
Optionally, in said NosAnd said NoWhen the absolute value of the difference is greater than the set error DN, the calibration module 202 adjusts the frequency control parameter through the parameter adjustment module 203, specifically:
if N is presentO-NOS>DN, the calibration module 202 increases the current frequency parameter of the oscillator 201 by a minimum adjustable unit through the parameter adjustment module 203 to decrease the current frequency of the oscillator 201;
if N is presentOS-NO>DN, the calibration module 202 reduces the current frequency parameter of the oscillator 201 by a minimum adjustable unit through the parameter adjustment module 203 to increase the current frequency of the oscillator 201.
In the embodiment of the present application, theoretically, the current frequency parameter of the oscillator 201 (such asCapacitance, resistance, inductance, etc.) can be adjusted to any size, but due to the manufacturing process of capacitance, resistance, inductance, environmental temperature, etc., the minimum adjustable unit of capacitance, resistance, inductance cannot be infinitely close to 0, and there will be a minimum adjustable unit, which is the minimum amplitude of each adjustment. The frequency parameters may include parameters that affect the frequency of the oscillator 201. For example, for RC oscillator 201 (the resistance within RC oscillator 201 may be an adjustable resistance and the capacitance may be an adjustable capacitor), frequency f =1/2 pi RC of RC oscillator 201; the frequency parameter may include a resistance and a capacitance, and the minimum adjustable unit of the current frequency parameter may include a minimum adjustable unit of the resistance (e.g., 1 Ω) or a minimum adjustable unit of the capacitance (e.g., 1 μ f). For LC oscillator 201 (the inductance within LC oscillator 201 may be an adjustable inductor and the capacitance may be an adjustable capacitor), the frequency of LC oscillator 201
Figure 377514DEST_PATH_IMAGE001
(ii) a The frequency parameter may include an inductance and a capacitance, and the minimum adjustable unit of the current frequency parameter may include a minimum adjustable unit of the inductance (e.g., 1 microhenry (μ H)) or a minimum adjustable unit of the capacitance (e.g., 1 μ f).
Note that, in both the RC oscillator 201 and the LC oscillator 201, the frequency of the oscillator 201 is inversely proportional to the capacitance, the resistance, and the inductance. That is, when the frequency of the oscillator 201 needs to be increased, the frequency parameters such as capacitance, resistance, inductance, etc. need to be decreased; when the frequency of the oscillator 201 needs to be adjusted down, the frequency parameters such as capacitance, resistance, inductance, etc. are increased.
Optionally, if NO-NOS>DN, the calibration module 202 increases the current frequency parameter of the oscillator 201 by the minimum adjustable unit through the parameter adjustment module 203, so as to decrease the current frequency of the oscillator 201, if N is greater than NOS-NO>DN, the calibration module 202 determines that the oscillator 201 failed to calibrate.
Optionally, if NOS-NO>DN, the calibration module202, the parameter adjusting module 203 decreases the current frequency parameter of the oscillator 201 by a minimum adjustable unit to increase the current frequency of the oscillator 201, if N isO-NOS>DN, the calibration module 202 determines that the oscillator 201 failed to calibrate.
Optionally, the calibration module 202 is further configured to increase the frequency control parameter to a maximum, and NO-NOS>DN, the calibration module 202 determines that the oscillator 201 failed to calibrate;
the calibration module 202 is further configured to reduce the frequency control parameter to a minimum, and NOS-NO>DN, the calibration module 202 determines that the oscillator 201 failed to calibrate.
Optionally, the N isrefDetermined according to the following formula:
Nref≥fref/[β*(1-α)* fosc];
wherein f isoscIs the target frequency of the oscillator 201, frefThe reference frequency of the reference clock is α is a deviation error of the current frequency of the oscillator 201 from the target frequency, and β is a statistical error of the calibration module 202 counting the reference level by the current clock of the oscillator 201.
Optionally, the setting error DN is determined according to the following formula:
DN= Nref* fosc*γ/fref
wherein f isoscIs the target frequency of the oscillator 201, frefγ is the frequency adjustment accuracy of the oscillator 201, which is the reference frequency of the reference clock.
Optionally, the calibration module 202 is further configured to obtain the reference clock and generate a reference clock including NrefReceiving a calibration start signal before the reference level of a cycle, wherein the calibration start signal is used for instructing the calibration module 202 to enter a waiting state from an idle state;
the calibration module 202 is further configured to switch from the waiting state to the calibration state after entering the waiting state for a preset duration.
Optionally, the calibration module 202 is further configured to increase the current frequency parameter of the oscillator 201 by a minimum adjustable unit through the parameter adjusting module 203, so as to enter the waiting state after the current frequency of the oscillator 201 is reduced.
Optionally, the calibration module 202 is further configured to reduce the current frequency parameter of the oscillator 201 by a minimum adjustable unit through the parameter adjustment module 203, so as to enter the waiting state after increasing the current frequency of the oscillator 201.
Optionally, the calibration module 202 is further configured to enter the idle state after determining that the oscillator 201 is successfully calibrated.
Optionally, the calibration module 202 is further configured to enter the idle state after determining that the oscillator 201 fails to be calibrated.
In the embodiment of the application, N is comparedosAnd NoWhether the absolute value of the difference value is larger than the set error DN or not is judged to be successfully calibrated, the automatic calibration of the internal clock frequency of the chip can be completed only by externally hanging a calibrated reference clock on the chip, the calibration time is shortened, a peripheral test circuit is not needed, the chip test circuit is simplified, the chip test time is effectively shortened, and the chip test cost is reduced.
Fig. 4 is a flowchart illustrating an on-chip clock frequency automatic calibration method according to an embodiment of the present disclosure. The method shown in fig. 4 is applied to the chip shown in fig. 2. As shown in fig. 4, the on-chip clock frequency auto-calibration method may include the following steps.
401, the calibration module obtains N generated by the reference clockrefReference level of one period.
In the embodiment of the application, the reference clock can generate a segment containing NrefReference level of one period, the width of the reference level is Nref*fref,frefIs the reference frequency. For example, if the clock frequency of the reference clock (i.e., the reference frequency) is 4MHz, NrefEqual to 10000, the width of the reference level is 2.5 milliseconds (ms).
The reference clock in the embodiment of the present application may be calibrated, the clock frequency of the reference clock may be used for the chip to reference, and the clock frequency of the reference clock may also be referred to as the reference frequency. The reference clock may be from the clock of the oscillator of other calibrated chips, or may be from a crystal oscillator, and the embodiments of the present application are not limited. The clock frequency of the reference clock is considered accurate, wherein the chip can receive an accurate reference clock that is sourced.
Specifically, the calibration module may count N contained in the reference level by the reference clockrefAnd (4) one period.
402, the calibration module counts the width of the reference level by the oscillator's current clock to include NoAnd (4) one period.
In the embodiment of the application, the calibration module counts N contained in the reference level through the reference clockrefOne period, N is included in the width of the current clock statistical reference level of the calibration module through the oscillatoroThe two steps can be executed simultaneously, that is, the reference clock and the current clock of the oscillator can count the number of cycles contained in a section of the same reference level at the same time.
In one embodiment, the calibration module counts N contained within the reference level by reference to the clockrefOne period, N is included in the width of the current clock statistical reference level of the calibration module through the oscillatoroIn this cycle, these two steps may be performed sequentially. For example, the calibration module counts N contained in the reference level by reference to the clockrefOne cycle may be performed first, then the calibration module counts the width of the reference level by the oscillator's current clock to include NoAnd (4) one period. That is, the reference clock starts counting first, then the current clock of the oscillator starts counting, then the reference clock ends counting first, and then the oscillator ends counting. The reference clock is guaranteed to have the same level width as the current clock statistics of the oscillator.
Optionally, step 401 may specifically include the following steps:
the calibration module counts N contained in the width of the reference level through the reference clockrefOne period
Step 402 may specifically include the following steps:
the calibration module counts N contained within the width of the reference level by the oscillator's current clockoAnd (4) one period.
Wherein, the steps 401 and 402 can be executed simultaneously.
403, if the theoretical number of cycles NosAnd NoThe absolute value of the difference value is greater than a set error DN, and the calibration module adjusts a frequency control parameter through the parameter adjusting module, wherein the frequency control parameter is used for changing the current frequency of the oscillator; n is a radical ofosReference frequency based on reference clock, target frequency of oscillator and NrefAnd (4) determining.
In the embodiment of the present application, the theoretical number of cycles NosCan be determined according to the following formula:
Nos=(fosc/fref)* Nref
wherein f isoscIs the target frequency of the oscillator, frefIs the reference frequency of the reference clock.
For example, if fosc=2.4Mhz,fref=4Mhz,Nref=1200, then Nos=720。
Number of theoretical cycles NosIs the number of cycles contained within the width of the reference level counted by the current clock of the oscillator when the current frequency of the oscillator is equal to the target frequency.
Optionally, after step 403 is executed, step 401 or step 402 may be further executed (fig. 4 takes the example of continuing to execute step 401), and a next loop is entered until the condition of step 404 is met, and the frequency calibration of the oscillator is ended.
Optionally, in step 403, if the theoretical number of cycles N is smaller than the predetermined number of cycles NosAnd NoThe absolute value of the difference is greater than the set error DN, and the calibration module adjusts the frequency control parameter through the parameter adjustment module, which may specifically include the following steps:
if N is presentO-NOS>DN, the calibration module increases the current frequency parameter of the oscillator by a minimum adjustable unit through the parameter adjustment module so as to reduce the current frequency of the oscillator; the current frequency of the oscillator is the frequency of the current clock of the oscillator;
if N is presentOS-NO>DN, the calibration module reduces the current frequency parameter of the oscillator by a minimum adjustable unit through the parameter adjustment module so as to increase the current frequency of the oscillator.
In the embodiment of the present application, theoretically, the current frequency parameter (for example, capacitance, resistance, inductance, and the like) of the oscillator 201 may be adjusted to any size, but due to the manufacturing process of the capacitance, the resistance, and the inductance, the environmental temperature, and the like, the minimum adjustable unit of the capacitance, the resistance, and the inductance cannot be infinitely close to 0, and there may be a minimum adjustable unit, where the minimum adjustable unit is the minimum amplitude of each adjustment. The frequency parameters may include parameters that affect the frequency of the oscillator 201. For example, for RC oscillator 201 (the resistance within RC oscillator 201 may be an adjustable resistance and the capacitance may be an adjustable capacitor), frequency f =1/2 pi RC of RC oscillator 201; the frequency parameter may include a resistance and a capacitance, and the minimum adjustable unit of the current frequency parameter may include a minimum adjustable unit of the resistance (e.g., 1 Ω) or a minimum adjustable unit of the capacitance (e.g., 1 μ f). For LC oscillator 201 (the inductance within LC oscillator 201 may be an adjustable inductor and the capacitance may be an adjustable capacitor), the frequency of LC oscillator 201
Figure 94322DEST_PATH_IMAGE002
(ii) a The frequency parameter may include an inductance and a capacitance, and the minimum adjustable unit of the current frequency parameter may include a minimum adjustable unit of the inductance (e.g., 1 microhenry (μ H)) or a minimum adjustable unit of the capacitance (e.g., 1 μ f).
Note that, in both the RC oscillator 201 and the LC oscillator 201, the frequency of the oscillator 201 is inversely proportional to the capacitance, the resistance, and the inductance. That is, when the frequency of the oscillator 201 needs to be increased, the frequency parameters such as capacitance, resistance, inductance, etc. need to be decreased; when the frequency of the oscillator 201 needs to be adjusted down, the frequency parameters such as capacitance, resistance, inductance, etc. are increased.
Optionally, before the calibrating module increases the current frequency parameter of the oscillator by a minimum adjustable unit through the parameter adjusting module to decrease the current frequency of the oscillator, the method further includes the following steps:
if N is presentO-NOS>DN, the calibration module determines NO-NOSWhether it is less than a first threshold;
in NO-NOSIf the current frequency parameter is smaller than the first threshold, the calibration module executes the step of increasing the current frequency parameter of the oscillator by a minimum adjustable unit through the parameter adjustment module;
the calibration module reduces the current frequency parameter of the oscillator by a minimum adjustable unit through the parameter adjustment module, so as to further include the following steps before the current frequency of the oscillator is increased:
if N is presentOS-NO>DN, the calibration module determines NOS-NOWhether less than a second threshold;
in NOS-NOAnd if the current frequency parameter is smaller than the second threshold, the calibration module executes the step of reducing the current frequency parameter of the oscillator by a minimum adjustable unit through the parameter adjustment module.
The first threshold and the second threshold may be set according to DN, for example, the first threshold and the second threshold may be set to ten times the DN. The first threshold and the second threshold may be the same or different.
The first threshold and the second threshold may be set to be ten times DN, and when the difference is small, the current frequency parameter of the oscillator may be adjusted by using the minimum adjustable unit, so as to adjust the current frequency of the oscillator. The current frequency of the oscillator can be adjusted to the target frequency only by ten times at most, the current frequency of the oscillator can be quickly adjusted to the target frequency, and the frequency adjustment speed of the oscillator is increased.
Optionally, the method of fig. 4 may further include the following steps:
in NO-NOSIf the difference value is greater than the first threshold value, the calibration module determines N according to the mapping from the difference value set to the minimum adjustable unit number setO-NOSCorresponding N minimum adjustable units, wherein N is greater than or equal to 2;
the calibration module increases the current frequency parameter of the oscillator by the N target adjustable units through the parameter adjustment module to reduce the current frequency of the oscillator;
in NOS-NOIf the difference value is greater than the second threshold value, the calibration module determines N according to the mapping of the difference value set to the minimum adjustable unit number setOS-NOCorresponding M minimum tunable units, wherein M is greater than or equal to 2;
the calibration module reduces the current frequency parameter of the oscillator by the M target adjustable units through the parameter adjusting module so as to increase the current frequency of the oscillator;
wherein the set of differences comprises at least two differences and the set of minimum number of tunable units comprises at least two minimum numbers of tunable units; the mapping of the at least two difference values to the at least two minimum number of tunable units is a monotonically increasing function.
In this embodiment, the mapping of the difference set to the minimum adjustable unit number set may be stored in the calibration module in the form of a mapping table. For example, referring to table 1, table 1 is a mapping table from a difference set to a minimum adjustable unit number set according to the embodiment of the present application
TABLE 1
Difference value set (multiples of DN) Minimum adjustable unit quantity
10~20 15
20~50 35
50~100 75
Greater than 100 100
As can be seen from table 1, the larger the difference in the difference set is, the larger the corresponding minimum number of tunable units is. According to the embodiment of the application, when the difference value is large, the current frequency parameter of the oscillator can be adjusted by adopting at least two minimum adjustable unit quantities. When the difference is large (the difference is larger than the first threshold or the second threshold), the current frequency parameter of the oscillator is not adjusted by the minimum adjustable unit quantity, but is adjusted by the minimum adjustable unit quantity corresponding to the difference, and each adjustment when the difference is large can adjust the current frequency of the oscillator by a large amplitude, so that the difference is quickly adjusted to be smaller than the first threshold or the second threshold, the current frequency of the oscillator is quickly adjusted to the target frequency, and the frequency adjustment speed of the oscillator is improved.
404 if NosAnd NoThe absolute value of the difference value is less than the set error DN, and the calibration module determines that the oscillator is calibrated successfully.
Theoretically, if N isos>NoIndicating that the current frequency of the oscillator is too small; if N is presentos<NoIndicating that the current frequency of the oscillator is too large; if N is presentos=NoIndicating that the current frequency of the oscillator is equal to the target frequency. However, in an actual circuit, due to oscillationThe current clock of the oscillator has a statistical error, and the current clock of the oscillator has a certain error in the number of cycles contained in the width of the statistical reference level.
In the embodiment of the application, a setting error DN is set as long as N isosAnd NoThe absolute value of the difference is less than the set error DN, which indicates that the current frequency of the oscillator is equal to the target frequency, and the oscillator is determined to be successfully calibrated. If N is presentosAnd NoIf the absolute value of the difference value is greater than the set error DN, the current frequency of the oscillator is not equal to the target frequency, and the current frequency of the oscillator needs to be adjusted.
In the embodiment of the application, N is comparedosAnd NoWhether the absolute value of the difference value is larger than the set error DN or not is judged to be successfully calibrated, the automatic calibration of the internal clock frequency of the chip can be completed only by externally hanging a calibrated reference clock on the chip, the calibration time is shortened, a peripheral test circuit is not needed, the chip test circuit is simplified, the chip test time is effectively shortened, and the chip test cost is reduced.
Referring to fig. 5, fig. 5 is a schematic flowchart illustrating another method for automatically calibrating a clock frequency on a chip according to an embodiment of the present disclosure. The method shown in fig. 5 is applied to the chip shown in fig. 2. Fig. 5 is further optimized based on fig. 4, and as shown in fig. 5, the method for automatically calibrating the clock frequency in the chip may include the following steps.
501, the calibration module receives a calibration start signal, where the calibration start signal is used to instruct the calibration module to enter a wait state from an idle state.
In this embodiment of the application, the calibration module may receive a calibration start signal, and the calibration module switches from an idle state to a waiting state. In the idle state, the calibration module does not perform a calibration operation. In the wait state, the calibration module is ready for calibration.
502, after the calibration module enters the waiting state for a preset duration, the calibration module is switched from the waiting state to the calibration state.
In the embodiment of the application, the preset duration may be preset. After the parameter adjusting module adjusts the frequency of the oscillator, the oscillator needs a period of time to be stably output. After receiving the calibration start signal, the calibration module does not directly enter the calibration state from the idle state, but enters a waiting state first, and then enters the calibration state after a period of time (preset duration). Since step 501 and step 502 may enter into the following loop steps. Therefore, the preset duration needs to be set, and when the calibration module is in the calibration state, the oscillator can output a square wave signal or a sine wave signal with stable frequency. That is, after the last frequency adjustment and before the next frequency adjustment, the oscillator can output a square wave signal or a sine wave signal with stable frequency, and the oscillator can output the square wave signal or the sine wave signal with stable frequency in a calibration state. The preset time period is a time period required for the oscillator to be able to output a signal of a stable frequency after the frequency adjustment.
503, the calibration module obtains the reference clock generated to include NrefReference level of one period.
The calibration module counts N across the width of the reference level of the oscillator's current clock 504oAnd (4) one period.
505 if NO-NOS>DN, the calibration module increases the current frequency parameter of the oscillator by a minimum adjustable unit through the parameter adjustment module so as to reduce the current frequency of the oscillator.
Optionally, after step 505 is executed, the calibration module enters the wait state and enters the next loop.
Optionally, after step 505 is executed, after steps 502, 503 and 504 are executed next time, if N isOS-NO>DN, the calibration module determines that the oscillator calibration failed. The current frequency of the oscillator can be repeatedly switched up and down at the target frequency after the current frequency parameter of the oscillator is adjusted by the minimum adjustable unit, and N can not be metosAnd NoIs less than the set error DN, it is determined that the oscillator is in a roll state or that calibration has failed.
506 if NOS-NO>DN passed by the calibration moduleThe parameter adjusting module reduces the current frequency parameter of the oscillator by a minimum adjustable unit so as to increase the current frequency of the oscillator.
Optionally, after step 506 is executed, the calibration module enters the wait state and enters the next loop.
Optionally, after performing step 506, after next performing steps 502, 503 and 504, NO-NOS>DN, the calibration module determines that the oscillator calibration failed. The current frequency of the oscillator can be repeatedly switched up and down at the target frequency after the current frequency parameter of the oscillator is adjusted by the minimum adjustable unit, and N can not be metosAnd NoIs less than the set error DN, it is determined that the oscillator is in a roll state or that calibration has failed.
Optionally, in the case that the frequency control parameter is increased to the maximum, if N isO-NOS>DN, the calibration module determining that the oscillator calibration failed;
in the case that the frequency control parameter is reduced to a minimum, if NOS-NO>DN, the calibration module determines that the oscillator calibration failed.
In the embodiment of the present application, if the frequency control parameter is increased to the maximum, that is, the current frequency of the oscillator is adjusted to the minimum, the current frequency of the oscillator is still greater than the target frequency, that is, NO-NOS>DN, the calibration module determines that the oscillator calibration failed. If the frequency control parameter is reduced to a minimum, i.e. the current frequency of the oscillator is adjusted to a maximum, the current frequency of the oscillator is still less than the target frequency, i.e. NOS-NO>DN, the calibration module determines that the oscillator calibration failed.
Optionally, after the oscillator calibration fails, the calibration module enters an idle state.
Optionally, after the oscillator is in the rolling state, the calibration module enters idle loading.
507, if NosAnd NoAbsolute value of the difference of (2)And if the error is less than the set error DN, the calibration module determines that the oscillator is successfully calibrated.
Optionally, after step 507 is executed, the calibration module enters the idle state, and the calibration module waits for a next calibration start instruction.
Optionally, the N isrefDetermined according to the following formula:
Nref≥fref/[β*(1-α)* fosc];
wherein f isoscIs the target frequency of the oscillator, frefAnd taking the reference frequency of the reference clock, wherein alpha is the deviation error of the current frequency of the oscillator and the target frequency, and beta is the statistical error of the reference level counted by the calibration module through the current clock of the oscillator.
The deviation error alpha of the current frequency of the oscillator from the target frequency means that before the frequency of the oscillator is calibrated, if the deviation error of the current frequency of the oscillator from the target frequency is less than or equal to alpha, the frequency of the oscillator can be calibrated back, and if the deviation error of the current frequency of the oscillator from the target frequency is greater than alpha, the frequency of the oscillator cannot be calibrated back.
For example, if α is set to 30%. If the error between the current frequency of the oscillator and the target frequency is within 30%, NrefSatisfies the formula Nref≥fref/[β*(1-α)* fosc]Under the condition of (3), the frequency of the oscillator can be calibrated; if the error between the current frequency of the oscillator and the target frequency is outside 30%, NrefSatisfies the formula Nref≥fref/[β*(1-α)* fosc]There is no guarantee that the frequency of the oscillator can be calibrated back.
β is a statistical error of the reference level counted by the calibration module through a current clock of the oscillator. Beta refers to the statistical error of the counter corresponding to the oscillator, which is determined by the frequency error of the oscillator and is related to the hardware parameters of the oscillator.
For example, if α is 30%, β is 0.2%, foscIs 2.4MHz, frefIs 4MHz, then Nref≥fref/[β*(1-α)* fosc]=4/0.2% ((1-30%)) 2.4= 1190. Can set NrefIs 1200.
If N is setrefSet statistic N to 1200refThe number of bits of the counter (e.g., counter 1) of (2) is 11 bits (bit)10<1200<211) The requirements can be met. Counting the highest counted number N = N of the counter corresponding to the reference level by the current clock of the oscillatorref* fosc*(1+α)/ fref=1200 × 2.4 × 1.3/4=936, the number of bits of the counter (e.g., counter 2) counting the reference level of the current clock of the oscillator is 10 bits (2 bits)9<936<210). The counter bit number corresponding to the oscillator is designed to be 10 bits, and the requirement can be met. Wherein counter 1 is used to count N in step 503refCounter 2 is used to count N in step 504o
By the above formula to NrefThe limitation of (2) can meet the condition that the deviation error of the current frequency of the oscillator and the target frequency is less than alpha, and the statistical error of the calibration module through the current clock statistical reference level of the oscillator is less than beta, N is selectedrefThe calibration requirements can be met.
In addition, N isref=fref/β*(1-α)* foscThe calibration requirements can also be met. To shorten the calibration time, N may be setref=fref/β*(1-α)* fosc
Optionally, the setting error DN is determined according to the following formula:
DN= Nref* fosc*γ/fref
wherein f isoscIs the target frequency of the oscillator, frefγ is a frequency adjustment accuracy of the oscillator.
In the embodiment of the present application, the frequency adjustment accuracy γ of the oscillator refers to an error caused by adjusting the frequency parameter of the oscillator in the smallest unit.
For example, if the frequency adjustment accuracy γ of the oscillator is 0.66%, foscIs 2.4MHz, frefIs 4MHz, NrefIs 1200, then DN = Nref* fosc*γ/fref=1200 × 2.4 × 0.66%/4= 4.75. Since DN is an integer, DN may be set equal to 4 or 5.
For specific implementation of steps 503 to 507, refer to steps 401 to 404, which are not described herein again.
In the embodiment of the application, N is comparedosAnd NoWhether the absolute value of the difference value is larger than the set error DN or not is judged to be successfully calibrated, the automatic calibration of the internal clock frequency of the chip can be completed only by externally hanging a calibrated reference clock on the chip, the calibration time is shortened, a peripheral test circuit is not needed, the chip test circuit is simplified, the chip test time is effectively shortened, and the chip test cost is reduced.
Referring to fig. 6, fig. 6 is a schematic diagram illustrating a state change of a calibration module according to an embodiment of the present disclosure. The state of the calibration module may also be referred to as the state of the state machine.
(1) The initial state of the state machine is an IDLE (IDLE) state, and the oscillator works at an initial default parameter;
(2) when the calibration module receives the calibration enable signal, the state machine transitions from the idle state to a WAIT (WAIT) state. In a waiting state, enabling a counter to be used for delaying waiting, and when the counting time reaches a set value, entering a calibration (TRACK) state by a state machine;
(3) in the calibration state, the reference clock count is used for generatingN ref A high level of one cycle, and a count value N is obtained using the high level width of the internal clock number of the oscillatorO
A: if N is presentO>NOS,NO-NOS>DN, indicating that the internal OSC frequency is higher than the reference frequency, the state machine enters a parameter increasing state to perform an increase by 1 operation on a current frequency parameter (FCCTL) of the oscillator (i.e., the calibration module increases the current frequency parameter FCCTL of the oscillator by the parameter adjustment moduleA minimum adjustable unit), the frequency of the oscillator is reduced by one step;
b: if N is presentOS>NO,NOS-NO>DN, which indicates that the internal OSC frequency is lower than the reference frequency, the state machine enters a parameter reduction state, and subtracts 1 from the current frequency parameter FCCTL of the oscillator to increase the frequency of the oscillator by one gear;
c: if N is the current frequency parameter of the last oscillatorO-NOS>DN, denoted as L (N)O-NOS>DN) obtained by adding 1 to the current frequency parameterOS-NO>DN, denoted C (N)OS-NO>DN) indicating that the current frequency of the oscillator is higher than the reference frequency interval, and when the current frequency is reduced by one gear and becomes lower than the reference frequency interval, the oscillator enters a Rolling (ROLL) state indicating that the frequency rolling can not be adjusted to be within an error range, and the current chip is marked as a rolling state and can not be calibrated to be within a required range and discarded; similarly, when the current frequency of the oscillator is lower than the reference frequency interval L (N)OS-NO>DN) which is increased by one gear and then becomes higher than the reference frequency interval C (N)O-NOS>DN) which can not be calibrated to the required range and enters the rolling state, and DN can not be calibrated to the required range and is discarded;
d: when the current frequency parameter of the oscillator is maximized, N is still enabledO-NOS>DN, or the current frequency parameter of the oscillator, is minimized, still such that N isOS-NO>DN, which indicates that the current frequency parameter of the oscillator reaches the boundary state and the current frequency of the oscillator cannot be calibrated to the required range, the oscillator enters a Failure (FAIL) state, and the current chip is marked as failure and is discarded;
e: so long as the current frequency parameter of the oscillator is adjusted to a certain value, N can be enabledOAnd NOSThe relative difference between them is less than the allowable error range DN, i.e. NO-NOS|<DN, indicating that the oscillator has been successfully calibrated, enters DONE (DONE) state.
(4) Whether the parameter is in a reduced state or in an increased state, the chip enters a waiting state after the parameter is completed, and the internal oscillator of the chip needs a period of time to achieve stable output mainly after the current frequency parameter of the hardware adjustment oscillator compensates the frequency;
(5) and after the rolling/failure/completion state finishes the corresponding accepting or rejecting mark, returning to the idle state and waiting for the next calibration starting instruction.
Therefore, the method can finish the automatic calibration of the internal clock frequency of the chip, shorten the calibration time, save peripheral test circuits and simplify the chip test circuit, thereby effectively shortening the chip test time and reducing the chip test cost.
Referring to fig. 7, fig. 7 is a schematic structural diagram of a calibration module for an on-chip clock frequency according to an embodiment of the present disclosure, where the calibration module 700 is applied to the chip shown in fig. 2. The chip is externally connected with a calibrated reference clock, the chip comprises an oscillator, the calibration module and a parameter adjusting module, and the calibration module 700 comprises:
an obtaining unit 701 for obtaining the reference clock generated containing NrefA reference level for each period;
a statistic unit 702 for counting N included in the width of the reference level by the current clock of the oscillatoroA period of time;
a parameter adjusting unit 703 for adjusting the number of theoretical cycles NosAnd said NoUnder the condition that the absolute value of the difference value is greater than a set error DN, adjusting a frequency control parameter through the parameter adjusting module, wherein the frequency control parameter is used for changing the current frequency of the oscillator; said N isosBased on a reference frequency of the reference clock, a target frequency of the oscillator, and the NrefDetermining;
a determination unit 704 for determining the number of bits in the NosAnd said NoIs less than the set error DN, it is determined that the oscillator calibration is successful.
The specific implementation of the calibration module shown in fig. 7 can refer to the method embodiments shown in fig. 4 to fig. 5, which are not described herein again.
In the embodiment of the application, N is comparedosAnd NoWhether the absolute value of the difference value is larger than the set error DN or not is judged to be successfully calibrated, the automatic calibration of the internal clock frequency of the chip can be completed only by externally hanging a calibrated reference clock on the chip, the calibration time is shortened, a peripheral test circuit is not needed, the chip test circuit is simplified, the chip test time is effectively shortened, and the chip test cost is reduced.
Embodiments of the present application also provide a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program for electronic data exchange, and the computer program enables a computer to perform part or all of the steps of any one of the on-chip clock frequency auto-calibration methods as described in the above method embodiments.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implementing, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of some interfaces, devices or units, and may be an electric or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit may be implemented in the form of hardware, or may be implemented in the form of a software program module.
The integrated units, if implemented in the form of software program modules and sold or used as stand-alone products, may be stored in a computer readable memory. Based on such understanding, the technical solution of the present application may be substantially implemented or a part of or all or part of the technical solution contributing to the prior art may be embodied in the form of a software product stored in a memory, and including several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method described in the embodiments of the present application. And the aforementioned memory comprises: various media capable of storing program codes, such as a usb disk, a read-only memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and the like.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by associated hardware instructed by a program, which may be stored in a computer-readable memory, which may include: flash memory disks, read-only memory, random access memory, magnetic or optical disks, and the like.
The foregoing detailed description of the embodiments of the present application has been presented to illustrate the principles and implementations of the present application, and the above description of the embodiments is only provided to help understand the method and the core concept of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (13)

1. An on-chip clock frequency automatic calibration method is characterized in that a chip is externally connected with a calibrated reference clock, the reference clock is from clocks of oscillators of other calibrated chips or crystal oscillators, the chip comprises an oscillator, a calibration module and a parameter adjustment module, and the method comprises the following steps:
the calibration module obtains the reference clock generated to include NrefA reference level for each period;
the calibration module counts N contained in the width of the reference level through the current clock of the oscillatoroA period of time;
if the theoretical number of cycles NosAnd said NoThe absolute value of the difference value is greater than a set error DN, and the calibration module adjusts a frequency control parameter through the parameter adjustment module, wherein the frequency control parameter is used for changing the current frequency of the oscillator; said N isosBased on a reference frequency of the reference clock, a target frequency of the oscillator, and the NrefDetermining;
if said N isosAnd said NoThe absolute value of the difference value of (1) is less than the set error DN, and the calibration module determines that the oscillator is successfully calibrated;
the calibration module calculates the theoretical number of cycles N of the oscillator according to the following formulaos
Nos=(fosc/fref)* Nref
Wherein f isoscIs the target frequency of the oscillator, frefFor said reference clockA reference frequency;
after the calibration module adjusts the frequency control parameter through the parameter adjustment module, the method further includes: the calibration module continues to perform the acquiring the reference clock generation including NrefA step of counting the reference level by the current clock of the oscillator for a period of NoA step of one cycle;
the number of theoretical cycles NosAnd said NoThe absolute value of the difference value is greater than a set error DN, and the calibration module adjusts the frequency control parameter through the parameter adjustment module, including:
if N is presentO-NOS>DN, the calibration module increases the current frequency parameter of the oscillator by a minimum adjustable unit through the parameter adjustment module so as to reduce the current frequency of the oscillator;
if N is presentOS-NO>DN, the calibration module reduces the current frequency parameter of the oscillator by a minimum adjustable unit through the parameter adjustment module so as to increase the current frequency of the oscillator; if the oscillator comprises an RC oscillator, the RC oscillator comprises an adjustable resistor and an adjustable capacitor, and the minimum adjustable unit comprises a minimum adjustable unit of the adjustable resistor or a minimum adjustable unit of the adjustable capacitor of the RC oscillator; if the oscillator comprises an LC oscillator, the LC oscillator comprises an adjustable inductor and an adjustable capacitor, and the minimum adjustable unit comprises a minimum adjustable unit of the adjustable inductor or a minimum adjustable unit of the adjustable capacitor of the LC oscillator;
said N isrefDetermined according to the following formula:
Nref≥fref/[β*(1-α)* fosc];
wherein f isoscIs the target frequency of the oscillator, frefA reference frequency of the reference clock, a is a deviation error of the current frequency of the oscillator from the target frequency, and β is a system for the calibration module to count the reference level by the current clock of the oscillatorError counting;
the setting error DN is determined according to the following formula:
DN= Nref* fosc*γ/fref
wherein f isoscIs the target frequency of the oscillator, frefAnd gamma is the reference frequency of the reference clock, and gamma is the frequency adjustment precision of the oscillator, wherein the frequency adjustment precision comprises errors caused by the adjustment of the frequency parameters of the oscillator according to a minimum adjustable unit.
2. The method of claim 1, wherein the number N is the same as the number of the first clock signalsO-NOS>DN, the calibration module increases the current frequency parameter of the oscillator by a minimum adjustable unit through the parameter adjustment module to decrease the current frequency of the oscillator, and the method further comprises:
if N is presentOS-NO>DN, the calibration module determines that the oscillator calibration failed.
3. The method of claim 1, wherein the number N is the same as the number of the first clock signalsOS-NO>DN, the calibration module reduces the current frequency parameter of the oscillator by a minimum adjustable unit through the parameter adjustment module, so as to increase the current frequency of the oscillator, and the method further comprises:
if N is presentO-NOS>DN, the calibration module determines that the oscillator calibration failed.
4. The method of on-chip clock frequency auto-calibration according to claim 1, further comprising:
in the case that the frequency control parameter is increased to the maximum, if N isO-NOS>DN, the calibration module determining that the oscillator calibration failed;
in the case that the frequency control parameter is reduced to the minimum, ifNOS-NO>DN, the calibration module determines that the oscillator calibration failed.
5. The method of claim 1, wherein the calibration module obtains N included clock signals generated by the reference clockrefBefore the reference level of one cycle, the method further comprises:
the calibration module receives a calibration starting signal, and the calibration starting signal is used for indicating the calibration module to enter a waiting state from an idle state;
and after the calibration module enters a waiting state for a preset time, switching from the waiting state to a calibration state.
6. The method of claim 5, wherein the calibration module increases the current frequency parameter of the oscillator by a minimum adjustable unit through the parameter adjustment module to decrease the current frequency of the oscillator, or decreases the current frequency parameter of the oscillator by a minimum adjustable unit through the parameter adjustment module to increase the current frequency of the oscillator, and the method comprises:
the calibration module enters the wait state.
7. The method of claim 5, wherein after the calibration module determines that the oscillator calibration is successful or after the calibration module determines that the oscillator calibration is failed, the method further comprises:
the calibration module enters the idle state.
8. The method according to any of claims 1 to 4, wherein the calibration module obtains N included in the reference clockrefA reference level of one cycle, the calibration module passing through the oscillatorCurrent clock statistics of the reference level includes N within the width of the reference leveloA cycle comprising:
the calibration module counts N contained in the width of the reference level through the reference clockrefA period for counting N contained in the width of the reference level by the current clock of the oscillatoroAnd (4) one period.
9. The method of claim 1, wherein before the calibration module increases the current frequency parameter of the oscillator by a minimum adjustable unit through the parameter adjustment module to decrease the current frequency of the oscillator, the method further comprises:
if N is presentO-NOS>DN, the calibration module determines NO-NOSWhether it is less than a first threshold;
in NO-NOSIf the current frequency parameter is smaller than the first threshold, the calibration module executes the step of increasing the current frequency parameter of the oscillator by a minimum adjustable unit through the parameter adjustment module;
before the calibration module reduces the current frequency parameter of the oscillator by a minimum adjustable unit through the parameter adjustment module to increase the current frequency of the oscillator, the method further includes:
if N is presentOS-NO>DN, the calibration module determines NOS-NOWhether less than a second threshold;
in NOS-NOAnd if the current frequency parameter is smaller than the second threshold, the calibration module executes the step of reducing the current frequency parameter of the oscillator by a minimum adjustable unit through the parameter adjustment module.
10. The method of on-chip clock frequency auto-calibration according to claim 9, further comprising:
in NO-NOSIf the first threshold value is larger than the second threshold value, the calibration is performedThe quasi-module determines N according to the mapping from the difference value set to the minimum adjustable unit number setO-NOSCorresponding N minimum adjustable units, wherein N is greater than or equal to 2;
the calibration module increases the current frequency parameter of the oscillator by the N minimum adjustable units through the parameter adjustment module to reduce the current frequency of the oscillator;
in NOS-NOIf the difference value is greater than the second threshold value, the calibration module determines N according to the mapping of the difference value set to the minimum adjustable unit number setOS-NOCorresponding M minimum tunable units, wherein M is greater than or equal to 2;
the calibration module reduces the current frequency parameter of the oscillator by the M minimum adjustable units through the parameter adjustment module to increase the current frequency of the oscillator;
wherein the set of differences comprises at least two differences and the set of minimum number of tunable units comprises at least two minimum numbers of tunable units; the mapping of the at least two difference values to the at least two minimum number of tunable units is a monotonically increasing function.
11. A calibration module for clock frequency in a chip, wherein the chip is externally connected with a calibrated reference clock, the reference clock is from clocks of oscillators of other calibrated chips or crystal oscillators, the chip comprises the oscillators, the calibration module and a parameter adjustment module, and the calibration module comprises:
an acquisition unit for acquiring the reference clock generated containing NrefA reference level for each period;
a counting unit for counting N included in the width of the reference level by the current clock of the oscillatoroA period of time;
a parameter adjusting unit for adjusting the parameter at the theoretical cycle number NosAnd said NoIs greater than the set error DN, the parameter adjusting module adjusts the frequency control parameter, and the frequency controlThe parameter is used for changing the current frequency of the oscillator; said N isosBased on a reference frequency of the reference clock, a target frequency of the oscillator, and the NrefDetermining;
a determination unit for determining the NosAnd said NoDetermining that the oscillator is successfully calibrated when the absolute value of the difference value of (1) is less than the set error DN;
calculating the theoretical number of cycles N of the oscillator according to the following formulaos
Nos=(fosc/fref)* Nref
Wherein f isoscIs the target frequency of the oscillator, frefIs a reference frequency of the reference clock;
the obtaining unit is further configured to obtain the reference clock generated by the reference clock after the parameter adjusting unit adjusts the frequency control parameter through the parameter adjusting modulerefA reference level for each period;
the statistic unit is further configured to count that the reference level width includes N by using the current clock of the oscillator after the parameter adjustment unit adjusts the frequency control parameter through the parameter adjustment moduleoA period of time;
at theoretical number of cycles NosAnd said NoThe parameter adjusting unit adjusts the frequency control parameter through the parameter adjusting module under the condition that the absolute value of the difference value is greater than the set error DN, and the method comprises the following steps:
if N is presentO-NOS>DN, the parameter adjusting unit increases the current frequency parameter of the oscillator by a minimum adjustable unit through the parameter adjusting module so as to reduce the current frequency of the oscillator;
if N is presentOS-NO>DN, the parameter adjusting unit reduces the current frequency parameter of the oscillator by a minimum adjustable unit through the parameter adjusting module so as to increase the current frequency of the oscillator; if the oscillator comprises an RC oscillator comprising an adjustable resistor and an adjustable capacitor, the minimum adjustableThe unit comprises the minimum adjustable unit of the adjustable resistor or the minimum adjustable unit of the adjustable capacitor of the RC oscillator; if the oscillator comprises an LC oscillator, the LC oscillator comprises an adjustable inductor and an adjustable capacitor, and the minimum adjustable unit comprises a minimum adjustable unit of the adjustable inductor or a minimum adjustable unit of the adjustable capacitor of the LC oscillator;
said N isrefDetermined according to the following formula:
Nref≥fref/[β*(1-α)* fosc];
wherein f isoscIs the target frequency of the oscillator, frefThe reference frequency of the reference clock is alpha, the deviation error of the current frequency of the oscillator and the target frequency is beta, and the statistical error of the reference level counted by the calibration module through the current clock of the oscillator is beta;
the setting error DN is determined according to the following formula:
DN= Nref* fosc*γ/fref
wherein f isoscIs the target frequency of the oscillator, frefAnd gamma is the reference frequency of the reference clock, and gamma is the frequency adjustment precision of the oscillator, wherein the frequency adjustment precision comprises errors caused by the adjustment of the frequency parameters of the oscillator according to a minimum adjustable unit.
12. A chip is characterized by comprising an oscillator, a calibration module and a parameter adjustment module, wherein the chip is externally connected with a calibrated reference clock, and the reference clock is from clocks of oscillators of other calibrated chips or a crystal oscillator;
the calibration module is used for acquiring the reference clock generated NrefA reference level for each period;
the calibration module is further used for counting that the width of the reference level contains N through the current clock of the oscillatoroA period of time;
the calibration module is also used for calibrating the calibration module at the theoretical period number NosAnd said NoUnder the condition that the absolute value of the difference value is greater than a set error DN, adjusting a frequency control parameter through the parameter adjusting module, wherein the frequency control parameter is used for changing the current frequency of the oscillator; said N isosBased on a reference frequency of the reference clock, a target frequency of the oscillator, and the NrefDetermining;
the calibration module is further used for calibrating the reference voltage at the NosAnd said NoDetermining that the oscillator is successfully calibrated when the absolute value of the difference value of (1) is less than the set error DN;
the calibration module calculates the theoretical number of cycles N of the oscillator according to the following formulaos
Nos=(fosc/fref)* Nref
Wherein f isoscIs the target frequency of the oscillator, frefIs a reference frequency of the reference clock;
the calibration module is further configured to continue to acquire the N contained in the reference clock generated by the reference clock after the parameter adjustment module adjusts the frequency control parameterrefA step of counting the reference level of each period, or performing the counting of the current clock of the oscillator to include N within the width of the reference leveloA step of one cycle;
at theoretical number of cycles NosAnd said NoThe calibration module adjusts the frequency control parameter through the parameter adjustment module under the condition that the absolute value of the difference value of (1) is greater than the set error DN, and the method comprises the following steps:
if N is presentO-NOS>DN, the calibration module increases the current frequency parameter of the oscillator by a minimum adjustable unit through the parameter adjustment module so as to reduce the current frequency of the oscillator;
if N is presentOS-NO>DN, the calibration module reduces the current frequency parameter of the oscillator by a minimum adjustable unit through the parameter adjustment module so as to increase the current frequency of the oscillator; if the oscillator comprises an RC oscillator, the RC oscillator may compriseThe minimum adjustable unit comprises the minimum adjustable unit of the adjustable resistor or the minimum adjustable unit of the adjustable capacitor of the RC oscillator; if the oscillator comprises an LC oscillator, the LC oscillator comprises an adjustable inductor and an adjustable capacitor, and the minimum adjustable unit comprises a minimum adjustable unit of the adjustable inductor or a minimum adjustable unit of the adjustable capacitor of the LC oscillator;
said N isrefDetermined according to the following formula:
Nref≥fref/[β*(1-α)* fosc];
wherein f isoscIs the target frequency of the oscillator, frefThe reference frequency of the reference clock is alpha, the deviation error of the current frequency of the oscillator and the target frequency is beta, and the statistical error of the reference level counted by the calibration module through the current clock of the oscillator is beta;
the setting error DN is determined according to the following formula:
DN= Nref* fosc*γ/fref
wherein f isoscIs the target frequency of the oscillator, frefAnd gamma is the reference frequency of the reference clock, and gamma is the frequency adjustment precision of the oscillator, wherein the frequency adjustment precision comprises errors caused by the adjustment of the frequency parameters of the oscillator according to a minimum adjustable unit.
13. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program comprising program instructions that, when executed by a processor, cause the processor to carry out the method according to any one of claims 1 to 10.
CN202011040947.7A 2020-09-28 2020-09-28 Method for automatically calibrating clock frequency in chip and related product Active CN111934678B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202011040947.7A CN111934678B (en) 2020-09-28 2020-09-28 Method for automatically calibrating clock frequency in chip and related product
CN202110210274.3A CN114285409A (en) 2020-09-28 2020-09-28 Method and related device for automatically calibrating clock frequency in chip

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011040947.7A CN111934678B (en) 2020-09-28 2020-09-28 Method for automatically calibrating clock frequency in chip and related product

Related Child Applications (1)

Application Number Title Priority Date Filing Date
CN202110210274.3A Division CN114285409A (en) 2020-09-28 2020-09-28 Method and related device for automatically calibrating clock frequency in chip

Publications (2)

Publication Number Publication Date
CN111934678A CN111934678A (en) 2020-11-13
CN111934678B true CN111934678B (en) 2021-01-05

Family

ID=73334610

Family Applications (2)

Application Number Title Priority Date Filing Date
CN202110210274.3A Pending CN114285409A (en) 2020-09-28 2020-09-28 Method and related device for automatically calibrating clock frequency in chip
CN202011040947.7A Active CN111934678B (en) 2020-09-28 2020-09-28 Method for automatically calibrating clock frequency in chip and related product

Family Applications Before (1)

Application Number Title Priority Date Filing Date
CN202110210274.3A Pending CN114285409A (en) 2020-09-28 2020-09-28 Method and related device for automatically calibrating clock frequency in chip

Country Status (1)

Country Link
CN (2) CN114285409A (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112557876A (en) * 2020-12-10 2021-03-26 苏州英嘉通半导体有限公司 Device for calibrating chip simulation parameters and test method thereof
CN112540290A (en) * 2020-12-29 2021-03-23 深圳市芯天下技术有限公司 Test method and device for clock frequency calibration, storage medium and terminal
CN113377155B (en) * 2021-06-08 2023-06-09 深圳市汇顶科技股份有限公司 Clock calibration method and device and electronic equipment
CN113641214A (en) * 2021-08-24 2021-11-12 维沃移动通信有限公司 Clock calibration circuit, clock calibration method and related equipment
CN114167942B (en) * 2021-11-03 2024-05-07 珠海格力电器股份有限公司 Method for calibrating clock frequency in chip, computer device and readable storage medium
CN114780469A (en) * 2022-06-24 2022-07-22 浙江地芯引力科技有限公司 Clock frequency calibration device, data chip and clock frequency calibration method
CN115097961A (en) * 2022-07-14 2022-09-23 敦泰科技(深圳)有限公司 Clock calibration method of touch chip, touch chip and touch display device
CN116090388B (en) * 2022-12-21 2024-05-17 海光信息技术股份有限公司 Method for generating prediction model of internal voltage of chip, prediction method and related device
CN116318120B (en) * 2023-03-30 2024-05-03 归芯科技(深圳)有限公司 Calibration circuit, calibration method, chip and electronic equipment of RC oscillation clock
CN116564396A (en) * 2023-05-30 2023-08-08 珠海妙存科技有限公司 Memory controller capable of calibrating clock, clock calibration method and device
CN116805878B (en) * 2023-06-26 2024-02-06 深圳市维立科技有限公司 Method for calibrating OSC value in display driving chip
CN116909351B (en) * 2023-09-14 2023-12-19 深圳扬兴科技有限公司 Clock chip internal clock precision correction method

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6545950B1 (en) * 2000-05-16 2003-04-08 Ericsson Inc. Methods, systems, wireless terminals, and computer program products for calibrating an electronic clock using a base reference signal and a non-continuous calibration reference signal having greater accuracy than the base reference signal
CN102195646A (en) * 2010-03-18 2011-09-21 上海华虹Nec电子有限公司 Automatic clock oscillator calibration method and circuit
CN102830748B (en) * 2012-08-10 2015-08-26 深圳芯邦科技股份有限公司 The calibration steps of the clock skew inside of chip and system
US9184786B2 (en) * 2013-11-19 2015-11-10 Marvell World Trade Ltd. Systems and methods for clock calibration for satellite navigation
CN103955257B (en) * 2014-03-27 2017-08-08 美的集团股份有限公司 Calibration method and device, the air-conditioner control system of single-chip system clock
CN104052474B (en) * 2014-06-03 2017-03-15 华为技术有限公司 A kind of phase-locked loop frequency bearing calibration and system
CN105491434B (en) * 2015-12-17 2019-09-17 广东威创视讯科技股份有限公司 A kind of processing method and control circuit of field sync signal
CN106130547A (en) * 2016-06-20 2016-11-16 大唐微电子技术有限公司 A kind of clock frequency calibration steps and device
CN107884608B (en) * 2017-11-02 2020-10-23 钜泉光电科技(上海)股份有限公司 Electric energy meter control system and clock correction method
CN108011631A (en) * 2017-12-19 2018-05-08 建荣半导体(深圳)有限公司 Work clock generation method, clock source and chip

Also Published As

Publication number Publication date
CN114285409A (en) 2022-04-05
CN111934678A (en) 2020-11-13

Similar Documents

Publication Publication Date Title
CN111934678B (en) Method for automatically calibrating clock frequency in chip and related product
US7477098B2 (en) Method and apparatus for tuning an active filter
US7504833B1 (en) Automatically balanced sensing device and method for multiple capacitive sensors
US10782727B2 (en) Integrated circuits having self-calibrating oscillators, and methods of operating the same
US7852099B1 (en) Frequency trimming for internal oscillator for test-time reduction
CN107896105B (en) On-chip measurement for phase locked loop
KR100965496B1 (en) Test equipment and test method
CN102830748B (en) The calibration steps of the clock skew inside of chip and system
US20120218034A1 (en) Voltage calibration method and apparatus
CN107219884A (en) A kind of method and system of automatic calibrating clock frequency
US8373487B1 (en) True RMS power measurement
CN110968148A (en) Timing calibration method and device and timer
CN107769774A (en) The oscillator arrangement and correlation technique of precision with raising
CN113970698A (en) Method and system for calibrating off-chip crystal oscillator
TWI613890B (en) Frequency calibration method for digitally controlled oscillator and apparatus using the same
CN112799493A (en) Current automatic calibration circuit and calibration method of power supply VR chip
WO2014011490A1 (en) Method and apparatus for characterizing power supply imepdance for power delivery networks
CN207424736U (en) A kind of system of automatic calibrating clock frequency
US11329608B1 (en) Oscillator circuit with negative resistance margin testing
US20170052641A1 (en) Touch calibration system and method thereof
JP2008249529A (en) Jitter determination circuit and jitter determination method
CN112737574A (en) Timing calibration method of chip internal clock source and related device
JP3647699B2 (en) Integrated circuit and lot sorting system
US20140114593A1 (en) Apparatus and method for calculating electrical charge quantity or electrical discharge quantity for battery unit according to calibration parameter used for adjusting time interval of electrical charge/discharge calculation, and method for calibrating integral time interval
JP6880167B2 (en) Timekeeping circuit, electronic equipment and control method of timekeeping circuit

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address

Address after: Room 3104, block a, building 8, Shenzhen International Innovation Valley, Dashi 1st Road, Xili community, Nanshan District, Shenzhen, Guangdong 518000

Patentee after: Shenzhen yingjixin Technology Co.,Ltd.

Address before: 518000 room 1301, building A2, Kexing Science Park, No.15 Keyuan Road, Yuehai street, Nanshan District, Shenzhen City, Guangdong Province

Patentee before: SHENZHEN INJOINIC TECHNOLOGY Co.,Ltd.

CP03 Change of name, title or address