A method and device for adjusting the frequency of a chip crystal oscillator

By determining the abnormal crystal oscillator frequency points and frequency in the chip, combining the crystal oscillator frequency and frequency drift values ​​at temperatures, and judging and adjusting the crystal oscillator frequency, the problem of increasing chip manufacturing costs caused by frequency drift is solved, and the effect of automatic adjustment and cost reduction is achieved.

CN114650050BActive Publication Date: 2025-04-18ANALOGIX CHINA SEMICON +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210339994.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-01
Publication Date
2025-04-18
Estimated Expiration
2042-04-01

AI Technical Summary

Technical Problem

The frequency calibration circuit used in the prior art increases the complexity and manufacturing cost of chip design when preventing internal frequency drift of chips.

Method used

By determining the abnormal crystal oscillator frequency point and corresponding frequency of the target chip, combining the crystal oscillator frequency at the lowest and highest temperatures and the frequency drift value, it is determined whether the chip is in the state to be adjusted, and the crystal oscillator frequency is adjusted according to the adjustment step length.

Benefits of technology

Automatically adjusting the crystal oscillator frequency is achieved, avoiding frequency points that may cause abnormal operation of sensitive circuits, and reducing chip manufacturing costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114650050B_ABST
    Figure CN114650050B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and device for adjusting the crystal oscillator frequency of a chip. The invention includes: determining the abnormal crystal oscillator frequency point of the target chip, and determining the abnormal crystal oscillator frequency corresponding to the abnormal crystal oscillator frequency point; determining the lowest temperature crystal oscillator frequency corresponding to the target chip, the highest temperature crystal oscillator frequency corresponding to the target chip, and the crystal oscillator frequency drift value corresponding to the target chip; determining whether the target chip is in a state to be adjusted based on the abnormal crystal oscillator frequency, the lowest temperature crystal oscillator frequency, and the crystal oscillator frequency drift value; determining the adjustment step of the crystal oscillator when the target chip is in a state to be adjusted; adjusting the crystal oscillator frequency of the abnormal crystal oscillator frequency point based on the adjustment step. The present invention solves the problem of increased chip manufacturing costs caused by the technical means used to prevent the drift of the internal frequency of the chip in the related art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of crystal oscillator frequency adjustment inside a chip, and in particular to a method and device for adjusting the crystal oscillator frequency of a chip. Background Art

[0002] In the related art, many chips integrate crystal oscillators, but the frequency of the crystal oscillator will increase when the temperature decreases, and decrease when the temperature increases, which may cause the frequency-sensitive circuit to work abnormally. In order to prevent the drift of the crystal oscillator frequency, the usual practice is to add a frequency calibration circuit inside the chip to ensure the accuracy of the frequency when the temperature changes. However, the calibration circuit will increase the complexity of the chip design and the die area of ​​the chip, thereby increasing the chip design and manufacturing costs.

[0003] Currently, no effective solution has been proposed for the above-mentioned problems existing in the related technologies. Summary of the invention

[0004] The main purpose of the present invention is to provide a method and device for adjusting the chip crystal oscillator frequency, so as to solve the problem that the technical means used in the related art to prevent the drift of the internal frequency of the chip cause an increase in chip manufacturing costs.

[0005] In order to achieve the above-mentioned purpose, according to one aspect of the present invention, a method for adjusting the crystal oscillator frequency of a chip is provided. The invention comprises: determining the abnormal crystal oscillator frequency point of the target chip, and determining the abnormal crystal oscillator frequency corresponding to the abnormal crystal oscillator frequency point; determining the lowest temperature crystal oscillator frequency corresponding to the target chip, the highest temperature crystal oscillator frequency corresponding to the target chip, and the crystal oscillator frequency drift value corresponding to the target chip; determining whether the target chip is in a state to be adjusted based on the abnormal crystal oscillator frequency, the lowest temperature crystal oscillator frequency, and the crystal oscillator frequency drift value; determining the adjustment step of the crystal oscillator when the target chip is in a state to be adjusted; and adjusting the crystal oscillator frequency of the abnormal crystal oscillator frequency point based on the adjustment step.

[0006] Furthermore, the lowest temperature crystal oscillator frequency corresponding to the target chip and the highest temperature crystal oscillator frequency corresponding to the target chip are determined, including: when the target chip is at the lowest operating temperature, obtaining multiple crystal oscillator frequencies corresponding to multiple chips, determining the average crystal oscillator frequency of the multiple crystal oscillator frequencies, and determining the average crystal oscillator frequency as the lowest temperature crystal oscillator frequency; when the target chip is at the highest operating temperature, obtaining multiple crystal oscillator frequencies corresponding to multiple chips, determining the average crystal oscillator frequency of the multiple crystal oscillator frequencies, and determining the average crystal oscillator frequency as the highest temperature crystal oscillator frequency.

[0007] Furthermore, the crystal oscillator frequency drift value corresponding to the target chip is determined, including: obtaining multiple lowest temperature crystal oscillator frequencies and multiple highest temperature crystal oscillator frequencies corresponding to multiple chips; calculating multiple first differences, and calculating the first difference average value corresponding to the multiple first differences, the first difference being the difference between the lowest temperature crystal oscillator frequency and the highest temperature crystal oscillator frequency; and determining the first difference average value as the crystal oscillator frequency drift value.

[0008] Further, based on the abnormal crystal oscillator frequency, the lowest temperature crystal oscillator frequency and the crystal oscillator frequency drift value, it is determined whether the target chip is in a state to be adjusted, including: judging the magnitude of the abnormal crystal oscillator frequency and the lowest temperature crystal oscillator frequency, and when the abnormal crystal oscillator frequency is greater than or equal to the lowest temperature crystal oscillator frequency, determining that the target chip is in a state not to be adjusted; when the abnormal crystal oscillator frequency is less than the lowest temperature crystal oscillator frequency, judging whether the second difference is greater than the crystal oscillator frequency drift value, wherein the second difference is the difference between the lowest temperature crystal oscillator frequency and the abnormal crystal oscillator frequency; when the abnormal crystal oscillator frequency is less than the lowest temperature crystal oscillator frequency and the second difference is greater than the crystal oscillator frequency drift value, determining that the target chip is in a state not to be adjusted; when the abnormal crystal oscillator frequency is less than the lowest temperature crystal oscillator frequency and the second difference is less than or equal to the crystal oscillator frequency drift value, determining that the target chip is in a state to be adjusted.

