Frequency generator and frequency correction method for frequency generator
A frequency generator and a frequency correction method for a frequency generator, which have the purpose to provide a frequency correction technology that actively responds to continuous frequency fluctuations of a clock signal through a frequency measurement period of at least two unit periods. The frequency generator comprises: an oscillator which generates an oscillator clock signal; and a frequency correction circuit which selectively operates in one of a normal mode and a fast mode, which have different correction periods according to the state of the oscillator clock signal.
1 . A frequency generator comprising:
an oscillator that generates an oscillator clock signal; and
a frequency correction circuit that selectively operates in one of a normal mode and a fast mode with different correction periods according to a state of the oscillator clock signal,
wherein the frequency correction circuit generates a flag when the state of the oscillator clock signal during one cycle of the reference clock signal is a noise state in the normal mode, and operates in the fast mode when a flag count corresponding to the flag is greater than or equal to a first count.
2 . The frequency generator of claim 1 , wherein the frequency generator measures a frequency of the oscillator clock signal during a first period in the normal mode, measure the frequency of the oscillator clock signal during a second period shorter than the first period in the fast mode, and outputs, to the oscillator, an adjustment signal for correcting a frequency deviation between the measured frequency of the oscillator clock signal and a target frequency.
3 . The frequency generator of claim 2 , wherein, when the frequency deviation occurs in the normal mode, the frequency correction circuit corrects the frequency of the oscillator clock signal during a preset interval and then starts measuring a new frequency, and when the frequency deviation occurs in the fast mode, the frequency correction circuit corrects the frequency of the oscillator clock signal without the interval.
4 . The frequency generator of claim 2 , wherein the first period is a period in which a reference clock signal input from an outside is toggled by a second count, and
wherein the second period is a period in which the reference clock signal is toggled by a third count smaller than the second count.
5 . The frequency generator of claim 4 , wherein the frequency correction circuit determines the state of the oscillator clock signal based on a count value of the oscillator clock signal during one cycle of the reference clock signal.
6 . The frequency generator of claim 5 , wherein the frequency correction circuit generates a flag when the state of the oscillator clock signal during one cycle of the reference clock signal is a stable state in the fast mode, and operates in the normal mode when a flag count corresponding to the flag is greater than or equal to a fourth count.
7 . The frequency generator of claim 6 , wherein the frequency correction circuit initializes the flag count when the flag is not continuous.
8 . The frequency generator of claim 1 , wherein the frequency correction circuit initializes the flag count when the flag is not continuous.
9 . The frequency generator of claim 1 , wherein the frequency correction circuit further comprises a counter that measures a frequency of the oscillator clock signal.
10 . The frequency generator of claim 9 , wherein the frequency correction circuit calculates the frequency of the oscillator clock signal based on a number of toggles of the oscillator clock signal during a frequency measurement period counted through the counter.
11 . A frequency correction method for correcting a frequency of an oscillator in a frequency generator, the frequency correction method comprising:
generating an oscillator clock signal; and
measuring a frequency of the oscillator clock signal in one of a normal mode and a fast mode with different correction periods according to a state of the oscillator clock signal,
generating a flag in the normal mode when the state of the oscillator clock signal is a noise state; and
changing to the fast mode when a flag count corresponding to the flag is greater than or equal to a first count.
12 . The frequency correction method of claim 11 ,
wherein the measuring of the frequency of the oscillator clock signal comprises
measuring the frequency of the oscillator clock signal during a first period in the normal mode, and
measuring the frequency of the oscillator clock signal during a second period shorter than the first period in the fast mode.
13 . The frequency correction method of claim 12 ,
further comprising outputting an adjustment signal for correcting a frequency deviation between the measured frequency of the oscillator clock signal and a target frequency,
wherein the outputting of the adjustment signal comprises outputting the adjustment signal for correcting the frequency of the oscillator clock signal during a preset interval in the normal mode, and outputting the adjustment signal for correcting the frequency of the oscillator clock signal without the interval in the fast mode.
14 . The frequency correction method of claim 13 ,
further comprising determining the state of the oscillator clock signal,
wherein the normal mode or the fast mode is determined based on the determination result.
15 . The frequency correction method of claim 14 , wherein the first period is a period in which a reference clock signal input from an outside is toggled by a second count,
wherein the second period is a period in which the reference clock signal is toggled by a third count smaller than the second count, and
wherein the determining of the state of the oscillator clock signal comprises counting a count value of the oscillator clock signal during one cycle of the reference clock signal, and determining the state of the oscillator clock signal based on the count value of the oscillator clock signal.
16 . The frequency correction method of claim 15 , further comprising:
generating a flag in the fast mode when the state of the oscillator clock signal is stable; and
changing to the normal mode when a flag count corresponding to the flag is greater than or equal to a fourth count.
17 . The frequency correction method of claim 16 , wherein the flag count is initialized when the flag is not continuous.
18 . The frequency correction method of claim 11 , wherein the flag count is initialized when the flag is not continuous.