Fast startup crystal oscillator circuit with programmable injection time and adaptive startup time to achieve high amplitude oscillation
11705861 · 2023-07-18
Assignee
Inventors
- Mohamed M. Elkholy (Cedar Park, TX, US)
- Francesco Barale (North Kingstown, RI, US)
- Tiago Pinto Guia Marques (Austin, TX, US)
- Steffen Skaug (Oslo, NO)
- Håkon Børli (Bekkestua, NO)
Cpc classification
H03L7/099
ELECTRICITY
H03B5/06
ELECTRICITY
International classification
H03B5/06
ELECTRICITY
Abstract
A first three state driver injects a first clock signal into a crystal through an input node during a startup phase of a crystal oscillator and a second three state driver injects a second signal into the crystal through an output node during the startup phase. The first and second signals are anti-phase signals. The crystal oscillator circuit includes a first amplifier that is used during starting up and steady-state operation and includes a second amplifier. The injection through the input and output nodes is disabled after a fixed time. After injection ends, the second amplifier is turned on if voltage on the output node has reached a desired voltage and left off otherwise. If the second amplifier is turned on, the second amplifier is turned off when the voltage on the output node reaches the desired voltage.
Claims
1. A method for starting up a crystal oscillator comprising: injecting a first clock signal into a first node of a crystal of the crystal oscillator during a startup phase of the starting up using a first tristate driver; injecting a second clock signal into a second node of the crystal during the startup phase using a second tristate driver, the first clock signal and the second clock signal being anti-phase signals; disabling the injecting of the first and second clock signals responsive to an end of a predetermined time period; enabling a first amplifier circuit coupled across the first node and the second node during the startup phase and during an intermediate phase of the starting up following the startup phase; and ending the intermediate phase responsive to an amplitude of a first node voltage on the first node exceeding a first voltage threshold.
2. The method as recited in claim 1 further comprising comparing an amplitude of a second node voltage on the second node to a second voltage threshold to determine if the second node voltage is greater than the second voltage threshold during the startup phase and after disabling the injecting.
3. The method as recited in claim 2 further comprising responsive to the amplitude of the second node voltage being greater than the second voltage threshold, entering the intermediate phase.
4. The method as recited in claim 2 further comprising responsive to the amplitude of the second node voltage not being greater than the second voltage threshold, turning on a second amplifier coupled across the first node and the second node prior to an end of the startup phase.
5. The method as recited in claim 4 further comprising after turning on the second amplifier, entering the intermediate phase responsive to the amplitude of the second node voltage being greater than the second voltage threshold.
6. The method as recited in claim 5 further comprising turning off the second amplifier responsive to the amplitude of the second node voltage being greater than the second voltage threshold.
7. The method as recited in claim 4 further comprising changing from comparing the amplitude of the second node voltage to the second voltage threshold during the startup phase to comparing the amplitude of the first node voltage to the first voltage threshold during the intermediate phase.
8. The method as recited in claim 1 determining an end of the startup phase responsive to the end of the predetermined time period.
9. The method as recited in claim 1 further comprising setting tuning capacitors of the crystal oscillator to steady state values for both the intermediate phase and during a steady state phase following the intermediate phase.
10. The method as recited in claim 1 further comprising responsive to the intermediate phase ending, applying steady state biasing conditions to keep the first node voltage on the first node and a second node voltage on the second node to a desired steady state condition.
11. A crystal oscillator comprising: an injection circuit to inject, during a startup phase for starting the crystal oscillator, a first signal into a crystal of the crystal oscillator through a first node and to inject a second signal into the crystal through a second node, the first signal and the second signal being anti-phase signals; a control circuit to disable the injection circuit responsive to a passage of a predetermined period of time to stop the anti-phase signals from being injected; a first amplifier circuit coupled across the first node and the second node and used during the startup phase and an intermediate phase; and a compare circuit to compare an amplitude of a first node voltage on the first node to a first voltage threshold, an end of the intermediate phase being indicated when the amplitude of the first node voltage exceeds the first threshold voltage.
12. The crystal oscillator as recited in claim 11 wherein the injection circuit further comprises: a first three state driver to inject the first signal into the first node; and a second three state driver to inject the second signal into the second node.
13. The crystal oscillator as recited in claim 12 wherein respective outputs of the first three state driver and the second three state driver are at high impedance when disabled.
14. The crystal oscillator as recited in claim 11 wherein the compare circuit compares an amplitude of a second node voltage on the second node to a second voltage threshold during the startup phase after the injection circuit is disabled.
15. The crystal oscillator as recited in claim 14 wherein responsive to the compare circuit indicating the amplitude of the second node voltage is greater than the second voltage threshold, the crystal oscillator enters the intermediate phase.
16. The crystal oscillator as recited in claim 14 further comprising: a second amplifier circuit; and wherein responsive to compare circuit indicating during the startup phase and after the injection circuit is disabled that the amplitude of the second node voltage is not greater than the second voltage threshold, turning on the second amplifier circuit.
17. The crystal oscillator as recited in claim 16 wherein after enabling the second amplifier circuit, the crystal oscillator enters the intermediate phase responsive to the amplitude of the second node voltage being greater than the second voltage threshold.
18. The crystal oscillator as recited in claim 17 wherein inputs to the compare circuit are changed responsive to the amplitude of the second node voltage exceeding the second voltage threshold to compare the amplitude of the first node voltage to the first voltage threshold to determine the end of the intermediate phase.
19. The crystal oscillator as recited in claim 11 wherein the end of the startup phase is determined responsive to the passage of the predetermined period of time.
20. The crystal oscillator as recited in claim 11 further comprising the crystal.
21. A crystal oscillator comprising: a first node to couple to a first terminal of a crystal of the crystal oscillator and a second node to couple to a second terminal of the crystal; a first three state driver to inject, during a startup phase of the crystal oscillator, a first signal into the first node; a second three state driver to inject, during the startup phase, a second signal into the second node, the first signal and the second signal being anti-phase signals; a control circuit to disable the first three state driver and the second three state driver after a predetermined period of time to thereby disable injection and cause respective outputs of the first three state driver and the second three state driver to be high impedance; a first amplifier circuit coupled across the first node and the second node and used during the startup phase and an intermediate phase that follows the startup phase; and a second amplifier circuit coupled across the first node and the second node.
22. The crystal oscillator as recited in claim 21 further comprising: a compare circuit to compare an amplitude of a second node voltage on the second node to a startup phase voltage threshold after the injection has been disabled, the second amplifier circuit not being turned on responsive to the amplitude of the second node voltage exceeding the startup phase voltage threshold after injection is disabled and the second amplifier circuit being turned on responsive to the amplitude of the second node voltage not exceeding the startup phase voltage threshold; wherein responsive to the amplitude of the second node voltage exceeding the startup phase voltage threshold after the second amplifier circuit has been turned on, the second amplifier circuit is turned off, the startup phase ends, and the intermediate phase begins; and wherein the compare circuit compares an amplitude of a first node voltage on the first node to an intermediate phase voltage threshold during the intermediate phase, an end of the intermediate phase and a steady state phase beginning responsive to the amplitude of the first node voltage exceeding the intermediate phase voltage threshold.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
(1) The present invention may be better understood, and its numerous objects, features, and advantages made apparent to those skilled in the art by referencing the accompanying drawings.
(2)
(3)
(4)
(5)
(6)
(7)
(8)
(9)
(10)
(11)
(12)
(13)
(14)
(15)
(16)
(17)
(18)
(19) The use of the same reference symbols in different drawings indicates similar or identical items.
DETAILED DESCRIPTION
(20) Embodiments described herein inject a signal with the same frequency as the crystal during startup. When injecting a voltage signal across the crystal with the same frequency as the crystal, crystal current starts to build-up. The amplitude of the current in the crystal oscillator will start to grow linearly with time which can be modeled by:
(21)
(22) where V.sub.INJ is the voltage amplitude of the square signal across the terminals of the crystal. The equation is based on the assumption that f.sub.INJ=f.sub.0, which is the crystal frequency. In general, f.sub.INJ=f.sub.0+δf.sub.INJ and the growth of the amplitude of crystal current is not linear with time. An expression can be found when the quality factor of the crystal is very high (Q=ω.sub.0L.sub.S/R.sub.S), injection time is much shorter than 1/α where α=R.sub.S/(2LS) and injection time is comparable to 1/|δf.sub.INJ|:
(23)
The general expression is:
(24)
(25) During injection with a signal which has a frequency error of δf.sub.INJ, the amplitude of the current in the crystal builds up until it reaches a maximum then it collapses back again. The maximum can be calculated by setting π×|δf.sub.INJ|×T.sub.MAX=π/2. The equation can be used to determine the maximum acceptable T.sub.INJ or the maximum acceptable |δf.sub.INJ| formulated by:
(26)
(27) A one-step injection technique for crystal oscillator startup injects the crystal with a signal for a very short duration and then uses the crystal oscillator with a low amplitude output signal. That gives a very short startup time and a very low startup energy, but the amplitude of the oscillation is not sufficient to achieve low phase noise and low supply sensitivity required for, e.g., radio frequency (RF) performance. The approach requires an oscillator to be used for injection where it is trimmed to a frequency very close to crystal oscillation frequency and has low variation with temperature and supply voltage variations. Such applications use RC-oscillators or ring oscillators due to their small area since this oscillator is only used during startup of the crystal oscillator.
(28) Another approach for crystal startup achieves higher oscillation amplitude utilizing a four-step approach that includes two separate injection steps. In this four-step approach, an RC-ring oscillator (RC-RO) injects the crystal with differential rail-to-rail signals on the two crystal nodes coupled to the amplifier. The injection time is very short (T.sub.INJI˜2 μs) such that it can support variation of the injection frequency by ±5000 ppm across frequency. Following the first step, a phase-locked loop (PLL) is turned on and the output from the crystal oscillator is supplied to an all-digital PLL (ADPLL) as the reference signal to the ADPLL where the RO is the oscillator in the ADPLL. In step 2, the RO locks to the reference signal (the crystal frequency) and a digital frequency control word used to achieve lock is stored for use in step 3. The ADPLL preferably has a very fast lock time (T.sub.LOCK˜6 μs). To make the locking time faster, the phase of RO should be aligned with the reference clock from the crystal at the beginning of step 2 by resetting the edges of the RO to align to the reference clock.
(29) In step 3, the PLL is turned off and the second injection step takes place. Any variation of injection frequency in step 1 due to temperature is compensated by the digital frequency control word determined in step 2, such that the injection frequency after the PLL is at the crystal frequency f0 within an appropriate margin of error. When the PLL is turned off, the phase of the oscillator is kept the same. Since the frequency error is 0 (or close to 0) in the second injection step, the injection signals are applied to the crystal until the amplitude of current in the crystal reaches the target level. When the target level is achieved, the injection is disabled and the steady-state biasing conditions are applied to keep the oscillation amplitude constant with time in step 4. Note there is no procedure in this four-step approach for identifying that the target crystal current |i.sub.S,target| has been achieved, which is a drawback.
(30)
(31) One drawback of the two-step technique is that it uses a dedicated complete ADPLL just for starting-up the crystal oscillator, which consumes a large area in the chip. Furthermore, there is no clear methodology for determining whether the target current amplitude is achieved. That means that the oscillator design is not flexible to handle crystals of different properties.
(32) Embodiments described herein reduce crystal oscillator startup time as compared to, e.g., the approach described in
(33) Referring back to
(34) Compared to other approaches, the startup phase of the crystal oscillator circuit 700 is very short (˜3 μs) since the crystal current grows linearly with a high slope due to the injection of rail-to-rail signals on the XI and XO nodes. During the startup phase, it is better to keep C.sub.L1 and C.sub.L2 to a minimum value to decrease the capacitive load on the drivers to reduce their current consumption. The biasing current for the three state drivers 702 should be high to keep the driving signals into the XI and XO nodes rail-to-rail. The time of injection (Tim) can be calculated accurately using a counter and using the injected clock signal CLKINJ 704. Since embodiments require the clock to be within a certain accuracy (e.g., |δf.sub.INJ|<4150 ppm for 40 MHz crystal), T.sub.INJ can be determined accurately.
(35) Once the injection is disabled, the biasing current is reduced to the level used for the intermediate phase but still high enough to have a high voltage gain much greater than 1 between V.sub.XI and V.sub.XO. Although V.sub.XI is still small, but with the gain of the core amplifier, V.sub.XO grows quickly to be near rail-to-rail, as shown in
(36)
(37) The controller 708 ends the injection phase 902 based on the end of the period T.sub.INJ determined by the timer output from timer 728. In embodiments the injection time T.sub.INJ is programmable and stored in a register or other memory location accessible to the controller 708 and programmable through, e.g., a serial interface (not shown) or determined and stored in non-volatile memory during manufacturing testing. The controller deasserts INJE but keeps CE asserted at the beginning of the intermediate phase. The controller 708 applies the steady-state tuning for the tuning capacitors C.sub.L1 and C.sub.L2 at the beginning of the intermediate phase 904 to minimize the capacitance change between the intermediate phase and the steady-state phase. The end of the intermediate phase is determined by monitoring V.sub.XI and determining when V.sub.XI reaches a certain threshold voltage (TH) 729, which is supplied to the compare circuit 722 as the compare threshold PK_TH. When the V.sub.XI voltage amplitude is higher than the threshold TH, the compare circuit 722 changes the PKD signal 730 from low to high, which is sent to the controller 708. After the intermediate phase ends, the controller 708 applies the steady-state biasing condition to keep the amplitude of V.sub.XI and V.sub.XO steady with time. The controller also asserts SQE to turn on the squaring buffer 726 responsive to the beginning of the steady state phase.
(38) The total startup time for the injection phase and the intermediate phase can be calculated as:
(39)
(40) Assume, e.g., that T.sub.INJ=3 μs, k is a calibration factor ˜3/2, V.sub.XO,PP is ˜1.2 V, V.sub.DD is ˜1.4 V, L.sub.S is ˜6 mH, and |i.sub.S,target|=1.8 mApeak. |is(t=T.sub.INJ)|=0.446 mApeak and T.sub.STARTUP=43.6 μs.
(41) A crystal at 40 MHz with L.sub.S=6 mH, C.sub.S=2.64 fF, C.sub.0=0.8 pF, R.sub.S=14Ω, and C.sub.L=10 pF, is used as an example for calculating the startup time and startup energy of the crystal oscillator circuit 700 shown in
T.sub.STARTUP=T.sub.INJ+T.sub.INT 3 μs+40.6 μs=43.6 μs
Q.sub.STARTUP=T.sub.INJI.sub.VDD,INJ+T.sub.INTI.sub.VDD,INT≈7.7 nC+46.7 nC=54.4 nC,
which is a significant reduction in T.sub.STARTUP and Q.sub.STARTUP from the approach illustrated in
(42)
(43) In
(44) The choice as to whether to operate the startup phase in a first mode using both transconductance amplifiers including the high gain transconductance amplifier 1019 during the startup phase or a second mode using current injection with tristate drivers 702 during the startup phase can be determined in one embodiment by configuring the mode during power-on based, e.g., on a value of a programmed memory location in non-volatile memory (NVM). In other embodiments, the mode selection is pin programmable.
(45) Another embodiment provides the flexibility to use both startup approaches if conditions warrant. To provide such flexibility, the controller 1008 checks the amplitude of V.sub.XO after the injection time.
(46)
(47)
(48) As mentioned previously, it is undesirable to use a dedicated PLL for starting-up the crystal oscillator since such an approach consumes a large area of the integrated circuit. Accordingly, embodiments utilize an architecture in which a frequency synthesizer that is already on the integrated circuit, e.g., for radio operations, is also used as an injection source for crystal startup. That ensures that extra integrated circuit area is not dedicated solely to crystal startup. Thus, in embodiments a frequency synthesizer used during normal operation to provide a local oscillator clock signal also provides a clock injection signal for crystal startup.
(49) Mixer 1307 provides the down converted output signal as a set of two signals, an in-phase (Im) signal, and a quadrature (Qm) signal to programmable gain amplifiers (PGA) 108. The Im and Qm signals are analog time-domain signals. In at least one embodiment of receiver 1300, the analog amplifiers 1308 and filters (not separately illustrated) provide amplified and filtered version of the Im and Qm signals to an analog-to-digital converter (ADC) 1310, which converts those versions of the Im and Qm signals to digital Id and Qd signals. Exemplary embodiments of ADC 1310 use a variety of signal conversion techniques (e.g., delta-sigma (or sigma-delta) analog-to-digital conversion). ADC 1310 provides digital Id and Qd signals to channel filters 1311, which provides digital filtering of the digital Id and Qd signals and provides the filtered Ic and Qc signals to the demodulator 1318. The demodulator 1318 performs demodulation of the digital Ic and Qc signals to retrieve or extract information, such as data signals, that were modulated (e.g., in a transmitter (not shown)), and transmitted to antenna 1301 as RF signals. The demodulator 1318 provides the demodulated data to the data processing circuitry 1319. In embodiments data processing circuitry 1319 performs a variety of functions (e.g., logic, arithmetic, etc.). For example, data processing circuitry 1319 uses the demodulated data in a program, routine, or algorithm (whether in software, firmware, hardware, or a combination) to perform desired control or data processing tasks. In an embodiment, the data processing circuitry includes a processor such as a microcontroller and software and/or firmware to perform the desired functions. The memory 1320 stores software and firmware for use by data processing circuitry 1319 to perform various tasks and stores data supplied to or from data processing circuitry 1319. The memory 1320 may include multiple kinds of memory in various embodiments including dynamic random-access memory (DRAM), static random-access memory (SRAM), and/or non-volatile memory (NVM), according to system needs. In addition, while the data processing circuitry can access memory 1320, in embodiments, other system components, such as LO control block 1321 can also access memory 1320, or portions thereof. In embodiments, at least some functionality of LO control block 1321 are implemented by software/firmware running on a processor in data processing circuitry 1319.
(50)
(51) In an embodiment the crystal oscillator 1430 is similar to the crystal oscillator shown in
(52) The settings of crystal oscillator startup are calculated and saved when the integrated circuit is powered up for the first time. In the beginning the XO is started up without injection since the injection frequency is not set yet. Thus, the amplifiers Gm 718 and xGm 1019 are used for crystal startup for the initial power up. During initial power up operations, the settings of the VCO 1418 is calibrated by supplying CLKOUT 1430 to the PLL in the frequency synthesizer 1402 and determining the appropriate settings for KVW for DAC 1420, NDIV and/or the control word FWD for the ΣΔ modulator 1419 and NDIV to lock to the crystal frequency f.sub.XTAL. The controller 1416 saves the calibration data in a register or other memory associated controller 1416, e.g., memory 1440. The controller saves the data along with a reading of the temperature at calibration supplied by temperature sensor 1442. In that way, the settings can be adjusted for temperature during a subsequent calibration based on any temperature change since the initial calibration.
(53) When the integrated circuit enters sleep mode, the crystal oscillator is powered-down. As stated previously, in the initial powerup of the integrated circuit for typical IoT applications, the startup time/energy consumed is not very critical while the startup time/energy consumption becomes critical for exiting sleep mode since the integrated circuit repeatedly exits sleep mode to perform an integrated circuit operations such as RF operations (either transmitting or receiving) or other IoT functions associated with the integrated circuit. When exiting the sleep mode, the stored calibration settings for the VCO and the current temperature reading is used to set KVW (or FWD) so that CLKINJ is substantially equal to f.sub.XTAL (within an acceptable margin of error) so the injection contributes to startup. Note that the LC oscillator forming the VCO and the dividers (Div2 and MMD) are very fast so they will be active for injection purposes substantially only during the injection time T.sub.INJ with a little added time (˜0.3 μs).
(54) In a first embodiment, during crystal oscillator startup, the control values for CV1, CV2, and MMD are set at values that cause the frequency of CLKINJ to be close to the crystal frequency f.sub.XTAL while KVW (input digital word to the DAC) is set to mid-range. Later, KVW fine tunes the frequency to make CLKINJ closer to the frequency f.sub.XTAL. The resolution of the tuning is determined by the number of bits of the DAC 1420. At room temperature the DAC 1420 is set close to mid-range using the KVW value to allow the DAC to compensate for both temperature increases and decreases. The phase frequency detector 1404, the charge pump 1406, and the loop filter 1408 are disabled during injection to save power and the necessary portions of the PLL are enabled and the PLL is run open loop. Similarly, in embodiments that use an ADPLL, the time-to-digital converter and digital loop filter are turned off during injection. The time of injection is usually very short T.sub.INJ=2-3 μs.
(55) The LC oscillator such as used in VCO 1418 has a temperature drift of, e.g., +100 ppm/° C. The DAC 1420 should adjust for the temperature drift of frequency across the desired temperature range with some margin to ensure the injection frequency is accurate. In an embodiment, a calibration loop is run periodically (e.g., every 100 wakeup events or some other appropriate interval) and uses the temperature sensor 1442 to compensate for the slope of the LC oscillator frequency with temperature to reduce the temperature drift to 20 ppm/° C. Updated DAC control values are stored in memory 1440 for each calibration loop run to ensure temperature change does not cause the clock injection frequency at crystal startup to be too far from f.sub.XTAL, e.g., |δf.sub.INJ|≤2000 ppm. For −40° C. to 125° C., the residual frequency drift with temperature is ±2000 ppm. The injection time T.sub.INJ for an embodiment with those assumptions can be calculated as:
(56)
For T.sub.XTAL=25 ns (40 MHz), T.sub.INJ should be less than 6.25 μs.
(57) In a second embodiment, rather than setting the VCO oscillator frequency through the DAC 1420, the ΣΔ modulator 1419 sets the frequency through the multi-modulus divider 1412. In normal operation where the PLL supplies a clock signal for integrated circuit operation, e.g., in TX/RX modes, the synthesizer 1402 operates in a closed loop mode with the crystal oscillator output CLKOUT 1430 supplying the reference clock for PLL operation. During crystal oscillator startup, the frequency of the injection clock signal is set with high accuracy using the MMD 1412. The control signals NDIV, CV1, CV2 and the DAC are set to provide coarse tuning for CLKINJ. The ΣΔ modulator 1419 controls the MMD 1412 such that the frequency control word FWD sets the frequency of CLKINJ at f.sub.XTAL. Thus, the ΣΔ modulator 1419 fine tunes the injection frequency rather than the DAC. The MMD divider division ratio changes very quickly where the average of the frequency is f.sub.XTAL. The value of the FWD is determined at the initial power up and can be compensated for temperature in a temperature calibration that is periodically run. During crystal startup the PLL operates open loop with the loop filter, charge pump, and phase frequency detector shut down to reduce power consumption. In embodiments, the temperature is available on power up and the PLL locks to the frequency crystal oscillator frequency (frequency of CLKOUT). The values of NDIV and FWD determined at power up can be used for open loop operation such that the output of MMD is close to f XTAL. In addition, in embodiments, FWD and NDIV are compensated for temperature drift during operation. Thus, if temperature changes after power up, the accuracy of the injection frequency is still high.
(58)
(59)
(60) Thus, embodiments to achieve faster startup with less energy use have been described. The description of the invention set forth herein is illustrative and is not intended to limit the scope of the invention as set forth in the following claims. Other variations and modifications of the embodiments disclosed herein, may be made based on the description set forth herein, without departing from the scope of the invention as set forth in the following claims.