[0009] Furthermore, when the target chip is in a state to be adjusted, the adjustment step of the abnormal crystal oscillator frequency point is determined, including: calculating the adjustment step according to formula one, wherein formula one is K_step=m+(Fosc_init-Fosc_hole) / Fosc_minstep, K_step is the adjustment step, Fosc_init is the lowest temperature crystal oscillator frequency, Fosc_hole is the abnormal crystal oscillator frequency, Fosc_minstep is the minimum adjustment step of the target chip, and m is the compensation coefficient.

[0010] Further, the crystal oscillator frequency at the abnormal crystal oscillator frequency point is adjusted according to the adjustment step length, including: configuring a crystal oscillator adjustment register according to the adjustment step length, and adjusting the crystal oscillator frequency at the abnormal crystal oscillator frequency point through the crystal oscillator adjustment register.

[0011] Further, after adjusting the crystal oscillator frequency of the abnormal crystal oscillator frequency point according to the adjustment step, the method includes: acquiring the initial value and the preset step of the crystal oscillator adjustment register in real time; judging the size of the adjustment step and the preset step; when the adjustment step is greater than the preset step, determining the first frequency initial value and the first step, wherein the first frequency initial value is the sum of the initial parameter value corresponding to the crystal oscillator adjustment register and the preset step, and the first step is the difference between the adjustment step and the preset step; reconfiguring the crystal oscillator adjustment register according to the first frequency initial value and the first step; when the adjustment step is less than or equal to the preset step, determining the second frequency initial value, wherein the second frequency initial value is the sum of the frequency initial value and the adjustment step; reconfiguring the crystal oscillator adjustment register according to the second frequency initial value.

[0012] In order to achieve the above-mentioned object, according to another aspect of the present invention, a device for adjusting the crystal oscillator frequency of a chip is provided. The device comprises: a first determining unit, used to determine the abnormal crystal oscillator frequency point of the target chip, and determine the abnormal crystal oscillator frequency corresponding to the abnormal crystal oscillator frequency point; a second determining unit, used to determine the lowest temperature crystal oscillator frequency corresponding to the target chip, the highest temperature crystal oscillator frequency corresponding to the target chip, and the crystal oscillator frequency drift value corresponding to the target chip; a third determining unit, used to determine whether the target chip is in a state to be adjusted according to the abnormal crystal oscillator frequency, the lowest temperature crystal oscillator frequency, and the crystal oscillator frequency drift value; a fourth determining unit, used to determine the adjustment step of the crystal oscillator when the target chip is in a state to be adjusted; and an adjusting unit, used to adjust the crystal oscillator frequency of the abnormal crystal oscillator frequency point according to the adjustment step.

[0013] In order to achieve the above-mentioned purpose, according to another aspect of the present application, a computer-readable storage medium is provided, the computer-readable storage medium comprising a stored program, wherein the program executes any one of the above-mentioned methods for adjusting the chip crystal oscillator frequency.

[0014] In order to achieve the above-mentioned purpose, according to another aspect of the present application, a processor is provided, and the processor is used to run a program, wherein the program executes any one of the above-mentioned methods for adjusting the chip crystal oscillator frequency.

[0015] The present invention adopts the following steps: determining an abnormal crystal oscillator frequency point of a target chip, and determining an abnormal crystal oscillator frequency corresponding to the abnormal crystal oscillator frequency point; determining a minimum temperature crystal oscillator frequency corresponding to the target chip, a maximum temperature crystal oscillator frequency corresponding to the target chip, and a crystal oscillator frequency drift value corresponding to the target chip; determining whether the target chip is in a state to be adjusted based on the abnormal crystal oscillator frequency, the minimum temperature crystal oscillator frequency, and the crystal oscillator frequency drift value; determining an adjustment step of the crystal oscillator when the target chip is in a state to be adjusted; and adjusting the crystal oscillator frequency of the abnormal crystal oscillator frequency point based on the adjustment step, thereby solving the problem in the related art that the technical means used to prevent the drift of the chip internal frequency causes an increase in chip manufacturing cost, thereby achieving the effect of automatically adjusting the crystal oscillator frequency and avoiding abnormal crystal oscillator frequency points that may cause sensitive circuits to work. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The accompanying drawings constituting a part of the present invention are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the accompanying drawings:

[0017] Figure 1 The following is a flow chart of a method for adjusting the frequency of a chip crystal oscillator according to an embodiment of the present invention. Figure 1 ;

[0018] Figure 2 The following is a flow chart of a method for adjusting the frequency of a chip crystal oscillator according to an embodiment of the present invention. Figure 2 ;

[0019] Figure 3 Schematic diagram of a device for adjusting the frequency of a chip crystal oscillator provided according to an embodiment of the present invention. DETAILED DESCRIPTION

[0020] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments can be combined with each other. The present invention will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0021] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0022] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so as to describe the embodiments of the present invention described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0023] According to an embodiment of the present invention, a method for adjusting the frequency of a chip crystal oscillator is provided.

[0024] Figure 1 The following is a flow chart of a method for adjusting the frequency of a chip crystal oscillator according to an embodiment of the present invention. Figure 1 .like Figure 1 As shown, the invention comprises the following steps:

[0025] Step S101, determining an abnormal crystal oscillator frequency point of a target chip, and determining an abnormal crystal oscillator frequency corresponding to the abnormal crystal oscillator frequency point.

[0026] As mentioned above, the frequency of the crystal oscillator of the chip is prone to drift, that is, the frequency of the generated AC signal is prone to change, and the input parameters of the chip in the working state are obtained, where the input parameters include video format (such as resolution, color space), working bandwidth, etc. The crystal oscillator point that causes the sensitive circuit to work abnormally is calculated according to the input parameters, thereby determining the abnormal crystal oscillator frequency point of the chip and the abnormal crystal oscillator frequency corresponding to the abnormal crystal oscillator frequency point. It should be noted that the calculation method of the abnormal crystal oscillator frequency point varies due to different circuit designs.

