CN-115580293-B - Self-adaptive method for passive crystal oscillator starting
Abstract
The invention discloses a self-adaptive method for starting passive crystal oscillator, which comprises the steps of a, dividing a crystal oscillator starting process into N stages, wherein each stage corresponds to one starting scheme, b, enabling the crystal oscillator to start, c, executing a first starting scheme, entering the starting process of the first stage, d, judging whether the crystal oscillator starts or not, executing the step e, executing the next starting scheme, entering the starting process of the next stage, and f, repeatedly executing the steps d-e until the crystal oscillator starts.
Inventors
- DING XIAOMING
- XU CHENGSHEN
Assignees
- 西安中颖电子有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20221031
Claims (6)
- 1. A method for adaptive passive crystal oscillation starting, the method comprising: a. dividing the crystal oscillator starting process into N stages, wherein each stage corresponds to one starting scheme, and N is more than 1; b. enabling the crystal oscillator to start vibrating; c. executing a first vibration starting scheme, and entering a vibration starting process of a first stage; d. judging whether the crystal oscillator starts vibrating or not, and if not, executing the step e; e. executing the next starting scheme and entering the starting process of the next stage; f. D-e, repeating the steps until the crystal oscillator starts vibrating; Wherein, the When the step e is executed for the first time, the next vibration starting scheme is the combination of a traditional excitation mode and a first disturbance excitation mode; when the step e is executed for the second time, the next vibration starting scheme is the combination of a traditional excitation mode and a second disturbance excitation mode; When the step e is executed for the third time, the next vibration starting scheme is the combination of a traditional excitation mode and a mode for adjusting parameters of a crystal oscillator driving circuit; And e, executing the step e for the fourth time, wherein the next starting scheme is to replace the crystal oscillator driving circuit.
- 2. The adaptive method for passive crystal oscillation starting as defined in claim 1, wherein after the crystal oscillation is started, the method further comprises: judging whether the preheating time of the crystal oscillator is finished, if so, ending the oscillation starting process, and if not, continuing to judge whether the preheating time of the crystal oscillator is finished.
- 3. The adaptive method for passive crystal oscillator starting as recited in claim 1, wherein the first starting scheme is a conventional excitation scheme.
- 4. The adaptive method for passive crystal oscillator starting as claimed in claim 1, wherein the first disturbance excitation mode adopts a sinusoidal signal as an excitation signal.
- 5. The adaptive method for passive crystal oscillator starting as claimed in claim 1, wherein the second disturbance excitation mode adopts a square wave signal as an excitation signal.
- 6. The adaptive method for passive crystal oscillator starting as recited in claim 1, wherein the conventional excitation is by a pierce oscillator circuit.
Description
Self-adaptive method for passive crystal oscillator starting Technical Field The invention relates to a crystal oscillator starting scheme, in particular to a passive crystal oscillator starting method. Background The prior crystal oscillator circuit mainly adopts a Pierce oscillator circuit model, and when the crystal oscillator circuit is applied, only proper peripheral circuits are required to be configured for the crystal oscillator, namely, the crystal oscillator can work normally by two external load capacitors C1 and C2. However, since the crystal oscillator is a matching problem, a part of the crystal oscillator often cannot be started normally due to the uneven dispersion of the crystal oscillator, or the difference of PCBs or the difference of the use environments of products. In addition, the traditional passive crystal oscillator starting system has no monitoring and processing mechanism, and if the crystal oscillator does not start, the system does not try other schemes to restart the crystal oscillator. Thus, there is a need for a solution that can respond and assist in restarting a crystal when the crystal is not started. Disclosure of Invention In order to overcome the technical problems, the invention provides a passive crystal oscillator starting self-adaptive method, which comprises the following steps: a. Dividing the crystal oscillator oscillation starting process into N stages, wherein each stage corresponds to one oscillation starting scheme; b. enabling the crystal oscillator to start vibrating; c. executing a first vibration starting scheme, and entering a vibration starting process of a first stage; d. judging whether the crystal oscillator starts vibrating or not, and if not, executing the step e; e. executing the next starting scheme and entering the starting process of the next stage; f. and d, repeating the steps d-e until the crystal oscillator starts vibrating. In one embodiment, the crystal oscillator further comprises: judging whether the preheating time of the crystal oscillator is finished, if so, ending the oscillation starting process, and if not, continuing to judge whether the preheating time of the crystal oscillator is finished. In one embodiment, the first excitation scheme is a conventional excitation scheme. In one embodiment, the first time the step e is performed, the next excitation pattern is a combination of a conventional excitation pattern and a first disturbance excitation pattern. In one embodiment, the first perturbed excitation scheme employs a sinusoidal signal as the excitation signal. In one embodiment, when the step e is performed for the second time, the next excitation scheme is a combination of a conventional excitation mode and a second disturbance excitation mode. In one embodiment, the second perturbed excitation scheme employs a square wave signal as the excitation signal. In one embodiment, when the step e is performed for the third time, the next starting scheme is a combination of a conventional excitation mode and a mode of adjusting parameters of the crystal oscillator driving circuit. In one embodiment, when the step e is performed for the fourth time, the next starting scheme is to replace the crystal oscillator driving circuit. In one embodiment, the conventional excitation is by a pierce oscillator circuit. The self-adaptive method for the passive crystal oscillator oscillation starting introduces a crystal oscillator oscillation starting detection and processing mechanism, and if the situation that the crystal oscillator is not started is detected, different schemes are adopted for polling and switching, so that the success rate of the crystal oscillator oscillation starting is improved. The invention divides the crystal oscillator oscillation starting process into a plurality of stages, detects whether the crystal oscillator oscillates or not from time to time, and once the crystal oscillator does not oscillate, the system can respond correspondingly, enter the next stage and try other driving schemes, thereby helping the crystal oscillator to restart. Drawings The foregoing summary of the invention, as well as the following detailed description of the invention, will be better understood when read in conjunction with the accompanying drawings. It is to be noted that the drawings are merely examples of the claimed invention. In the drawings, like reference numbers indicate identical or similar elements. FIG. 1 illustrates a general flow chart of a passive crystal oscillation starting adaptation method according to an embodiment of the present invention; Fig. 2 shows an example of a design for dividing the starting process into two stages in the adaptive method for starting the passive crystal oscillator according to an embodiment of the present invention; fig. 3 shows a start-up flow chart of an adaptive method of passive crystal oscillation start-up according to an embodiment of the present invention, wherein the start-up process