Startup method and startup circuit for crystal oscillator
Patent Information
- Application Number
- PCT/CN2025/135129
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2025-02-28
- Filing Date
- 2025-11-14
- Publication Date
- 2026-09-03
Smart Images

Figure CN2025135129_03092026_PF_FP_ABST
Abstract
Description
Crystal oscillator start-up method and start-up circuit Technical Field
[0001] This disclosure relates to the field of electronic circuit technology, and more specifically, to a method and circuit for starting a crystal oscillator. Background Technology
[0002] With the development of the Internet of Things (IoT) and wearable electronics, more and more micro-sized electronic devices are entering people's lives. Due to their small size, these devices have relatively small built-in battery capacities. To achieve longer standby times, the chips need to have a sleep function, entering a sleep state to save power when not in use and waking up when needed. This results in frequent sleep-wake cycles. As the crystal oscillator provides the source clock for the entire chip, it needs to restart oscillation every time the chip is woken up; therefore, the oscillation speed of the crystal oscillator is particularly important.
[0003] In related technologies, a ring oscillator is typically used to inject energy into the crystal to accelerate its start-up. However, because the oscillation frequency of the ring oscillator is greatly affected by process deviations and temperature changes, it cannot be guaranteed that its oscillation frequency will always be close to the frequency of the crystal oscillator. When there is a large deviation between the frequencies of the ring oscillator and the crystal oscillator, the injection effect is poor, and after the injection is completed, the oscillation amplitude of the crystal is small and does not meet the requirements. Therefore, this start-up method cannot achieve rapid start-up of the crystal oscillator. Summary of the Invention
[0004] The purpose of this disclosure is to provide a method and circuit for starting up a crystal oscillator, which can achieve rapid starting up of the crystal oscillator.
[0005] To achieve the above objectives, this disclosure provides a method for starting up a crystal oscillator, comprising:
[0006] Receive a crystal oscillator start signal, wherein the crystal oscillator start signal is used to indicate that the crystal oscillator needs to be started;
[0007] In response to the crystal oscillator start signal, the RC oscillator is started, and the injection selector selects to inject the signal generated by the RC oscillator as the first injection signal into the crystal oscillator;
[0008] The phase-locked loop is started so that it operates under the drive of the square wave signal output by the crystal oscillator, wherein the square wave signal is generated by the crystal oscillator based on the injected first injection signal;
[0009] After the phase-locked loop is locked, the injection selector selects to inject the signal generated by the phase-locked loop as the second injection signal into the crystal oscillator.
[0010] This disclosure also provides a crystal oscillator start-up circuit, including a control circuit, an injection selector, an RC oscillator, and a phase-locked loop, wherein:
[0011] The injection selector is used to select the injection signal for the injection crystal oscillator under the control of the control circuit.
[0012] The control circuit is configured to receive a crystal oscillator start signal, wherein the crystal oscillator start signal indicates that the crystal oscillator needs to be started; in response to the crystal oscillator start signal, start the RC oscillator and control the injection selector to select the signal generated by the RC oscillator as the first injection signal to be injected into the crystal oscillator; start a phase-locked loop (PLL) and control the PLL to operate under the drive of a square wave signal output by the crystal oscillator, wherein the square wave signal is generated by the crystal oscillator based on the injected first injection signal; after the PLL is locked, control the injection selector to select the signal generated by the PLL as the second injection signal to be injected into the crystal oscillator.
[0013] The RC oscillator is used to generate the first injected signal;
[0014] The phase-locked loop is used to generate the second injection signal.
[0015] By employing the above technical solution, rapid start-up of the crystal oscillator is achieved through a two-step energy injection method. First, an RC oscillator is used for initial energy injection (the first step), allowing the crystal oscillator to obtain a small signal amplitude. This signal is amplified into a square wave and used as the reference clock for the phase-locked loop (PLL). After the PLL locks, the loop is disconnected, and the PLL output signal is used as the injection signal for the second step of energy injection into the crystal oscillator. Since the PLL output signal frequency equals the reference clock frequency after locking, the injection efficiency from the PLL to the crystal oscillator is high. After injection, the crystal oscillator can obtain a high oscillation amplitude, meeting the usage requirements. Therefore, this disclosure enables the crystal oscillator to obtain sufficient start-up amplitude quickly, with a fast start-up process and low energy consumption, making it particularly suitable for scenarios requiring frequent start-up and stop of the crystal oscillator. Furthermore, since the first step of energy injection uses an RC oscillator, the oscillation frequency of which is mainly related to resistance and capacitance and is less affected by temperature changes. Therefore, it ensures that the oscillation frequency of the RC oscillator remains close to the resonant frequency of the crystal oscillator, guaranteeing the success of the first step of energy injection and improving the reliability of rapid start-up.
[0016] Other features and advantages of this disclosure will be described in detail in the following detailed description section. Attached Figure Description
[0017] The accompanying drawings are provided to further illustrate the present disclosure and form part of the specification. They are used together with the following detailed description to explain the present disclosure, but do not constitute a limitation thereof. In the drawings:
[0018] Figure 1 is a flowchart of a crystal oscillator start-up method according to an embodiment of the present disclosure.
[0019] Figure 2 is a schematic block diagram of the start-up circuit of a crystal oscillator according to an embodiment of the present disclosure.
[0020] Figure 3 is a schematic circuit diagram of the start-up circuit of a crystal oscillator according to an embodiment of the present disclosure.
[0021] Figure 4 is a schematic circuit diagram of a phase-locked loop according to an embodiment of the present disclosure.
[0022] Figure 5 is a schematic diagram of timing control signals according to an embodiment of the present disclosure.
[0023] Figure 6 is a schematic diagram of the oscillation waveform according to an embodiment of the present disclosure.
[0024] Figure 7 is a block diagram illustrating an electronic device according to an exemplary embodiment. Detailed Implementation
[0025] The specific embodiments of this disclosure will be described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are for illustration and explanation only and are not intended to limit this disclosure.
[0026] Figure 1 is a flowchart of a crystal oscillator start-up method according to an embodiment of the present disclosure. This start-up method can be applied to fields requiring frequent and rapid start-up of the crystal oscillator. The crystal oscillator may include a high-frequency crystal oscillator and a low-frequency crystal oscillator. As shown in Figure 1, the start-up method may include the following steps S11 to S14.
[0027] In step S11, a crystal oscillator start signal is received, wherein the crystal oscillator start signal is used to indicate that the crystal oscillator needs to be started.
[0028] In step S12, in response to the crystal oscillator start signal, the RC oscillator is started, and the injection selector selects to inject the signal generated by the RC oscillator as the first injection signal into the crystal oscillator.
[0029] Injecting the signal generated by the RC oscillator into the crystal oscillator as the first injection signal is the first step in energy injection into the crystal oscillator, also known as preliminary energy injection. This preliminary energy injection allows the crystal oscillator to obtain a smaller signal amplitude.
[0030] In step S13, the phase-locked loop is started so that it operates under the drive of the square wave signal output by the crystal oscillator, wherein the square wave signal is generated by the crystal oscillator based on the injected first injection signal.
[0031] After the signal generated by the RC oscillator is injected into the crystal oscillator as the first injection signal, the crystal oscillator will start oscillating and generate a low oscillation amplitude signal. This signal can be converted into a square wave signal and used as the reference clock of the phase-locked loop. That is, the phase-locked loop works under the drive of the square wave signal output by the crystal oscillator.
[0032] In some embodiments, the square wave signal output by the crystal oscillator can be counted, and the phase-locked loop (PLL) can be started after the count reaches a first threshold. This ensures that the square wave signal after the first threshold is stable, thereby ensuring that the reference clock of the PLL is stable. It should also be noted that even if the PLL is started, the signal injected in the first energy injection step is still the signal generated by the RC oscillator. That is, during the first energy injection step, the signal generated by the PLL is not injected into the crystal oscillator. This is because the locking process of the PLL requires a certain amount of time to complete, and the PLL has not yet completed locking during the first energy injection step.
[0033] In some embodiments, the phase-locked loop (PLL) can be started simultaneously with the RC oscillator. This allows the PLL to start immediately after the first energy injection step, further saving the PLL's locking time and thus reducing the overall start-up time of the crystal oscillator. It should also be noted that although the PLL and RC oscillator start simultaneously, the signal injected in the first energy injection step is the signal generated by the RC oscillator. That is, during the first energy injection step, the signal generated by the PLL is not injected into the crystal oscillator. This is because the PLL's locking process requires a certain amount of time to complete, and the PLL has not yet completed locking during the first energy injection step.
[0034] In some embodiments, the square wave signal output by the crystal oscillator can be counted, and the RC oscillator can be turned off after the count reaches a second threshold. This completes the first step of energy injection.
[0035] In step S14, after the phase-locked loop is locked, the injection selector selects to inject the signal generated by the phase-locked loop as the second injection signal into the crystal oscillator.
[0036] Injecting the signal generated by the phase-locked loop (PLL) into the crystal oscillator as the second injection signal constitutes the second step of energy injection. The crystal oscillator's startup process involves selecting and gradually amplifying minute random noise. Because quartz crystals have a high Q value and low random noise amplitude, their startup speed is relatively slow. Energy injection is equivalent to injecting a larger amplitude, same-frequency signal into the crystal oscillator, which facilitates faster startup. According to energy injection theory, the deviation between the frequency of the injected signal and the crystal's resonant frequency determines the maximum amplitude of the crystal oscillation after injection; the smaller the deviation, the larger the amplitude. For RC oscillators, due to temperature variations, only a frequency accuracy of 5000ppm can be achieved. This high frequency deviation results in poor injection performance, with the crystal oscillator only achieving an oscillation amplitude of 100mV-200mV after injection, which does not meet the performance requirements of radio frequency (RF) systems. Phase-locked loops (PLLs), as a mature frequency-locked loop, theoretically have zero frequency deviation and high clock accuracy. Therefore, after the initial energy injection, using the signal generated by the PLL as the injection signal for the crystal oscillator during the second energy injection step achieves good injection results and high injection efficiency. After injection, the crystal oscillator can obtain a high-amplitude oscillation signal. Due to the high efficiency and short time required for the second energy injection step, rapid start-up of the crystal oscillator can be achieved with low energy consumption during the start-up process.
[0037] In some embodiments, after the phase-locked loop (PLL) is locked but before the signal generated by the PLL is injected into the crystal oscillator as a second injection signal, the loop in the PLL can be disconnected, while maintaining the input voltage of the voltage-controlled oscillator (VCO) in the PLL during PLL locking. Disconnecting the loop avoids reverse interference from the crystal oscillator's output clock during injection and reduces the energy consumed during crystal oscillator startup. Maintaining the input voltage of the VCO during PLL locking ensures that the frequency of the VCO's output signal equals the frequency of the PLL's reference clock, ensuring injection efficiency and enabling the crystal oscillator to achieve a higher oscillation amplitude.
[0038] In some embodiments, the phase-locked loop (PLL) is shut down after a preset time following the injection of the second injection signal into the crystal oscillator. This completes the second step of energy injection. Shutting down the PLL after the second step of energy injection saves power consumption.
[0039] By employing the above technical solution, rapid start-up of the crystal oscillator is achieved through a two-step energy injection method. First, an RC oscillator is used for initial energy injection (the first step), allowing the crystal oscillator to obtain a small signal amplitude. This signal is amplified into a square wave and used as the reference clock for the phase-locked loop (PLL). After the PLL locks, the loop is disconnected, and the PLL output signal is used as the injection signal for the second step of energy injection into the crystal oscillator. Since the PLL output signal frequency equals the reference clock frequency after locking, the injection efficiency from the PLL to the crystal oscillator is high. After injection, the crystal oscillator can obtain a high oscillation amplitude, meeting the usage requirements. Therefore, this disclosure enables the crystal oscillator to obtain sufficient start-up amplitude quickly, with a fast start-up process and low energy consumption, making it particularly suitable for scenarios requiring frequent start-up and stop of the crystal oscillator. Furthermore, since the first step of energy injection uses an RC oscillator, the oscillation frequency of which is mainly related to resistance and capacitance and is less affected by temperature changes. Therefore, it ensures that the oscillation frequency of the RC oscillator remains close to the resonant frequency of the crystal oscillator, guaranteeing the success of the first step of energy injection and improving the reliability of rapid start-up. In addition, the use of a phase-locked loop makes it unaffected by process and temperature changes, resulting in good stability and ease of mass production.
[0040] Figure 2 is a schematic block diagram of a crystal oscillator start-up circuit according to an embodiment of the present disclosure. This start-up circuit can be applied to fields requiring frequent and rapid start-up of the crystal oscillator. As shown in Figure 2, the start-up circuit 20 may include a control circuit 21, an injection selector 24, an RC oscillator 22, and a phase-locked loop 23.
[0041] The injection selector 24 is used to select the injection signal for the crystal oscillator 30 under the control of the control circuit 21.
[0042] Control circuit 20 receives a crystal oscillator start signal, indicating that crystal oscillator 30 needs to be started. In response to the crystal oscillator start signal, control circuit 20 also starts RC oscillator 22 and controls injection selector 24 to select the signal generated by RC oscillator 22 as the first injection signal to be injected into crystal oscillator 30. Control circuit 20 also starts phase-locked loop 23 and controls it to operate under the drive of a square wave signal output from crystal oscillator 30, wherein the square wave signal is generated by crystal oscillator 30 based on the first injection signal. After phase-locked loop 23 is locked, control circuit 20 further controls injection selector 24 to select the signal generated by phase-locked loop 23 as the second injection signal to be injected into crystal oscillator 30.
[0043] RC oscillator 22 is used to generate the first injection signal.
[0044] Phase-locked loop 23 is used to generate the second injection signal.
[0045] Injecting the signal generated by the RC oscillator 22 into the crystal oscillator 30 as the first injection signal constitutes the first step of energy injection, or preliminary energy injection, into the crystal oscillator 30. This preliminary energy injection allows the crystal oscillator 30 to obtain a smaller signal amplitude. Injecting the signal generated by the phase-locked loop 23 into the crystal oscillator 30 as the second injection signal constitutes the second step of energy injection into the crystal oscillator 30.
[0046] In some embodiments, the control circuit 21 is further configured to count the square wave signal output by the crystal oscillator 30, and activate the phase-locked loop 23 after the count reaches a first threshold. This ensures that the square wave signal after the first threshold is stable, thereby ensuring that the reference clock of the phase-locked loop 23 is stable. Furthermore, it should be noted that even if the phase-locked loop 23 is activated, the signal injected in the first energy injection step is still the signal generated by the RC oscillator 22. That is, during the first energy injection step, the signal generated by the phase-locked loop 23 will not be injected into the crystal oscillator 30. This is because the locking process of the phase-locked loop 23 requires a certain amount of time to complete, and during the first energy injection step, the phase-locked loop 23 has not yet completed locking.
[0047] In some embodiments, the control circuit 21 also starts the phase-locked loop 23 simultaneously with the RC oscillator 22. This allows the phase-locked loop 23 to start immediately after the first energy injection begins, further saving the locking time of the phase-locked loop 23 and thus reducing the total start-up time of the crystal oscillator 30. It should also be noted that although the phase-locked loop 23 and the RC oscillator 22 start simultaneously, the signal injected in the first energy injection is the signal generated by the RC oscillator 22. That is, during the first energy injection, the signal generated by the phase-locked loop 23 is not injected into the crystal oscillator 30. This is because the locking process of the phase-locked loop 23 requires a certain amount of time to complete, and during the first energy injection, the phase-locked loop 23 has not yet completed locking.
[0048] In some embodiments, the control circuit 21 is further configured to count the square wave signal output by the crystal oscillator 30, and after the count reaches a second threshold, to turn off the RC oscillator 22. This completes the first step of energy injection.
[0049] In some embodiments, the phase-locked loop 23 includes: a loop-breaking circuit for breaking the loop in the phase-locked loop 23 after it is locked and before the second injection signal is injected into the crystal oscillator 30; and a voltage holding circuit for maintaining the input voltage of the voltage-controlled oscillator in the phase-locked loop 23 when it is locked. By breaking the loop in the phase-locked loop 23, the voltage-controlled oscillator in the phase-locked loop 23 can be prevented from being interfered with by the reverse clock of the output clock of the crystal oscillator 30 during the injection process, and the energy consumed by the crystal oscillator 30 during oscillation can also be reduced. By maintaining the input voltage of the voltage-controlled oscillator in the phase-locked loop 23 when it is locked, the frequency of the output signal of the voltage-controlled oscillator can be ensured to be equal to the frequency of the reference clock of the phase-locked loop 23, thus ensuring injection efficiency and enabling the crystal oscillator 30 to obtain a higher oscillation amplitude.
[0050] In some embodiments, the phase-locked loop 23 is shut down after a preset time following the injection of the second injection signal into the crystal oscillator 30. This completes the second step of energy injection. Shutting down the phase-locked loop 23 after the second step of energy injection saves power.
[0051] By employing the above technical solution, rapid start-up of the crystal oscillator is achieved through a two-step energy injection method. First, an RC oscillator is used for initial energy injection (the first step), allowing the crystal oscillator to obtain a small signal amplitude. This signal is amplified into a square wave and used as the reference clock for the phase-locked loop (PLL). After the PLL locks, the loop is disconnected, and the PLL output signal is used as the injection signal for the second step of energy injection into the crystal oscillator. Since the PLL output signal frequency equals the reference clock frequency after locking, the injection efficiency from the PLL to the crystal oscillator is high. After injection, the crystal oscillator can obtain a high oscillation amplitude, meeting the usage requirements. Therefore, this disclosure enables the crystal oscillator to obtain sufficient start-up amplitude quickly, with a fast start-up process and low energy consumption, making it particularly suitable for scenarios requiring frequent start-up and stop of the crystal oscillator. Furthermore, since the first step of energy injection uses an RC oscillator, the oscillation frequency of which is mainly related to resistance and capacitance and is less affected by temperature changes. Therefore, it ensures that the oscillation frequency of the RC oscillator remains close to the resonant frequency of the crystal oscillator, guaranteeing the success of the first step of energy injection and improving the reliability of rapid start-up.
[0052] Figure 3 is a schematic circuit diagram of the start-up circuit of a crystal oscillator according to an embodiment of the present disclosure.
[0053] In Figure 3, XTAL and C0, C1 represent the quartz crystal and the load capacitor, respectively. Crystal oscillator 30 drives the quartz crystal XTAL, responsible for its oscillation, and converts the sinusoidal oscillation signals (XIN, XOUT) at both ends of the quartz crystal XTAL into a square wave signal CLK_XTAL. RC oscillator 22 provides the injection signal for the first step of energy injection (i.e., the first injection signal mentioned earlier), phase-locked loop 23 provides the injection signal for the second step of energy injection (i.e., the second injection signal mentioned earlier), injection selector 24 selects the injection signal for injection, and injection driver 25 drives the signal selected by injection selector 24 into the injection signal and injects it into crystal oscillator 30. Control circuit 21 generates timing control signals for each module and switch (e.g., RC oscillator 22, phase-locked loop 23, injection selector 24, injection driver 25, etc.), controlling the opening and closing of each module.
[0054] The working principle of the oscillation circuit 20 shown in Figure 3 is as follows.
[0055] When the crystal oscillator start signal (i.e., the START signal) changes from 0 to 1, the crystal oscillator 30 is turned on. Simultaneously, the control circuit 21 sets the RC oscillator enable signal and the injection driver enable signal to 1, enabling the RC oscillator 22 and the injection driver 25. The RC oscillator 22 starts and generates a first injection signal CLK_OSC. This first injection signal passes through the injection selector 24 and is then injected into the crystal oscillator 30 by the injection driver 25. Afterward, the crystal oscillator 30 generates a square wave signal CLK_XTAL, which is sent to the control circuit 21 and the phase-locked loop 23. The control circuit 21 counts this square wave signal, and when a certain time threshold (e.g., a first threshold) is reached, it sets the phase-locked loop enable signal (PLL_EN) to 1, enabling the phase-locked loop 23. The phase-locked loop 23 then begins operation under the drive of the square wave signal CLK_XTAL. The control circuit 21 continues to count the square wave signal CLK_XTAL. When it reaches another time threshold (e.g., the second threshold), it will turn the RC oscillator enable signal and the injection driver enable signal to 0, turn off the RC oscillator 22 and the injection driver 25, and complete the first step of energy injection.
[0056] After completing the first step of energy injection, the phase-locked loop 23, driven by the square wave signal CLK_XTAL (i.e., the reference clock), locks after a period of time. At this point, the second injection signal CLK_PLL output by the phase-locked loop 23 has the same frequency as the reference clock CLK_XTAL. After the phase-locked loop 23 locks, the phase-locked loop lock signal (PLL_LOCK) changes from 0 to 1, controlling the phase-locked loop 23 to disconnect the loop. Simultaneously, the phase-locked loop lock signal is sent to the control circuit 21. Driven by this phase-locked loop lock signal, the control circuit 21 generates an injection selector control signal and an injection driver enable signal. The injection selector 24 selects the second injection signal CLK_PLL output by the phase-locked loop 23 according to the injection selector control signal and outputs it to the injection driver 25. Driven by the injection driver enable signal, the injection driver 25 begins the second step of energy injection. After a certain period of time, the control circuit 21 changes the injection driver enable signal back to 0, ending the second step of energy injection, and simultaneously changes the phase-locked loop enable signal to 0, shutting down the phase-locked loop 23 to save power. Since the injection signal frequency during the second step of energy injection is close to the oscillation frequency of the crystal oscillator 30, the injection efficiency is high and the injection effect is obvious. After the injection is completed, the crystal oscillator 30 obtains a high oscillation amplitude, and the whole process takes a short time, thus achieving the purpose of rapid oscillation.
[0057] It should be noted that during the first energy injection phase, even if the phase-locked loop 23 is activated, the injection selector 24 only selects the signal generated by the RC oscillator 22 as the injection signal for the crystal oscillator 30, and does not select the signal generated by the phase-locked loop 23. This is because even if the phase-locked loop 23 is activated during the first energy injection phase, the locking process of the phase-locked loop 23 requires a certain amount of time to complete. During the first energy injection phase, the phase-locked loop 23 has not yet completed locking, and the output signal of the phase-locked loop 23 that has not completed locking will not be in sync with the reference clock CLK_XTAL. In other words, during the locking process of the phase-locked loop 23, only the signal generated by the RC oscillator 22 is selected as the injection signal for the crystal oscillator 30; after the phase-locked loop 23 is locked, the signal generated by the phase-locked loop 23 is selected as the injection signal for the crystal oscillator 30. In this way, on the one hand, the time during the locking process of the phase-locked loop 23 can be fully utilized for injection, and on the other hand, after the phase-locked loop 23 is locked, the signal generated by the phase-locked loop 23 can be injected into the crystal oscillator 30 as an injection signal to inject energy more quickly.
[0058] Figure 4 is a schematic circuit diagram of a phase-locked loop according to an embodiment of the present disclosure.
[0059] As shown in Figure 4, the phase-locked loop 23 adopts a charge pump phase-locked loop structure, consisting of a phase frequency detector (PFD) 231, a charge pump (CHP) 233, a low-pass filter (LPF) 234, a voltage-controlled oscillator (VCO) 235, and a lock-in detection circuit 232. When the phase-locked loop enable signal PLL_EN is 1, the phase-locked loop 23 starts working. After a certain period of time, the phase-locked loop 23 locks, and the lock-in detection circuit 232 generates a PLL_LOCK signal. At this time, the frequency of the output signal CLK_PLL of VCO 235 is equal to the frequency of the reference clock CLK_XTAL of the phase-locked loop 23. Furthermore, after locking, the phase-locked loop 23, under the control of the inverted signal PLL_LOCKB of the PLL_LOCK signal, disconnects the switch 237 between CHP 233 and LPF 234, thereby breaking the loop of the phase-locked loop 23. The inverted signal PLL_LOCKB is output by the inverter 236. After the loop of the phase-locked loop 23 is broken, the voltage VC maintained on LPF 234 during the phase-locked loop 23 remains constant. VCO 235 continues to output the signal CLK_PLL under the control of the VC voltage. Since the voltage maintained by LPF 234 is the same as the voltage during the phase-locked loop 23, the oscillation frequency of VCO 235 is consistent with that during the phase-locked loop 23. The frequency of the signal output by VCO 235 is also the same as that during the phase-locked loop 23, both being equal to the reference clock. This is crucial for the second step of energy injection. Since the frequency of the output signal CLK_PLL of VCO 235 is equal to the frequency of the reference clock CLK_XTAL of the phase-locked loop 23, the injection efficiency is high, which allows the crystal oscillator 30 to quickly obtain a higher oscillation amplitude.
[0060] Figure 5 is a schematic diagram of timing control signals according to an embodiment of the present disclosure. These timing control signals are generated by a control circuit 21, whose input signals include CLK_XTAL signals, PLL_LOCK signals, etc. These timing control signals generated by the control circuit 21 are used to control the entire two-step injection process.
[0061] In practical applications, the timing of the timing control signals described above is not the only feasible approach. For example, the phase-locked loop 23 can be activated after the first energy injection step is completed. Alternatively, the phase-locked loop 23 can be activated immediately after the first energy injection step begins to further reduce the locking time of the phase-locked loop 23, thereby reducing the total start-up time of the crystal oscillator 30.
[0062] Figure 6 is a schematic diagram of the start-up waveform according to an embodiment of the present disclosure, showing the start-up waveform when using a 24MHz high-frequency crystal oscillator. It can be seen that the crystal oscillator of the present disclosure has a fast start-up speed, completing the two-step energy injection in only 32μS, while crystals without energy injection typically require 500μS to start up. The present disclosure increases the start-up speed by nearly 15 times. Therefore, the crystal of the present disclosure has a fast start-up speed, enabling it to output a stable clock in a shorter time, thereby consuming less energy during the start-up process. This can significantly reduce power consumption in scenarios requiring frequent start-up and stop of the crystal oscillator.
[0063] Figure 7 is a block diagram illustrating an electronic device 700 according to an exemplary embodiment. As shown in Figure 7, the electronic device 700 may include a processor 701 and a memory 702. The electronic device 700 may also include one or more of a multimedia component 703, an input / output (I / O) interface 704, and a communication component 705.
[0064] The processor 701 controls the overall operation of the electronic device 700 to complete all or part of the steps in the crystal oscillator start-up method described above. The memory 702 stores various types of data to support the operation of the electronic device 700. This data may include, for example, instructions for any application or method operating on the electronic device 700, and application-related data such as contact data, sent and received messages, pictures, audio, video, etc. The memory 702 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. Multimedia component 703 may include a screen and an audio component. The screen may be, for example, a touchscreen, and the audio component is used to output and / or input audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signals may be further stored in memory 702 or transmitted via communication component 705. The audio component also includes at least one speaker for outputting audio signals. I / O interface 704 provides an interface between processor 701 and other interface modules, such as a keyboard, mouse, buttons, etc. These buttons may be virtual or physical buttons. Communication component 705 is used for wired or wireless communication between the electronic device 700 and other devices. Wireless communication may include Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G, or 4G, or a combination of these. Therefore, the corresponding communication component 705 may include a Wi-Fi module, a Bluetooth module, or an NFC module.
[0065] In an exemplary embodiment, the electronic device 700 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above-described crystal oscillator start-up method.
[0066] In another exemplary embodiment, a computer-readable storage medium including program instructions is also provided, which, when executed by a processor, implement the steps of the crystal oscillator start-up method described above. For example, the computer-readable storage medium may be the memory 702 including program instructions described above, which may be executed by the processor 701 of the electronic device 700 to complete the crystal oscillator start-up method described above.
[0067] In another exemplary embodiment, a computer program product is also provided, which includes a computer program executable by a processor, which, when executed by the processor, implements the steps of the above-described crystal oscillator start-up method.
[0068] The preferred embodiments of this disclosure have been described in detail above with reference to the accompanying drawings. However, this disclosure is not limited to the specific details of the above embodiments. Within the scope of the technical concept of this disclosure, various simple modifications can be made to the technical solutions of this disclosure, and these simple modifications all fall within the protection scope of this disclosure.
[0069] It should also be noted that the various specific technical features described in the above embodiments can be combined in any suitable manner without contradiction. To avoid unnecessary repetition, this disclosure will not describe the various possible combinations separately.
[0070] Furthermore, various different embodiments of this disclosure can be combined in any way, as long as they do not violate the spirit of this disclosure, they should also be regarded as the content disclosed in this disclosure.
Claims
1. A method for starting up a crystal oscillator, characterized in that, include: Receive a crystal oscillator start signal, wherein the crystal oscillator start signal is used to indicate that the crystal oscillator needs to be started; In response to the crystal oscillator start signal, the RC oscillator is started, and the injection selector selects to inject the signal generated by the RC oscillator as the first injection signal into the crystal oscillator; The phase-locked loop is started so that it operates under the drive of the square wave signal output by the crystal oscillator, wherein the square wave signal is generated by the crystal oscillator based on the injected first injection signal; After the phase-locked loop is locked, the injection selector selects to inject the signal generated by the phase-locked loop as the second injection signal into the crystal oscillator.
2. The method for starting up a crystal oscillator according to claim 1, characterized in that, The vibration initiation method further includes: The square wave signal output by the crystal oscillator is counted; After the count reaches the first threshold, the phase-locked loop is activated.
3. The method for starting up a crystal oscillator according to claim 1, characterized in that, The vibration initiation method further includes: The phase-locked loop is started simultaneously with the RC oscillator.
4. The method for starting up a crystal oscillator according to claim 1, characterized in that, The vibration initiation method further includes: The square wave signal output by the crystal oscillator is counted; After the count reaches the second threshold, the RC oscillator is turned off.
5. The method for starting up a crystal oscillator according to claim 1, characterized in that, The vibration initiation method further includes: After the phase-locked loop is locked and before the signal generated by the phase-locked loop is injected into the crystal oscillator as the second injection signal, the loop in the phase-locked loop is broken, and the input voltage of the voltage-controlled oscillator in the phase-locked loop is maintained when the phase-locked loop is locked.
6. The method for starting up a crystal oscillator according to claim 1, characterized in that, The vibration initiation method further includes: After a preset time has elapsed since the second injection signal was injected into the crystal oscillator, the phase-locked loop is shut down.
7. A starting circuit for a crystal oscillator, characterized in that, It includes a control circuit, an injection selector, an RC oscillator, and a phase-locked loop, wherein: The injection selector is used to select the injection signal for the injection crystal oscillator under the control of the control circuit. The control circuit is configured to receive a crystal oscillator start signal, wherein the crystal oscillator start signal indicates that the crystal oscillator needs to be started; in response to the crystal oscillator start signal, start the RC oscillator and control the injection selector to select the signal generated by the RC oscillator as the first injection signal to be injected into the crystal oscillator; start a phase-locked loop (PLL) and control the PLL to operate under the drive of a square wave signal output by the crystal oscillator, wherein the square wave signal is generated by the crystal oscillator based on the injected first injection signal; after the PLL is locked, control the injection selector to select the signal generated by the PLL as the second injection signal to be injected into the crystal oscillator. The RC oscillator is used to generate the first injected signal; The phase-locked loop is used to generate the second injection signal.
8. The oscillation circuit for the crystal oscillator according to claim 7, characterized in that, The control circuit is also used for: The square wave signal output by the crystal oscillator is counted, and the phase-locked loop is started after the count reaches a first threshold. or The phase-locked loop is started simultaneously with the RC oscillator.
9. The oscillation circuit for the crystal oscillator according to claim 7, characterized in that, The control circuit is also used for: The square wave signal output by the crystal oscillator is counted, and the RC oscillator is turned off after the count reaches a second threshold.
10. The oscillation circuit of the crystal oscillator according to claim 7, characterized in that, The phase-locked loop includes: A loop disconnect circuit is used to disconnect the loop in the phase-locked loop after the phase-locked loop is locked and before the second injection signal is injected into the crystal oscillator. A voltage holding circuit is used to maintain the input voltage of the voltage-controlled oscillator in the phase-locked loop when the phase-locked loop is locked.