[0027] Step S102 , determining the lowest temperature crystal oscillator frequency corresponding to the target chip, the highest temperature crystal oscillator frequency corresponding to the target chip, and the crystal oscillator frequency drift value corresponding to the target chip.

[0028] As mentioned above, the lowest temperature and the highest temperature of the chip in the working state are determined by the factory setting manual of the chip, which are used to respectively determine the lowest temperature crystal oscillator frequency corresponding to the chip and the highest temperature crystal oscillator frequency corresponding to the target chip. The crystal oscillator frequency drift value corresponding to the target chip is determined by the difference between the lowest temperature crystal oscillator frequency and the highest temperature crystal oscillator frequency.

[0029] Step S103, determining whether the target chip is in a state to be adjusted according to the abnormal crystal oscillator frequency, the lowest temperature crystal oscillator frequency and the crystal oscillator frequency drift value.

[0030] As described above, whether the chip is in the state to be adjusted or not to be adjusted is determined based on whether the abnormal crystal frequency, the lowest temperature crystal frequency and the crystal frequency drift value meet the determination conditions.

[0031] Step S104, when the target chip is in a state to be adjusted, determining the adjustment step length of the crystal oscillator.

[0032] As described above, when the chip meets the conditions of the state to be adjusted, the adjustment step length of the crystal oscillator is determined, wherein the step length is the value of the adjustment step.

[0033] Step S105, adjusting the crystal oscillator frequency at the abnormal crystal oscillator frequency point according to the adjustment step size.

[0034] As described above, the crystal oscillator frequency at the abnormal crystal oscillator frequency point is adjusted according to the determined number of adjustment steps.

[0035] In an optional instance, the lowest temperature crystal oscillator frequency corresponding to the target chip and the highest temperature crystal oscillator frequency corresponding to the target chip are determined, including: when the target chip is at the lowest operating temperature, obtaining multiple crystal oscillator frequencies corresponding to multiple chips, determining the average crystal oscillator frequency of the multiple crystal oscillator frequencies, and determining the average crystal oscillator frequency as the lowest temperature crystal oscillator frequency; when the target chip is at the highest operating temperature, obtaining multiple crystal oscillator frequencies corresponding to multiple chips, determining the average crystal oscillator frequency of the multiple crystal oscillator frequencies, and determining the average crystal oscillator frequency as the highest temperature crystal oscillator frequency.

[0036] As described above, the crystal oscillator frequencies at the lowest operating temperature and the corresponding highest operating temperature corresponding to multiple chips are obtained respectively, and the average values ​​of the crystal oscillator frequencies at the lowest operating temperature and the corresponding highest operating temperature corresponding to multiple chips are calculated respectively. The average values ​​of the crystal oscillator frequencies under the lowest operating temperature and the highest operating temperature conditions are the lowest temperature crystal oscillator frequency and the highest temperature crystal oscillator frequency. In this application, for the accuracy of the values, the crystal oscillator frequencies at the lowest operating temperature and the crystal oscillator frequencies at the highest operating temperature both refer to the average values ​​of the values ​​corresponding to multiple chips. The average value can improve the accuracy of the parameters.

[0037] In an optional instance, determining the crystal oscillator frequency drift value corresponding to the target chip includes: obtaining multiple lowest temperature crystal oscillator frequencies and multiple highest temperature crystal oscillator frequencies corresponding to multiple chips; calculating multiple first differences, and calculating the first difference average value corresponding to the multiple first differences, the first difference being the difference between the lowest temperature crystal oscillator frequency and the highest temperature crystal oscillator frequency; and determining the first difference average value as the crystal oscillator frequency drift value.

[0038] As described above, the differences between multiple lowest temperature crystal oscillator frequencies and multiple highest temperature frequencies corresponding to multiple chips are calculated, and the average value of the above differences is calculated. The average value of the differences is the crystal oscillator frequency drift value. In this application, in order to ensure the accuracy of the value, the average value of the differences is taken as the crystal oscillator frequency drift value. The average value can improve the accuracy of the parameters.

[0039] In an optional example, whether the target chip is in a state to be adjusted is determined based on the abnormal crystal oscillator frequency, the lowest temperature crystal oscillator frequency and the crystal oscillator frequency drift value, including: judging the magnitude of the abnormal crystal oscillator frequency and the lowest temperature crystal oscillator frequency, and determining that the target chip is in a state not to be adjusted when the abnormal crystal oscillator frequency is greater than or equal to the lowest temperature crystal oscillator frequency; judging whether the second difference is greater than the crystal oscillator frequency drift value when the abnormal crystal oscillator frequency is less than the lowest temperature crystal oscillator frequency, wherein the second difference is the difference between the lowest temperature crystal oscillator frequency and the abnormal crystal oscillator frequency; determining that the target chip is in a state not to be adjusted when the abnormal crystal oscillator frequency is less than the lowest temperature crystal oscillator frequency and the second difference is greater than the crystal oscillator frequency drift value; determining that the target chip is in a state not to be adjusted when the abnormal crystal oscillator frequency is less than the lowest temperature crystal oscillator frequency and the second difference is less than or equal to the crystal oscillator frequency drift value.

[0040] As mentioned above, in the present application, the magnitude relationship between the abnormal crystal oscillator frequency and the lowest temperature crystal oscillator frequency is first judged. When the judgment result is that the abnormal crystal oscillator frequency is greater than or equal to the lowest temperature crystal oscillator frequency, the chip is judged to be in a non-to-be-adjusted state. When the judgment result is that the abnormal crystal oscillator frequency is less than the lowest temperature crystal oscillator frequency, the magnitude relationship between the difference between the lowest temperature crystal oscillator frequency and the abnormal crystal oscillator frequency and the crystal oscillator frequency drift value is judged. When the judgment result is that the difference between the lowest temperature crystal oscillator frequency and the abnormal crystal oscillator frequency is greater than the crystal oscillator frequency drift value, the chip is judged to be in a non-to-be-adjusted state. When the difference between the lowest temperature crystal oscillator frequency and the abnormal crystal oscillator frequency is less than or equal to the crystal oscillator frequency drift value, the judgment result is that the chip is in a to-be-adjusted state. Based on the abnormal crystal oscillator frequency, the lowest temperature crystal oscillator frequency and the crystal oscillator frequency drift value, it is determined whether the chip is in a to-be-adjusted state, thereby determining whether the crystal oscillator frequency of the chip needs to be adjusted.

