Crystal oscillator circuit capable of detecting abnormality in rapid oscillation process of crystal oscillator and maintaining low power consumption

By detecting abnormal crystal oscillator startup through a built-in oscillator, the problem of excessive power consumption in the crystal oscillator circuit during abnormal conditions is solved, realizing a low-power crystal oscillator circuit design and improving the user experience.

CN116155263BActive Publication Date: 2026-07-21EEASY TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
EEASY TECH CO LTD
Filing Date
2022-12-13
Publication Date
2026-07-21

Smart Images

  • Figure CN116155263B_ABST
    Figure CN116155263B_ABST
Patent Text Reader

Abstract

The application discloses a crystal oscillator circuit capable of detecting abnormality in a rapid starting process of a crystal oscillator and keeping low power consumption, comprising a built-in oscillator, the built-in oscillator is connected with a first current source through a third switch, and outputs a clock to a crystal oscillator starting detection circuit; the crystal oscillator is connected with a second current source through a second switch and connected with a third current source through a first switch, and outputs a clock to the crystal oscillator starting detection circuit; the crystal oscillator starting detection circuit judges whether the crystal oscillator starts or not according to the clock outputted by the built-in oscillator and the crystal oscillator, and outputs a switch control signal to control the closing and opening of the first, second and third switches according to the judgment result. The built-in oscillator is used to detect whether the crystal oscillator starts abnormally, if the crystal oscillator starts abnormally, the large current used for the rapid starting of the crystal oscillator is closed, the small current used for the normal working mode of the crystal oscillator is also closed, and the current of the built-in oscillator is also closed, so that the power consumption is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to electronic technology, specifically to a crystal oscillator circuit that can detect abnormalities during rapid start-up of a crystal oscillator while maintaining low power consumption. Background Technology

[0002] A crystal oscillator (CQO) is a resonant device that utilizes the piezoelectric effect of a quartz crystal. Because quartz crystals have a very high quality factor, they can generate accurate and stable reference clock signals for system use when combined with other components.

[0003] In recent years, with the rapid development of portable electronic devices, people have placed increasingly higher demands on the devices' fast startup and low power consumption. As the source of the electronic device system's reference clock, the crystal oscillator typically needs to be the first to start and remain constantly on during system standby. Therefore, startup time and power consumption are particularly important for crystal oscillators. To address this, crystal oscillator circuit design usually uses a large current during the crystal startup phase to achieve greater gain and accelerate oscillation. After startup, the large current is then turned off by the crystal oscillator's clock signal through logic circuitry, thus resolving the conflict between startup time and low power consumption.

[0004] like Figure 1 The diagram shows a traditional fast-start crystal oscillator block diagram, mainly including a small current source with a current value of ibxtal_s, a large current source with a current value of ibxtal_b, a switch SW1, a crystal oscillator, and crystal oscillator logic circuitry. During the start-up phase, the switch SW1 of the large current source of the crystal oscillator is closed by default, and the crystal oscillator operates in a high-current fast-start-up mode. After the crystal oscillator starts oscillating, the crystal oscillator logic circuit generates a signal s1 to open the switch SW1 of the large current source, returning to low-power mode. This approach is used in patent CN104218915B, "A Low-Power, Fast-Start-Up Crystal Oscillator Circuit with Automatic Detection Function," applied for by Changsha Jingjia Microelectronics Co., Ltd. A similar approach is used in patent CN114189244A, "A Crystal Oscillator Circuit Method for Adjusting Gain," applied for by Shanghai Meiren Semiconductor Co., Ltd.

[0005] However, the above solution is based on the premise that the crystal oscillator can start oscillating successfully. Only when the crystal oscillator starts oscillating can there be a crystal clock. Only when the crystal clock is valid can the crystal oscillator logic circuit work properly and further shut off the large start-up current. Otherwise, once the crystal oscillator malfunctions (crystal malfunction, crystal surface mount malfunction, main control chip packaging malfunction, main control chip surface mount malfunction, etc.), the default large current of the crystal oscillator will quickly deplete the battery power. Before the user receives the product, the battery (such as a button cell battery) may have been completely depleted without any signal indication, which seriously affects the user experience. Summary of the Invention