[0041] In an optional instance, when the target chip is in a state to be adjusted, the adjustment step of the abnormal crystal oscillator frequency point is determined, including: calculating the adjustment step according to formula one, wherein formula one is K_step=m+(Fosc_init-Fosc_hole) / Fosc_minstep, K_step is the adjustment step, Fosc_init is the lowest temperature crystal oscillator frequency, Fosc_hole is the abnormal crystal oscillator frequency, Fosc_minstep is the minimum adjustment step of the target chip, and m is the compensation coefficient.

[0042] As mentioned above, according to Formula 1: K_step = m + (Fosc_init-Fosc_hole) / Fosc_minstep, the adjustment step is calculated, and the adjustment step is the value of the step that needs to be adjusted at the abnormal crystal frequency point, wherein the lowest temperature crystal frequency Fosc_init is calculated by Formula 2: Fosc_init = (Fosc_init[1] + ... + Fosc_init[N]) / N, where N is the number of chips; the initial parameter value corresponding to the crystal adjustment register is recorded as c_init, and the frequency value is obtained by Formula 3: c_init + k, and its frequency value is recorded as Fosc _initk[i], k is the step size, the minimum step size of the i-th chip is recorded as Fosc_minstep[i], which is calculated by Formula 4: Fosc_minstep[i] = (Fosc_initk[i]-Fosc_init[i]) / k. The average value of the minimum adjustment step size of N chips is calculated, that is, the minimum adjustment step size of the chip is calculated, which is calculated by Formula 5: Fosc_minstep = (Fosc_minstep[1]+...+Fosc_minstep[N]) / N; m is the compensation coefficient, which is used to compensate for the slight differences between different chips.

[0043] In an optional example, adjusting the crystal oscillator frequency at the abnormal crystal oscillator frequency point according to the adjustment step size includes: configuring a crystal oscillator adjustment register according to the adjustment step size, and adjusting the crystal oscillator frequency at the abnormal crystal oscillator frequency point through the crystal oscillator adjustment register.

[0044] As described above, the crystal frequency of the abnormal crystal frequency point is adjusted according to the adjustment step received by the crystal adjustment register. The crystal adjustment register is configured by software. The chip contains multiple modules. The sudden change of the crystal frequency also affects each module. Each module also needs to be adjusted according to the step. It is recommended that the adjustment step is x each time, where x is an integer ≥ 1, and x is the preset step. The specific configuration can be formulated according to the acceptance of the sudden change of the crystal frequency by each module inside the chip. The stronger the acceptance of the sudden change, the larger the value of x can be selected. Conversely, the smaller the x value, the better.

[0045] In an optional example, after adjusting the crystal oscillator frequency of the abnormal crystal oscillator frequency point according to the adjustment step, the method includes: acquiring the initial parameter value and the preset step corresponding to the crystal oscillator adjustment register in real time; judging the size of the adjustment step and the preset step; when the adjustment step is greater than the preset step, determining the first frequency initial value and the first step, wherein the first frequency initial value is the sum of the initial parameter value corresponding to the crystal oscillator adjustment register and the preset step, and the first step is the difference between the adjustment step and the preset step; reconfiguring the crystal oscillator adjustment register according to the first frequency initial value and the first step; when the adjustment step is less than or equal to the preset step, determining the second frequency initial value, wherein the second frequency initial value is the sum of the frequency initial value and the adjustment step; reconfiguring the crystal oscillator adjustment register according to the second frequency initial value.

[0046] As mentioned above, the initial parameter value corresponding to the crystal oscillator adjustment register is recorded as c_init, and the size relationship between the adjustment step K_step and the preset step x is determined. When K_step>x, the following steps are performed: c_init=c_init+x, K_step=K_step-x, and the crystal oscillator adjustment register is reconfigured. In addition, other modules inside the chip need to configure their parameters in real time due to the adjustment of the crystal oscillator frequency, and they need to be configured every time the crystal oscillator frequency is adjusted. Finally, return to the judgment of the size relationship between K_step and x. When K_step≤x, the following steps are performed: c_init=c_init+K_step, and the parameters of the crystal oscillator adjustment register and some modules of the chip are reconfigured.

[0047] In one embodiment provided in the present application, Figure 2 As shown, Figure 2 The following is a flow chart of a method for adjusting the frequency of a chip crystal oscillator according to an embodiment of the present invention. Figure 2, obtain the input parameters of the chip in the working state, determine the crystal frequency Fosc_hole corresponding to the abnormal crystal frequency point, and judge whether it meets the judgment condition that the abnormal crystal frequency is less than the lowest temperature crystal frequency, and the difference between the lowest temperature crystal frequency and the abnormal crystal frequency is less than or equal to the crystal frequency drift value. If the judgment condition is not met, there is no need to adjust the crystal frequency. If the judgment condition is met, the adjustment step length is calculated by the formula K_step=m+(Fosc_init-Fosc_hole) / Fosc_minstep, and the initial parameter value corresponding to the initial crystal adjustment register is recorded as c_init. When K_step>x, perform the following steps: c_init=c_init+x, K_step=K_step-x, reconfigure the crystal adjustment register and the parameters of some modules of the chip. When K_step≤x, perform the following steps: c_init=c_init+K_step, reconfigure the crystal adjustment register and the parameters of some modules.

[0048] A method for adjusting the crystal oscillator frequency of a chip provided by an embodiment of the present invention determines an abnormal crystal oscillator frequency point of a target chip, and determines the abnormal crystal oscillator frequency corresponding to the abnormal crystal oscillator frequency point; determines the lowest temperature crystal oscillator frequency corresponding to the target chip, the highest temperature crystal oscillator frequency corresponding to the target chip, and the crystal oscillator frequency drift value corresponding to the target chip; determines whether the target chip is in a state to be adjusted based on the abnormal crystal oscillator frequency, the lowest temperature crystal oscillator frequency, and the crystal oscillator frequency drift value; determines the adjustment step of the crystal oscillator when the target chip is in the state to be adjusted; adjusts the crystal oscillator frequency of the abnormal crystal oscillator frequency point based on the adjustment step, thereby solving the problem in the related art that the technical means used to prevent the drift of the chip internal frequency causes an increase in chip manufacturing cost, thereby achieving the effect of automatically adjusting the crystal oscillator frequency to avoid abnormal crystal oscillator frequency points that may cause sensitive circuits to work.

[0049] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0050] The embodiment of the present invention also provides a device for adjusting the chip crystal oscillator frequency. It should be noted that the device for adjusting the chip crystal oscillator frequency in the embodiment of the present invention can be used to execute the method for adjusting the chip crystal oscillator frequency provided in the embodiment of the present invention. The device for adjusting the chip crystal oscillator frequency provided in the embodiment of the present invention is introduced below.

[0051] Figure 3 Schematic diagram of a device for adjusting the frequency of a chip crystal oscillator according to an embodiment of the present invention. Figure 3 As shown, the device includes: a first determining unit 301, used to determine the abnormal crystal oscillator frequency point of the target chip, and determine the abnormal crystal oscillator frequency corresponding to the abnormal crystal oscillator frequency point; a second determining unit 302, used to determine the lowest temperature crystal oscillator frequency corresponding to the target chip, the highest temperature crystal oscillator frequency corresponding to the target chip and the crystal oscillator frequency drift value corresponding to the target chip; a third determining unit 303, used to determine whether the target chip is in a state to be adjusted based on the abnormal crystal oscillator frequency, the lowest temperature crystal oscillator frequency and the crystal oscillator frequency drift value; a fourth determining unit 304, used to determine the adjustment step of the crystal oscillator when the target chip is in a state to be adjusted; an adjusting unit 305, used to adjust the crystal oscillator frequency of the abnormal crystal oscillator frequency point according to the adjustment step.

[0052] In an optional instance, the second determination unit 302 includes: a first determination subunit, used to obtain multiple crystal oscillator frequencies corresponding to multiple chips when the target chip is at the lowest operating temperature, determine the average crystal oscillator frequency of the multiple crystal oscillator frequencies, and determine the average crystal oscillator frequency as the lowest temperature crystal oscillator frequency; a second determination subunit, used to obtain multiple crystal oscillator frequencies corresponding to multiple chips when the target chip is at the highest operating temperature, determine the average crystal oscillator frequency of the multiple crystal oscillator frequencies, and determine the average crystal oscillator frequency as the highest temperature crystal oscillator frequency.

[0053] In an optional instance, the third determination unit 303 includes: an acquisition subunit, used to acquire multiple lowest temperature crystal oscillator frequencies and multiple highest temperature crystal oscillator frequencies corresponding to multiple chips; a first calculation subunit, used to calculate multiple first differences, and calculate the first difference average value corresponding to the multiple first differences, the first difference being the difference between the lowest temperature crystal oscillator frequency and the highest temperature crystal oscillator frequency; a fourth determination subunit, used to determine the first difference average value as the crystal oscillator frequency drift value.

[0054] In an optional example, the third determination unit 303 includes: a first judgment subunit, used to judge the magnitude of the abnormal crystal oscillator frequency and the lowest temperature crystal oscillator frequency, and determine that the target chip is in a non-to-be-adjusted state when the abnormal crystal oscillator frequency is greater than or equal to the lowest temperature crystal oscillator frequency; a second judgment subunit, used to judge whether the second difference is greater than the crystal oscillator frequency drift value when the abnormal crystal oscillator frequency is less than or equal to the lowest temperature crystal oscillator frequency, wherein the second difference is the difference between the lowest temperature crystal oscillator frequency and the abnormal crystal oscillator frequency; a fifth determination subunit, used to determine that the target chip is in a non-to-be-adjusted state when the abnormal crystal oscillator frequency is less than or equal to the lowest temperature crystal oscillator frequency and the second difference is greater than the crystal oscillator frequency drift value; a sixth determination subunit, used to determine that the target chip is in a to-be-adjusted state when the abnormal crystal oscillator frequency is less than or equal to the lowest temperature crystal oscillator frequency and the second difference is less than or equal to the crystal oscillator frequency drift value.

[0055] In an optional example, the fourth determining unit 304 includes: a second calculating subunit, configured to calculate the adjustment step size according to formula 1, wherein formula 1 is

[0056] K_step=m+(Fosc_init-Fosc_hole) / Fosc_minstep, K_step is the adjustment step, Fosc_init is the lowest temperature crystal frequency, Fosc_hole is the abnormal crystal frequency, Fosc_minstep is the minimum adjustment step of the target chip, and m is the compensation coefficient.

[0057] In an optional example, the adjustment unit includes: an adjustment subunit, configured to configure a crystal oscillator adjustment register according to an adjustment step, and to adjust the crystal oscillator frequency at an abnormal crystal oscillator frequency point through the crystal oscillator adjustment register.

[0058] In an optional instance, the device includes: an acquisition unit, which is used to acquire the initial parameter value and the preset step size corresponding to the crystal oscillator adjustment register in real time after adjusting the crystal oscillator frequency of the abnormal crystal oscillator frequency point according to the adjustment step size; a judgment unit, which is used to judge the size of the adjustment step size and the preset step size; a fifth determination unit, which is used to determine the first frequency initial value and the first step size when the adjustment step size is greater than the preset step size, wherein the first frequency initial value is the sum of the initial parameter value corresponding to the crystal oscillator adjustment register and the preset step size, and the first step size is the difference between the adjustment step size and the preset step size; a first configuration unit, which is used to reconfigure the crystal oscillator adjustment register based on the first frequency initial value and the first step size; a sixth determination unit, which is used to determine the second frequency initial value when the adjustment step size is less than or equal to the preset step size, wherein the second frequency initial value is the sum of the frequency initial value and the adjustment step size; and a second configuration unit, which is used to reconfigure the crystal oscillator adjustment register based on the second frequency initial value.