[0006] The purpose of this invention is to overcome the shortcomings of the prior art and provide a crystal oscillator circuit that can detect abnormalities during the rapid start-up of the crystal oscillator and maintain low power consumption.

[0007] To achieve the above objectives, the technical solution of the present invention is as follows:

[0008] A crystal oscillator circuit capable of detecting abnormalities during rapid start-up of a crystal oscillator while maintaining low power consumption includes a first current source, a second current source, a third current source, a first switch, a second switch, a third switch, a built-in oscillator, a crystal oscillator, and a crystal oscillator start-up detection circuit.

[0009] The built-in oscillator is connected to the first current source through a third switch, and the output clock is sent to the crystal oscillator start-up detection circuit.

[0010] The crystal oscillator is connected to a second current source via a second switch and to a third current source via a first switch, and its output clock is sent to the crystal oscillator start-up detection circuit.

[0011] The crystal oscillator start-up detection circuit is used to determine whether the crystal oscillator has started oscillating based on the clock output by the built-in oscillator and the crystal oscillator, and outputs switch control signals to control the closing and opening of the first switch, the second switch and the third switch respectively based on the determination result.

[0012] Furthermore, the positive terminals of the first, second, and third current sources are all connected to a power supply; the built-in oscillator is connected to the negative terminal of the first current source via a third switch, the crystal oscillator is connected to the negative terminal of the second current source via a second switch, and to the negative terminal of the third current source via a first switch.

[0013] Furthermore, after the power supply is powered on and the reset is released, the first switch, the second switch, and the third switch are all closed by default.

[0014] Furthermore, if the crystal oscillator fails to start oscillating within a set time, the switch control signal controls the first switch, the second switch, and the third switch to open.

[0015] Furthermore, the third current source is used to start the crystal oscillator, the second current source is used for the normal operation of the crystal oscillator, and the current value of the third current source is greater than the current value of the second current source.

[0016] Furthermore, within a set time period, the crystal oscillator can start oscillating, and the switch control signal controls the opening of the first switch and the third switch.

[0017] Furthermore, the built-in oscillator is a ring oscillator.

[0018] Furthermore, the built-in oscillator is an RC oscillator.

[0019] Furthermore, the presence of the clock clkxtal generated by the built-in oscillator is detected by the crystal oscillator start-up detection circuit to determine whether the crystal oscillator has started oscillating.

[0020] Furthermore, the crystal oscillator failed to start oscillating, and simultaneously output a crystal oscillator failure to start indication signal.

[0021] Compared with the prior art, the advantages of this invention are as follows:

[0022] This invention uses a built-in oscillator to detect whether the crystal oscillator is malfunctioning. If it is malfunctioning, the large current used for rapid crystal oscillator startup is turned off, as well as the small current used for normal crystal oscillator operation. The built-in oscillator current is also turned off, and a crystal oscillator failure to start signal is output. In other words, when the crystal oscillator is malfunctioning, the entire crystal oscillator circuit enters an ultra-low power consumption state to avoid excessive power consumption. Attached Figure Description

[0023] Figure 1 This is a block diagram of a traditional crystal oscillator with fast start-up.

[0024] Figure 2 A block diagram of a crystal oscillator circuit provided in an embodiment of the present invention, which can detect abnormalities during rapid crystal oscillation and maintain low power consumption;

[0025] Figure 3 A flowchart illustrating the steps of a method for detecting anomalies during rapid crystal oscillation start-up while maintaining low power consumption. Detailed Implementation

[0026] Example:

[0027] The technical solution of the present invention will be further described below with reference to the accompanying drawings and embodiments.

[0028] See Figure 2 As shown, the crystal oscillator circuit provided in this embodiment mainly includes the following modules: a first current source 201 with a current value of ibosc, a second current source 202 with a current value of ibxtal_s, a third current source 203 with a current value of ibxtal_b, a first switch SW1, a second switch SW2, a third switch SW3, a built-in oscillator 204, a crystal oscillator 205, and a crystal oscillator start-up detection circuit 206. The current value ibxtal_b is greater than the current value ibxtal_s.