[0059] An embodiment of the present invention provides a device for adjusting the crystal oscillator frequency of a chip, which is used to determine the abnormal crystal oscillator frequency point of a target chip and determine the abnormal crystal oscillator frequency corresponding to the abnormal crystal oscillator frequency point through a first determining unit 301; a second determining unit 302 is used to determine the lowest temperature crystal oscillator frequency corresponding to the target chip, the highest temperature crystal oscillator frequency corresponding to the target chip, and the crystal oscillator frequency drift value corresponding to the target chip; a third determining unit 303 is used to determine whether the target chip is in a state to be adjusted based on the abnormal crystal oscillator frequency, the lowest temperature crystal oscillator frequency, and the crystal oscillator frequency drift value; a fourth determining unit 304 is used to determine the adjustment step of the crystal oscillator when the target chip is in a state to be adjusted; an adjusting unit 305 is used to adjust the crystal oscillator frequency of the abnormal crystal oscillator frequency point according to the adjustment step, thereby solving the problem of increased chip manufacturing cost caused by the technical means used to prevent the drift of the chip internal frequency in the related art, thereby achieving the effect of automatically adjusting the crystal oscillator frequency to avoid abnormal crystal oscillator frequency points that may cause sensitive circuits to work.

[0060] The device for adjusting the chip crystal oscillator frequency includes a processor and a memory. The first determination unit 301 and the like are stored in the memory as program units, and the processor executes the program units stored in the memory to implement corresponding functions.

[0061] The processor includes a core, which retrieves the corresponding program unit from the memory. One or more cores can be set, and the technical problem of increasing chip manufacturing costs caused by technical means used in related technologies to prevent the drift of the chip internal frequency is solved by adjusting the core parameters.

[0062] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.

[0063] An embodiment of the present invention provides a computer-readable storage medium on which a program is stored. When the program is executed by a processor, the method for adjusting the frequency of a chip crystal oscillator is implemented.

[0064] An embodiment of the present invention provides a processor, which is used to run a program, wherein the method for adjusting the chip crystal oscillator frequency is executed when the program is run.

[0065] An embodiment of the present invention provides a device, which includes a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, the following steps are implemented: determining an abnormal crystal oscillator frequency point of a target chip, and determining an abnormal crystal oscillator frequency corresponding to the abnormal crystal oscillator frequency point; determining a minimum temperature crystal oscillator frequency corresponding to the target chip, a maximum temperature crystal oscillator frequency corresponding to the target chip, and a crystal oscillator frequency drift value corresponding to the target chip; determining whether the target chip is in a state to be adjusted based on the abnormal crystal oscillator frequency, the minimum temperature crystal oscillator frequency, and the crystal oscillator frequency drift value; when the target chip is in a state to be adjusted, determining an adjustment step of the crystal oscillator; and adjusting the crystal oscillator frequency of the abnormal crystal oscillator frequency point based on the adjustment step.

[0066] Furthermore, the lowest temperature crystal oscillator frequency corresponding to the target chip and the highest temperature crystal oscillator frequency corresponding to the target chip are determined, including: when the target chip is at the lowest operating temperature, obtaining multiple crystal oscillator frequencies corresponding to multiple chips, determining the average crystal oscillator frequency of the multiple crystal oscillator frequencies, and determining the average crystal oscillator frequency as the lowest temperature crystal oscillator frequency; when the target chip is at the highest operating temperature, obtaining multiple crystal oscillator frequencies corresponding to multiple chips, determining the average crystal oscillator frequency of the multiple crystal oscillator frequencies, and determining the average crystal oscillator frequency as the highest temperature crystal oscillator frequency.

[0067] Furthermore, the crystal oscillator frequency drift value corresponding to the target chip is determined, including: obtaining multiple lowest temperature crystal oscillator frequencies and multiple highest temperature crystal oscillator frequencies corresponding to multiple chips; calculating multiple first differences, and calculating the first difference average value corresponding to the multiple first differences, the first difference being the difference between the lowest temperature crystal oscillator frequency and the highest temperature crystal oscillator frequency; and determining the first difference average value as the crystal oscillator frequency drift value.

[0068] Further, based on the abnormal crystal oscillator frequency, the lowest temperature crystal oscillator frequency and the crystal oscillator frequency drift value, it is determined whether the target chip is in a state to be adjusted, including: judging the magnitude of the abnormal crystal oscillator frequency and the lowest temperature crystal oscillator frequency, and when the abnormal crystal oscillator frequency is greater than or equal to the lowest temperature crystal oscillator frequency, determining that the target chip is in a state not to be adjusted; when the abnormal crystal oscillator frequency is less than the lowest temperature crystal oscillator frequency, judging whether the second difference is greater than the crystal oscillator frequency drift value, wherein the second difference is the difference between the lowest temperature crystal oscillator frequency and the abnormal crystal oscillator frequency; when the abnormal crystal oscillator frequency is less than the lowest temperature crystal oscillator frequency and the second difference is greater than the crystal oscillator frequency drift value, determining that the target chip is in a state not to be adjusted; when the abnormal crystal oscillator frequency is less than the lowest temperature crystal oscillator frequency and the second difference is less than or equal to the crystal oscillator frequency drift value, determining that the target chip is in a state to be adjusted.

[0069] Furthermore, when the target chip is in a state to be adjusted, the adjustment step of the abnormal crystal oscillator frequency point is determined, including: calculating the adjustment step according to formula one, wherein formula one is K_step=m+(Fosc_init-Fosc_hole) / Fosc_minstep, K_step is the adjustment step, Fosc_init is the lowest temperature crystal oscillator frequency, Fosc_hole is the abnormal crystal oscillator frequency, Fosc_minstep is the minimum adjustment step of the target chip, and m is the compensation coefficient.

[0070] Further, the crystal oscillator frequency at the abnormal crystal oscillator frequency point is adjusted according to the adjustment step length, including: configuring a crystal oscillator adjustment register according to the adjustment step length, and adjusting the crystal oscillator frequency at the abnormal crystal oscillator frequency point through the crystal oscillator adjustment register.

[0071] Further, after adjusting the crystal oscillator frequency of the abnormal crystal oscillator frequency point according to the adjustment step, the method includes: acquiring the initial parameter value and the preset step corresponding to the crystal oscillator adjustment register in real time; judging the size of the adjustment step and the preset step; when the adjustment step is greater than the preset step, determining the first frequency initial value and the first step, wherein the first frequency initial value is the sum of the initial parameter value corresponding to the crystal oscillator adjustment register and the preset step, and the first step is the difference between the adjustment step and the preset step; reconfiguring the crystal oscillator adjustment register according to the first frequency initial value and the first step; when the adjustment step is less than or equal to the preset step, determining the second frequency initial value, wherein the second frequency initial value is the sum of the frequency initial value and the adjustment step; reconfiguring the crystal oscillator adjustment register according to the second frequency initial value.

[0072] The devices in this article can be servers, PCs, PADs, mobile phones, etc.

[0073] The present invention also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program initialized with the following method steps: determining the abnormal crystal oscillator frequency point of the target chip, and determining the abnormal crystal oscillator frequency corresponding to the abnormal crystal oscillator frequency point; determining the lowest temperature crystal oscillator frequency corresponding to the target chip, the highest temperature crystal oscillator frequency corresponding to the target chip, and the crystal oscillator frequency drift value corresponding to the target chip; determining whether the target chip is in a state to be adjusted based on the abnormal crystal oscillator frequency, the lowest temperature crystal oscillator frequency, and the crystal oscillator frequency drift value; when the target chip is in a state to be adjusted, determining the adjustment step of the crystal oscillator; and adjusting the crystal oscillator frequency of the abnormal crystal oscillator frequency point based on the adjustment step.

[0074] Furthermore, the lowest temperature crystal oscillator frequency corresponding to the target chip and the highest temperature crystal oscillator frequency corresponding to the target chip are determined, including: when the target chip is at the lowest operating temperature, obtaining multiple crystal oscillator frequencies corresponding to multiple chips, determining the average crystal oscillator frequency of the multiple crystal oscillator frequencies, and determining the average crystal oscillator frequency as the lowest temperature crystal oscillator frequency; when the target chip is at the highest operating temperature, obtaining multiple crystal oscillator frequencies corresponding to multiple chips, determining the average crystal oscillator frequency of the multiple crystal oscillator frequencies, and determining the average crystal oscillator frequency as the highest temperature crystal oscillator frequency.

[0075] Furthermore, the crystal oscillator frequency drift value corresponding to the target chip is determined, including: obtaining multiple lowest temperature crystal oscillator frequencies and multiple highest temperature crystal oscillator frequencies corresponding to multiple chips; calculating multiple first differences, and calculating the first difference average value corresponding to the multiple first differences, the first difference being the difference between the lowest temperature crystal oscillator frequency and the highest temperature crystal oscillator frequency; and determining the first difference average value as the crystal oscillator frequency drift value.

[0076] Further, based on the abnormal crystal oscillator frequency, the lowest temperature crystal oscillator frequency and the crystal oscillator frequency drift value, it is determined whether the target chip is in a state to be adjusted, including: judging the magnitude of the abnormal crystal oscillator frequency and the lowest temperature crystal oscillator frequency, and when the abnormal crystal oscillator frequency is greater than or equal to the lowest temperature crystal oscillator frequency, determining that the target chip is in a state not to be adjusted; when the abnormal crystal oscillator frequency is less than the lowest temperature crystal oscillator frequency, judging whether the second difference is greater than the crystal oscillator frequency drift value, wherein the second difference is the difference between the lowest temperature crystal oscillator frequency and the abnormal crystal oscillator frequency; when the abnormal crystal oscillator frequency is less than the lowest temperature crystal oscillator frequency and the second difference is greater than the crystal oscillator frequency drift value, determining that the target chip is in a state not to be adjusted; when the abnormal crystal oscillator frequency is less than the lowest temperature crystal oscillator frequency and the second difference is less than or equal to the crystal oscillator frequency drift value, determining that the target chip is in a state to be adjusted.

[0077] Furthermore, when the target chip is in a state to be adjusted, the adjustment step of the abnormal crystal oscillator frequency point is determined, including: calculating the adjustment step according to formula one, wherein formula one is K_step=m+(Fosc_init-Fosc_hole) / Fosc_minstep, K_step is the adjustment step, Fosc_init is the lowest temperature crystal oscillator frequency, Fosc_hole is the abnormal crystal oscillator frequency, Fosc_minstep is the minimum adjustment step of the target chip, and m is the compensation coefficient.

[0078] Further, the crystal oscillator frequency at the abnormal crystal oscillator frequency point is adjusted according to the adjustment step length, including: configuring a crystal oscillator adjustment register according to the adjustment step length, and adjusting the crystal oscillator frequency at the abnormal crystal oscillator frequency point through the crystal oscillator adjustment register.

[0079] Further, after adjusting the crystal oscillator frequency of the abnormal crystal oscillator frequency point according to the adjustment step, the method includes: acquiring the initial parameter value and the preset step corresponding to the crystal oscillator adjustment register in real time; judging the size of the adjustment step and the preset step; when the adjustment step is greater than the preset step, determining the first frequency initial value and the first step, wherein the first frequency initial value is the sum of the initial parameter value corresponding to the crystal oscillator adjustment register and the preset step, and the first step is the difference between the adjustment step and the preset step; reconfiguring the crystal oscillator adjustment register according to the first frequency initial value and the first step; when the adjustment step is less than or equal to the preset step, determining the second frequency initial value, wherein the second frequency initial value is the sum of the frequency initial value and the adjustment step; reconfiguring the crystal oscillator adjustment register according to the second frequency initial value.

[0080] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0081] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0082] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0083] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0084] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0085] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0086] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0087] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0088] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0089] The above are only embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent substitution, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of the claims of the present invention.

Claims