[0029] The positive terminals of the first, second, and third current sources 201, 202, and 203 are all connected to the power supply VCC;

[0030] The built-in oscillator 204 is connected to the negative terminal of the first current source 201 through the third switch SW3, and the output clock clkosc is sent to the crystal oscillator start-up detection circuit 206.

[0031] The crystal oscillator 205 is connected to the negative terminal of the second current source 202 through the second switch SW2, and to the negative terminal of the third current source 203 through the first switch SW1. The output clock clkxtal is sent to the crystal oscillator start-up detection circuit 206.

[0032] The crystal oscillator start-up detection circuit 206 outputs switch control signals s1, s2, and s3 to control the opening and closing of the first, second, and third switches SW1, SW2, and SW3, respectively.

[0033] clkxtal_ou and clkxtal_fail_flag are the clock and crystal oscillator failure to start indication signals output by the crystal oscillator start detection circuit 206, respectively.

[0034] After the power supply VCC is powered on and the reset is released, the switch control signals s1, s2, and s3 control the first, second, and third switches SW1, SW2, and SW3 respectively, all of which are closed by default. The built-in oscillator 204 starts oscillating with the current ibosc, and the crystal oscillator 205 starts oscillating with the current ibxtal_s plus ibxtal_b. Since the built-in oscillator 204, compared to the crystal oscillator 205, does not depend on external factors such as the crystal, crystal chip, main control chip package, or main control chip surface mount, it is guaranteed to oscillate. The clock clkoscillator generated by the built-in oscillator 204 can trigger the normal operation of the crystal oscillation detection circuit 206. Then, by detecting whether the clock clkxtal generated by the crystal oscillator 205 exists through the crystal oscillator detection circuit 206, it can be determined whether the crystal oscillator has started oscillating.

[0035] If the crystal oscillator 205 fails to start oscillating within a certain time (e.g., T1), it indicates that the crystal oscillator 205 is abnormal. At this time, the crystal oscillator start-up detection circuit 206 only receives the clock clkosc transmitted by the built-in oscillator 204, and outputs switch control signals s0, s1, and s2 to control the first, second, and third switches SW1, SW2, and SW3 to open respectively. This means that the large current ibxtal_b used for the rapid start-up of the crystal oscillator 205 is turned off, as is the small current ibxtal_s of the crystal oscillator 205 in normal working mode. At the same time, the current ibosc of the built-in oscillator 204 is also turned off, and a crystal oscillator failure to start oscillation indication signal is output. In this way, the entire circuit will enter an ultra-low power consumption mode to avoid excessive power consumption when the crystal oscillator is abnormal.

[0036] If the crystal oscillator 205 can start oscillating within a certain time (e.g., T1), the crystal oscillator start-up detection circuit 206 can receive the clock clkosc from the built-in oscillator 204 and the clock clkxtal from the crystal oscillator 205. After oscillating for a period of time (e.g., T2), the crystal oscillator start-up detection circuit 206 outputs switch control signals s1, s2, and s3, opening the first and third switches SW1 and SW3 and keeping the second switch SW2 closed. This means turning off the large current ibxtal_b used for rapid start-up of the crystal oscillator 205, but maintaining the small current ibxtal_s of the crystal oscillator 205 in normal operating mode. At the same time, it also turns off the current ibosc of the built-in oscillator 204. In this way, the entire circuit will enter a low-power mode.

[0037] Therefore, the present invention uses a built-in oscillator to detect whether the crystal oscillator is malfunctioning. If it is malfunctioning, the large current used for rapid crystal oscillator startup is turned off, as well as the small current used for normal operation of the crystal oscillator. The built-in oscillator current is also turned off, and a crystal oscillator failure indication signal is output. That is, when the crystal oscillator is malfunctioning, the entire crystal oscillator circuit enters an ultra-low power consumption state to avoid excessive power consumption.

[0038] As an example, the built-in oscillator can be a ring oscillator.

[0039] As an example, the built-in oscillator can be an RC oscillator.

[0040] Accordingly, this embodiment provides a method for detecting abnormalities during the rapid start-up of a crystal oscillator while maintaining low power consumption, such as... Figure 3 As shown, it includes the following steps:

[0041] Step 1: Power on the device and release the reset button.

[0042] Step 2: (Default) The small current and large current switches of the crystal oscillator are closed, and the built-in oscillator current switch is closed.

[0043] Step 3: Start the built-in oscillator

[0044] Step 4: Check whether the crystal oscillator has started oscillating at time T1.

[0045] Step 5-1: If the crystal oscillator fails to start oscillating at time T1, the small current and large current switches of the crystal oscillator are turned on, the built-in oscillator current switch is turned on, and a failure to start oscillating indication signal is output. The entire circuit is in an ultra-low power consumption state.

[0046] Step 5-2: If the crystal oscillator has started oscillating at time T1, wait for time T2, output the crystal oscillator clock, and proceed to step 6.

[0047] Step 6: Keep the small current switch of the crystal oscillator closed and the large current switch open. The built-in oscillator current switch is open, and the overall circuit is in a low-power state.

[0048] The above embodiments are merely illustrative of the technical concept and features of the present invention, and are intended to enable those skilled in the art to understand the content of the present invention and implement it accordingly. They should not be construed as limiting the scope of protection of the present invention. All equivalent changes or modifications made based on the essence of the content of the present invention should be covered within the scope of protection of the present invention.

Claims

1. A crystal oscillator circuit capable of detecting abnormalities during rapid start-up of a crystal oscillator while maintaining low power consumption, characterized in that, It includes a first current source, a second current source, a third current source, a first switch, a second switch, a third switch, a built-in oscillator, a crystal oscillator, and a crystal oscillator start-up detection circuit; The built-in oscillator is connected to the first current source through a third switch, and the output clock is sent to the crystal oscillator start-up detection circuit. The crystal oscillator is connected to a second current source via a second switch and to a third current source via a first switch, and its output clock is sent to the crystal oscillator start-up detection circuit. The crystal oscillator start-up detection circuit determines whether the crystal oscillator has started oscillating based on the built-in oscillator and the clock output by the crystal oscillator, and outputs switch control signals to control the closing and opening of the first switch, the second switch and the third switch based on the judgment result. If the crystal oscillator fails to start oscillating within the set time, the switch control signal controls the first switch, the second switch, and the third switch to open. The clock clkosc generated by the built-in oscillator is used to detect the existence of the clock clkxtal generated by the crystal oscillator through the crystal oscillator start detection circuit to determine whether the crystal oscillator has started oscillating. The crystal oscillator failed to start oscillating, and simultaneously output a crystal oscillator failure to start indication signal.

2. The crystal oscillator circuit as described in claim 1, capable of detecting abnormalities during rapid crystal oscillation and maintaining low power consumption, is characterized in that... The positive terminals of the first current source, the second current source, and the third current source are all connected to the power supply; the built-in oscillator is connected to the negative terminal of the first current source through the third switch, the crystal oscillator is connected to the negative terminal of the second current source through the second switch, and is connected to the negative terminal of the third current source through the first switch.

3. The crystal oscillator circuit as described in claim 2, capable of detecting abnormalities during rapid start-up of the crystal oscillator while maintaining low power consumption, is characterized in that... After the power supply is powered on and the reset is released, the first switch, the second switch, and the third switch are all closed by default.

4. The crystal oscillator circuit as described in claim 1, capable of detecting abnormalities during rapid start-up of a crystal oscillator while maintaining low power consumption, is characterized in that... The third current source is used to start the crystal oscillator, and the second current source is used for the normal operation of the crystal oscillator. The current value of the third current source is greater than the current value of the second current source.

5. The crystal oscillator circuit as described in claim 4, capable of detecting abnormalities during rapid start-up of the crystal oscillator and maintaining low power consumption, is characterized in that... Within a set time period, the crystal oscillator can start oscillating, and the switch control signal controls the opening of the first switch and the third switch.

6. The crystal oscillator circuit as described in claim 1, characterized in that, The built-in oscillator is a ring oscillator.

7. The crystal oscillator circuit as described in claim 1, capable of detecting abnormalities during rapid start-up of a crystal oscillator while maintaining low power consumption, is characterized in that... The built-in RC oscillator.