1. A method for adjusting the frequency of a chip crystal oscillator, characterized in that: include: Determine an abnormal crystal oscillator frequency point of a target chip, and determine an abnormal crystal oscillator frequency corresponding to the abnormal crystal oscillator frequency point; Determine the lowest temperature crystal oscillator frequency corresponding to the target chip, the highest temperature crystal oscillator frequency corresponding to the target chip, and the crystal oscillator frequency drift value corresponding to the target chip; Determining whether the target chip is in a state to be adjusted according to the abnormal crystal oscillator frequency, the lowest temperature crystal oscillator frequency, and the crystal oscillator frequency drift value; When the target chip is in the state to be adjusted, determining an adjustment step length of the crystal oscillator; The crystal oscillator frequency at the abnormal crystal oscillator frequency point is adjusted according to the adjustment step.

2. The method according to claim 1, characterized in that: Determining the lowest temperature crystal oscillator frequency corresponding to the target chip and the highest temperature crystal oscillator frequency corresponding to the target chip includes: When the target chip is at the lowest operating temperature, obtaining multiple crystal oscillator frequencies corresponding to multiple chips, determining an average crystal oscillator frequency of the multiple crystal oscillator frequencies, and determining the average crystal oscillator frequency as the lowest temperature crystal oscillator frequency; When the target chip is at the highest operating temperature, multiple crystal oscillator frequencies corresponding to the multiple chips are obtained, an average crystal oscillator frequency of the multiple crystal oscillator frequencies is determined, and the average crystal oscillator frequency is determined as the highest temperature crystal oscillator frequency.

3. The method according to claim 2, characterized in that Determining a crystal oscillator frequency drift value corresponding to the target chip includes: Acquire multiple lowest temperature crystal oscillator frequencies and multiple highest temperature crystal oscillator frequencies corresponding to multiple chips; Calculate a plurality of first differences, and calculate a first difference average value corresponding to the plurality of first differences, wherein the first difference is a difference between the lowest temperature crystal oscillator frequency and the highest temperature crystal oscillator frequency; The first difference average value is determined as the crystal oscillator frequency drift value.

4. The method according to claim 1, characterized in that: Determining whether the target chip is in a state to be adjusted according to the abnormal crystal oscillator frequency, the lowest temperature crystal oscillator frequency, and the crystal oscillator frequency drift value includes: Determine the magnitude of the abnormal crystal oscillator frequency and the lowest temperature crystal oscillator frequency, and determine that the target chip is in a non-to-be-adjusted state when the abnormal crystal oscillator frequency is greater than or equal to the lowest temperature crystal oscillator frequency; In the case where the abnormal crystal oscillator frequency is less than the lowest temperature crystal oscillator frequency, determining whether a second difference is greater than the crystal oscillator frequency drift value, wherein the second difference is a difference between the lowest temperature crystal oscillator frequency and the abnormal crystal oscillator frequency; When the abnormal crystal oscillator frequency is less than the lowest temperature crystal oscillator frequency, and the second difference is greater than the crystal oscillator frequency drift value, determining that the target chip is in the non-to-be-adjusted state; When the abnormal crystal oscillator frequency is less than the lowest temperature crystal oscillator frequency, and the second difference is less than or equal to the crystal oscillator frequency drift value, it is determined that the target chip is in the to-be-adjusted state.

5. The method according to claim 1, characterized in that When the target chip is in the to-be-adjusted state, determining the adjustment step length of the crystal oscillator includes: According to formula one, the adjustment step is calculated, wherein the formula one is K_step=m+(Fosc_init-Fosc_hole) / Fosc_minstep, K_step is the adjustment step, Fosc_init is the lowest temperature crystal oscillator frequency, Fosc_hole is the abnormal crystal oscillator frequency, Fosc_minstep is the minimum adjustment step of the target chip, and m is the compensation coefficient.

6. The method according to claim 1, characterized in that Adjusting the crystal oscillator frequency at the abnormal crystal oscillator frequency point according to the adjustment step size includes: A crystal oscillator adjustment register is configured according to the adjustment step, and the crystal oscillator frequency of the abnormal crystal oscillator frequency point is adjusted through the crystal oscillator adjustment register.

7. The method according to claim 6, characterized in that After adjusting the crystal oscillator frequency at the abnormal crystal oscillator frequency point according to the adjustment step, the method includes: Acquire the initial parameter value and preset step size corresponding to the crystal oscillator adjustment register in real time; Determining the size of the adjustment step size and the preset step size; In the case where the adjustment step length is greater than the preset step length, determining a first frequency initial value and a first step length, wherein the first frequency initial value is the sum of the initial parameter value corresponding to the crystal oscillator adjustment register and the preset step length, and the first step length is the difference between the adjustment step length and the preset step length; reconfiguring the crystal oscillator adjustment register according to the first frequency initial value and the first step length; In a case where the adjustment step length is less than or equal to the preset step length, determining a second frequency initial value, wherein the second frequency initial value is a sum of the frequency initial value and the adjustment step length; The crystal oscillator adjustment register is reconfigured according to the second frequency initial value.

8. A device for adjusting the frequency of a chip crystal oscillator, characterized in that: include: A first determining unit, configured to determine an abnormal crystal oscillator frequency point of a target chip, and determine an abnormal crystal oscillator frequency corresponding to the abnormal crystal oscillator frequency point; A second determining unit is used to determine the lowest temperature crystal oscillator frequency corresponding to the target chip, the highest temperature crystal oscillator frequency corresponding to the target chip, and the crystal oscillator frequency drift value corresponding to the target chip; A third determining unit is used to determine whether the target chip is in a state to be adjusted according to the abnormal crystal oscillator frequency, the lowest temperature crystal oscillator frequency and the crystal oscillator frequency drift value; A fourth determining unit, configured to determine an adjustment step length of a crystal oscillator when the target chip is in the to-be-adjusted state; An adjustment unit is used to adjust the crystal oscillator frequency of the abnormal crystal oscillator frequency point according to the adjustment step size.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute a method for adjusting the chip crystal oscillator frequency as described in any one of claims 1 to 7.

10. A processor, characterized in that: The processor is used to run a program, wherein the program, when running, executes a method for adjusting the chip crystal oscillator frequency as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • RTC clock frequency temperature compensation chip

    CN110380724A

  • Actuator device and method

    CN111066164A