Crystal oscillator frequency offset adjustment method, device, equipment and computer storage medium
By calculating the crystal oscillator control word offset value through pre-stored fitting curves, the problem of temperature-dependent crystal oscillator frequency in NB-IoT terminal chips is solved, enabling fast and efficient frequency offset calibration.
Patent Information
- Application Number
- CN202410300005.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-14
- Publication Date
- 2025-12-09
- Estimated Expiration
- 2044-03-14
AI Technical Summary
In existing technologies, the crystal oscillator frequency of NB-IoT terminal chips is easily affected by temperature, resulting in frequency offset. Furthermore, frequency offset calibration requires obtaining the crystal oscillator frequency offset value at different temperatures, which consumes a lot of time and is inefficient.
The crystal oscillator control word is obtained by pre-storing the fitted curve, the current temperature is obtained by using a temperature sensor, and the offset value of the crystal oscillator control word is calculated by combining the preset fitted curve, which shortens the acquisition time and quickly adjusts the frequency deviation.
This improves the efficiency of crystal oscillator frequency offset adjustment, reduces the time required to obtain the crystal oscillator control word offset value, and shortens the frequency offset calibration time.
Smart Images

Figure CN118827304B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of communication, and particularly relates to a crystal frequency offset adjustment method and device, equipment, computer storage medium and computer program product. BACKGROUND
[0002] Narrow Band Internet of Things (NB-IOT) is a new communication protocol defined for narrowband and low-speed service scenarios, and supports low-power devices to connect to a cellular data network in a wide area network. The NB-IOT terminal chip generally uses a Digitally Controlled Crystal Oscillator (DCXO) as a frequency reference to generate a stable frequency source for signals, but the crystal output frequency is easily affected by temperature, resulting in frequency offset.
[0003] In the related art, the initial offset value of the temperature sensor and the initial offset value of the crystal oscillator at different temperatures are generally needed to correct the output signal of the NB-IOT chip. However, the related art needs to obtain the frequency offset value of the crystal oscillator at each temperature of the chip for chip frequency offset calibration, which consumes a large amount of time. SUMMARY
[0004] Embodiments of the present application provide a crystal frequency offset adjustment method, device, equipment, computer storage medium and computer program product, which can improve the efficiency of crystal frequency offset adjustment.
[0005] In a first aspect, the embodiments of the present disclosure provide a crystal frequency offset adjustment method, and the method comprises:
[0006] obtaining a first temperature of a target chip, the first temperature representing a temperature value of the target chip at a current temperature;
[0007] determining a first crystal oscillator control word corresponding to the first temperature by using a preset first fitting curve, the first fitting curve representing a mapping relationship between a crystal oscillator zero frequency offset control word and a temperature;
[0008] obtaining a first crystal oscillator control word offset value by subtracting a second crystal oscillator control word from a third crystal oscillator control word; the second crystal oscillator control word is determined by using a preset first fitting curve and corresponds to a preset first reference temperature; the third crystal oscillator control word corresponds to the preset first reference temperature;
[0009] obtaining a first target crystal oscillator control word by summing the first crystal oscillator control word and the first crystal oscillator control word offset value;
[0010] performing frequency offset adjustment according to the first target crystal oscillator control word.
[0011] In an implementable embodiment, before the first temperature of the target chip is acquired, the method further comprises:
[0012] The current state information of the terminal is acquired, and the current state information of the terminal includes information detected that the terminal is powered on, or the current state information includes information detected that the terminal is woken up from a sleep state.
[0013] In an implementable embodiment, in the case that the current state information includes information detected that the terminal is woken up from a sleep state, before the first crystal control word corresponding to the first temperature is determined by using the preset first fitting curve, the method further comprises:
[0014] It is judged whether the difference between the first temperature after the terminal is woken up and the temperature before the terminal is woken up is greater than a preset temperature threshold value;
[0015] In the case that the difference between the first temperature after the terminal is woken up and the temperature before the terminal is woken up is greater than the preset temperature threshold value, the first crystal control word corresponding to the first temperature is determined by using the preset first fitting curve.
[0016] In an implementable embodiment, before the first crystal control word corresponding to the first temperature is determined by using the preset first fitting curve, the method further comprises:
[0017] The zero frequency offset values of the crystal oscillator at different second temperatures are acquired;
[0018] The fourth crystal control word of the zero frequency offset values of the crystal oscillator at different second temperatures is determined;
[0019] The second temperature and the fourth crystal control word are linearly fitted to obtain a preset first fitting curve, wherein the second temperature includes the first temperature.
[0020] In an implementable embodiment, after the frequency offset is adjusted according to the first target crystal control word, the method further comprises:
[0021] The first frequency offset value after the frequency offset is adjusted based on the first target crystal control word is acquired;
[0022] In the case that the first frequency offset value is greater than a preset frequency offset threshold value, the second crystal control word offset value is obtained by multiplying the first frequency offset value and the slope of the preset second fitting curve;
[0023] The second target crystal control word is obtained by summing the second crystal control word offset value and the first target crystal control word;
[0024] The frequency offset is adjusted according to the second target crystal control word.
[0025] In an implementable embodiment, before multiplying the first frequency offset value and the slope of the preset second fitting curve to obtain the second crystal control word offset value, the method further comprises:
[0026] obtaining the frequency offset value of the crystal oscillator of the chip at different second temperatures;
[0027] determining a fifth crystal control word of the frequency offset value of the crystal oscillator at different second temperatures;
[0028] linearly fitting the frequency offset value of the crystal oscillator and the fifth crystal control word to obtain a preset second fitting curve.
[0029] In an implementable embodiment, the method further comprises:
[0030] obtaining terminal current state information, the terminal current state information including information that the terminal is in a connected state;
[0031] obtaining a first frequency offset value after adjusting the frequency offset based on the first target crystal control word;
[0032] in a case where the first frequency offset value is greater than a preset frequency offset threshold, multiplying the first frequency offset value and a slope of a preset second fitting curve to obtain a second crystal control word offset value;
[0033] summing the second crystal control word offset value and the first target crystal control word to obtain a second target crystal control word;
[0034] adjusting the frequency offset according to the second target crystal control word.
[0035] In a second aspect, the embodiments of the present disclosure provide a device for adjusting the frequency offset of a crystal oscillator, and the device comprises:
[0036] an obtaining module, configured to obtain a first temperature of a target chip, the first temperature representing a temperature value of the target chip at a current temperature;
[0037] a determining module, configured to determine a first crystal control word corresponding to the first temperature by using a preset first fitting curve, the first fitting curve representing a mapping relationship between a crystal oscillator zero frequency offset control word and a temperature;
[0038] a calculating module, configured to obtain a first crystal control word offset value by subtracting a third crystal control word from a second crystal control word; the second crystal control word is a crystal control word corresponding to a preset first reference temperature and determined by using a preset first fitting curve; the third crystal control word is a crystal control word corresponding to the preset first reference temperature;
[0039] the calculating module is further configured to obtain a first target crystal control word by summing the first crystal control word and the first crystal control word offset value;
[0040] The adjusting module is configured to perform frequency offset adjustment according to the first target crystal oscillator control word.
[0041] In a third aspect, the embodiments of the present disclosure provide a device for adjusting a frequency offset of a crystal oscillator, the device comprising a processor and a memory storing computer program instructions; the processor reads and executes the computer program instructions to implement the method for adjusting a frequency offset of a crystal oscillator according to any one of the first aspect.
[0042] In a fourth aspect, the embodiments of the present disclosure provide a computer storage medium, the computer readable storage medium storing computer program instructions, the computer program instructions being executed by a processor to implement the method for adjusting a frequency offset of a crystal oscillator according to any one of the first aspect.
[0043] In a fifth aspect, the embodiments of the present disclosure provide a computer program product, instructions in the computer program product being executed by a processor of an electronic device to cause the electronic device to perform the method for adjusting a frequency offset of a crystal oscillator according to any one of the first aspect.
[0044] The method, device, equipment, computer storage medium and computer program product for adjusting a frequency offset of a crystal oscillator provided by the embodiments of the present disclosure can obtain a first temperature of a target chip, determine a first crystal oscillator control word corresponding to the first temperature by using a preset first fitting curve, determine current crystal oscillator control word information, and facilitate subsequent obtaining of a first target crystal oscillator control word. The embodiments of the present disclosure obtain a first crystal oscillator control word offset value by subtracting a second crystal oscillator control word from a third crystal oscillator control word, obtain a first target crystal oscillator control word by summing the first crystal oscillator control word and the first crystal oscillator control word offset value, and perform frequency offset adjustment according to the first target crystal oscillator control word. The embodiments of the present disclosure obtain the first crystal oscillator control word offset value by subtracting the second crystal oscillator control word from the third crystal oscillator control word, thereby obtaining the first target crystal oscillator control word according to the first crystal oscillator control word offset value and performing frequency offset adjustment. The time for obtaining the first crystal oscillator control word offset value is reduced, and the crystal oscillator frequency offset adjustment time is shortened, thereby improving the crystal oscillator frequency offset adjustment efficiency. BRIEF DESCRIPTION OF DRAWINGS
[0045] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments of the present application. For those skilled in the art, without creative labor, other drawings can also be obtained according to these drawings.
[0046] Figure 1 is a flowchart of a method for adjusting a frequency offset of a crystal oscillator provided by the embodiments of the present disclosure.
[0047] Figure 2 is a flowchart of a method for obtaining current state information of a terminal provided by the embodiments of the present disclosure.
[0048] Figure 3 is a flowchart of a method for determining a first temperature according to a terminal wake-up provided by an embodiment of the present disclosure.
[0049] Figure 4 is a flowchart of a method for determining a first fitting curve provided by an embodiment of the present disclosure.
[0050] Figure 5 is a schematic diagram of a first fitting curve provided by an embodiment of the present disclosure.
[0051] Figure 6 is a flowchart of a method for determining a first frequency offset value provided by an embodiment of the present disclosure.
[0052] Figure 7 is a flowchart of a method for determining a second fitting curve provided by an embodiment of the present disclosure.
[0053] Figure 8 is a schematic diagram of a second fitting curve provided by an embodiment of the present disclosure.
[0054] Figure 9 is a flowchart of a method for adjusting a crystal oscillator frequency offset when a terminal is in a connected state provided by an embodiment of the present disclosure.
[0055] Figure 10 is a structural diagram of a device for adjusting a crystal oscillator frequency offset provided by an embodiment of the present disclosure.
[0056] Figure 11 is a structural diagram of an apparatus for adjusting a crystal oscillator frequency offset provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0057] The features and exemplary embodiments of various aspects of the present disclosure will be described in detail below, in order to make the purposes, technical solutions and advantages of the present disclosure clearer, the present application will be further described in detail below in combination with the drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present disclosure, but not to limit the present disclosure. The present disclosure can be implemented without some of these specific details by those skilled in the art. The following description of the embodiments is only to provide a better understanding of the present disclosure by showing examples of the present disclosure.
[0058] It is to be noted that, in the present document, the terms such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between such entities or operations. Also, the terms "comprises", "comprising", or any other variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by an "includes" statement does not exclude the existence of additional elements of the same nature as those included in the process, method, article, or apparatus that includes the stated elements.
[0059] Before the technical solutions provided by the embodiments of the present disclosure are described, the problems existing in the related art are specifically described to facilitate the understanding of the embodiments of the present disclosure.
[0060] At present, the NB-IOT terminal chip generally uses a passive crystal oscillator as a frequency reference to generate a stable frequency source for a signal. The output frequency of the passive crystal oscillator is easily affected by temperature. As the temperature changes when the passive crystal oscillator is working, the originally output accurate crystal oscillator frequency drifts, resulting in frequency offset. The orthogonal frequency division multiplexing (OFDM) technology used by the NB-IOT terminal chip is easily affected by carrier frequency offset (CFO). Frequency offset will destroy the orthogonality between subcarriers of the OFDM system, cause inter-carrier interference (ICI), and thus cause the demodulation performance of the OFDM system to decrease and the bit error rate to increase.
[0061] In the related art, in order to reduce the influence of temperature on the output frequency of the passive crystal oscillator, a temperature compensation method is usually used to obtain the offset value of the frequency to correct the output frequency affected by temperature. The specific steps of the temperature compensation method in the related art are as follows: the NB-IOT chip obtains the actual readings of the temperature sensor at a preset calibration temperature and a non-pre-set calibration temperature, respectively, when working. According to the actual readings of the temperature sensor at the predetermined calibration temperature, the offset value of the temperature sensor at the predetermined calibration temperature is determined; and then, according to the actual readings of the temperature sensor at the non-pre-set calibration temperature, the offset value of the temperature sensor at the predetermined calibration temperature is corrected to correct the temperature sensor, and the initial offset value of the temperature sensor is obtained.
[0062] In addition, in the related art, the offset value of the crystal oscillator at different temperatures needs to be obtained, and the initial offset value of the crystal oscillator is determined according to the frequency offset value of the crystal oscillator at different temperatures and the initial offset value calculation formula. After obtaining the initial offset value of the crystal oscillator and the initial offset value of the temperature sensor, the actual offset value of the NB-IOT chip is determined according to the actual offset value calculation formula, and the chip is corrected by using the actual offset value.
[0063] However, the related art needs to obtain the readings of the temperature sensor and the offset value of the crystal oscillator at different temperatures to obtain the frequency offset value, which consumes a lot of time and leads to low efficiency of frequency offset calibration.
[0064] In view of the above research findings of the inventor, the embodiments of the present disclosure provide a crystal oscillator frequency offset adjustment method, device, equipment, computer storage medium and computer program product, which can solve the above at least one technical problem existing in the related art.
[0065] The technical concept of the embodiments of the present disclosure is to shorten the time of obtaining the crystal oscillator control word offset value. For example, after the NB-IOT chip is powered on, the current temperature value is obtained by the temperature sensor, and the standard crystal oscillator zero frequency offset control word (DCXO_curr_temp_value) is obtained by combining the pre-stored crystal oscillator zero frequency offset control word fitting curve on the chip. The crystal oscillator zero frequency offset control word (DCXO_ref_value) corresponding to the reference calibration temperature pre-stored on the chip is obtained, and the corresponding crystal oscillator zero frequency offset control word (DCXO_ref_value) is obtained according to the temperature reading of the temperature sensor at the reference temperature. The difference between DCXO_ref_value and DCXO_ref_value is obtained to obtain the crystal oscillator zero frequency offset control word offset value (DCXO_offset_value). Then, the corrected crystal oscillator zero frequency offset control word (DCXO_curr_value) is obtained by summing DCXO_offset_value and DCXO_curr_temp_value, and the chip frequency offset is corrected according to DCXO_curr_value.
[0066] In order to solve the problems in the prior art, the embodiments of the present disclosure provide a crystal oscillator frequency offset adjustment method, device, equipment, computer storage medium and computer program product. First, the crystal oscillator frequency offset adjustment method provided by the embodiments of the present disclosure is introduced.
[0067] Figure 1 A flowchart of a crystal oscillator frequency offset adjustment method provided by an embodiment of the present disclosure is shown. As shown in Figure 1 The method can include the following steps: S110-S150.
[0068] S110: Obtain the first temperature of the target chip.
[0069] The first temperature represents a temperature value of the target chip at a current temperature.
[0070] In the embodiments of the present disclosure, the frequency offset of the target chip of the terminal is adjusted by using the crystal oscillator frequency offset adjustment method, and the first temperature of the target chip needs to be obtained. The first temperature can be detected and read by a temperature sensor or other detection means. For example, when the temperature sensor detects that the current environment temperature of the target chip is A degrees, the first temperature is determined to be A degrees.
[0071] S120: determining a first crystal oscillator control word corresponding to the first temperature by using a preset first fitting curve.
[0072] The first fitting curve represents the mapping relationship between the crystal oscillator zero frequency offset control word and the temperature.
[0073] In the embodiments of the present disclosure, the first fitting curve reflects the corresponding relationship between the crystal oscillator zero frequency offset control word and the temperature, and the first crystal oscillator control word corresponding to the obtained first temperature can be determined by using the first fitting curve. The first fitting curve can be pre-stored in the target chip when the target chip is shipped, and the first crystal oscillator control word can be the first crystal oscillator zero frequency offset control word.
[0074] It should be understood that the crystal oscillator control word is the corresponding capacitor register value, and by modifying the capacitor register control word, the change value of the capacitor can be adjusted to realize the adjustment of the frequency offset. The crystal oscillator zero frequency offset control word is the capacitor register value corresponding to the crystal oscillator at zero frequency offset. For example, the DCXO capacitor register bit width is 12 bits, and the crystal oscillator control word range is 0-4096.
[0075] In one embodiment, the terminal obtains the first temperature by using the temperature sensor and reads the first fitting curve pre-stored in the chip, and the first temperature is brought into the first fitting curve to calculate the first crystal oscillator control word.
[0076] For example, the expression of the first fitting curve is formula (1), and the expression of the first crystal oscillator control word calculated by bringing the first temperature into the first fitting curve is formula (2).
[0077] DCXO_temp_value = f_t (T) (1)
[0078] DCXO_temp_value is the crystal oscillator zero frequency offset control word, and T is the temperature.
[0079] DCXO_curr_temp_value = f_t (T_curr) (2)
[0080] Wherein, the DCXO_curr_temp_value is the first crystal control word, and the T_curr is the first temperature.
[0081] S130: obtaining the first crystal control word offset value by subtracting the second crystal control word from the third crystal control word.
[0082] Wherein, the second crystal control word is determined by using a preset first fitting curve and corresponds to a preset first reference temperature; and the third crystal control word corresponds to the preset first reference temperature.
[0083] In the embodiments of the present disclosure, the terminal obtains the second crystal control word and the third crystal control word, and obtains the first crystal control word offset value by subtracting the second crystal control word from the third crystal control word. By obtaining the first crystal control word offset value, the frequency offset of the target chip can be adjusted. The second crystal control word includes a second crystal zero frequency offset control word, and the third crystal control word includes a third crystal zero frequency offset control word. The third crystal control word can be pre-stored in the chip internally when the chip is shipped. The first reference temperature corresponding to the third crystal control word can be pre-stored in the chip internally when the chip is shipped.
[0084] It should be understood that the first fitting curve in the embodiments of the present disclosure reflects the mapping relationship between the second crystal control word of a certain number of chips in the factory and the first reference temperature, which can be understood as an overall average. The curve generated by mapping the third crystal control word and the first reference temperature in the embodiments of the present disclosure reflects the mapping relationship between the third crystal control word of a single chip and the first reference temperature, which can be understood as an individual value. The curve has the same trend as the first fitting curve but does not completely coincide with the first fitting curve.
[0085] For example, the expression of the first fitting curve is formula (1), and the expression of the second crystal control word corresponding to the preset first reference temperature determined by using the preset first fitting curve is shown in formula 3:
[0086] DCXO_base_value = f_t(T_ref) (3)
[0087] Wherein, the DCXO_base_value is the second crystal control word, and the T_ref is the first reference temperature.
[0088] For example, the expression of the second crystal control word and the third crystal control word subtracting to obtain the first crystal control word offset value is shown in formula 4:
[0089] DCXO_offset_value_1 = DCXO_base_value - DCXO_ref_value (4)
[0090] Wherein, the DCXO_offset_value_1 is the first crystal oscillator control word offset value, the DCXO_base_value is the second crystal oscillator control word, and the DCXO_ref_value is the third crystal oscillator control word.
[0091] In an embodiment, the first reference temperature, i.e., the reference calibration temperature, is set to B degrees when the chip is factory shipped, and the corresponding third crystal oscillator control word b is obtained by detecting the chip with a related instrument. The third crystal oscillator control word b and the first reference temperature B are stored in the chip.
[0092] In another embodiment, the second crystal oscillator control word is calculated by using the first fitting curve when the first reference temperature stored in the target chip is read.
[0093] S140: The first target crystal oscillator control word is obtained by summing the first crystal oscillator control word and the first crystal oscillator control word offset value.
[0094] In the embodiment of the present disclosure, the target chip can obtain the first target crystal oscillator control word after obtaining the first crystal oscillator control word and the first crystal oscillator control word offset value and summing them. The first target crystal oscillator control word can be a corrected crystal oscillator zero frequency offset control word.
[0095] For example, the expression of summing the first crystal oscillator control word and the first crystal oscillator control word offset value to obtain the first target crystal oscillator control word is shown in formula 5:
[0096] DCXO_curr_value = DCXO_curr_temp_value - DCXO_offset_value_1 (5)
[0097] Wherein, the DCXO_curr_value is the first target crystal oscillator control word, the DCXO_curr_temp_value is the first crystal oscillator control word, and the DCXO_offset_value_1 is the first crystal oscillator control word offset value.
[0098] The purpose of summing the first crystal oscillator control word and the first crystal oscillator control word offset value in the embodiment of the present disclosure is to obtain the first target crystal oscillator control word, and the frequency offset of the crystal oscillator affected by the temperature is adjusted according to the first target crystal oscillator control word.
[0099] S150: The frequency offset is adjusted according to the first target crystal oscillator control word.
[0100] In the embodiment of the present disclosure, the frequency offset can be corrected by obtaining the first target crystal oscillator control word, including modifying the capacitance register control word, adjusting the change value of the capacitance, and adjusting the frequency offset.
[0101] In one embodiment, the frequency output by the crystal oscillator before being affected by temperature is E, the frequency output by the first crystal oscillator control word after being affected by temperature is C, and the frequency offset is corrected by summing C and D after obtaining the first crystal oscillator control word offset value D, so that the frequency output by the crystal oscillator is close to E.
[0102] The first temperature of the target chip is obtained, the first crystal oscillator control word corresponding to the first temperature is determined by using a preset first fitting curve, and current crystal oscillator control word information is determined, so that the first target crystal oscillator control word is conveniently obtained subsequently. The first crystal oscillator control word offset value is obtained by subtracting the second crystal oscillator control word from the third crystal oscillator control word, the first target crystal oscillator control word is obtained by summing the first crystal oscillator control word and the first crystal oscillator control word offset value, and frequency offset adjustment is performed according to the first target crystal oscillator control word. According to the present disclosure, the first crystal oscillator control word offset value can be obtained by subtracting the second crystal oscillator control word from the third crystal oscillator control word, so that the first target crystal oscillator control word is obtained and frequency offset adjustment is performed according to the first crystal oscillator control word offset value. The time for obtaining the first crystal oscillator control word offset value is reduced, and the crystal oscillator frequency offset adjustment time is shortened, thereby improving the crystal oscillator frequency offset adjustment efficiency.
[0103] In one embodiment, as shown in Figure 2 Before obtaining the first temperature of the target chip, the method can further include step S210.
[0104] S210: Obtain terminal current state information.
[0105] The terminal current state information includes information detected when the terminal is powered on, or the current state information includes information detected when the terminal is woken up from a sleep state.
[0106] In the present disclosure, before obtaining the first temperature of the target chip, the terminal needs to obtain the current state information of the terminal in the actual working process, and perform a corresponding frequency offset adjustment step according to the current state information of the terminal. The state information represents the current working state of the terminal, and the number of states of the terminal is not limited and can be multiple, including: a cell search state, a connection state, and a sleep wake-up state.
[0107] For example, when the terminal obtains the current state information as the cell search state, the terminal is currently searching for a suitable cell for connection; when the terminal obtains the current state information as the connection state, the terminal has completed cell search and is currently connecting with the network device; and when the terminal obtains the current state information as the sleep wake-up state, the terminal is currently woken up to end sleep.
[0108] The embodiment of the present disclosure can adaptively adjust and is suitable for various working application scenarios by acquiring the current state information of the terminal and facilitating subsequent execution of the frequency offset adjustment step corresponding to the current state information of the terminal.
[0109] In one embodiment, as shown in FIG. 4, before the first temperature corresponding first crystal control word is determined by using the preset first fitting curve, the method can further include steps S410-S430. Figure 3
[0110] S310: Determine whether the difference between the first temperature after the terminal is woken up and the temperature before the terminal is put to sleep is greater than a preset temperature threshold.
[0111] In the embodiment of the present disclosure, when the terminal acquires the current state information as the sleep wake-up state, the first temperature after the terminal is woken up is acquired and the difference with the temperature before the terminal is put to sleep is obtained. The temperature before the terminal is put to sleep can be stored in the terminal. The difference between the first temperature after the terminal is woken up and the temperature before the terminal is put to sleep is compared with the preset temperature threshold.
[0112] In the embodiment of the present disclosure, if the difference between the first temperature after the terminal is woken up and the temperature before the terminal is put to sleep is less than the preset temperature threshold, it indicates that the target chip can use the crystal zero frequency offset control word before the sleep for initial frequency offset adjustment. If the difference between the first temperature after the terminal is woken up and the temperature before the terminal is put to sleep is greater than the preset temperature threshold, it indicates that the target chip needs to acquire the crystal zero frequency offset control word corresponding to the first temperature acquired by the temperature sensor for initial frequency offset adjustment.
[0113] S320: In the case where the difference between the first temperature after the terminal is woken up and the temperature before the terminal is put to sleep is greater than the preset temperature threshold, determine the first temperature corresponding first crystal control word by using the preset first fitting curve.
[0114] The embodiment of the present disclosure can adaptively adjust and is suitable for various working application scenarios by acquiring the current state information of the terminal as the sleep wake-up state and performing the corresponding judgment operation.
[0115] In one embodiment, as shown in FIG. 4, before the first temperature corresponding first crystal control word is determined by using the preset first fitting curve, the method can further include steps S410-S430. Figure 4
[0116] Step S410: Acquire the zero frequency offset value of the crystal oscillator under different second temperatures.
[0117] Step S420: Determine the fourth crystal control word of the zero frequency offset value of the crystal oscillator under different second temperatures.
[0118] Step S430: Linearly fit the second temperature and the fourth crystal oscillator control word to obtain a preset first fitting curve.
[0119] The second temperature includes the first temperature.
[0120] In this embodiment, the first fitting curve can be preset inside the chip at the factory. Obtaining the first fitting curve requires data from a certain number of chip tests; the number of chips is not fixed and can be one, two, or more. The zero-frequency offset of the crystal oscillator at different second temperatures is detected, where the second temperature can be the current temperature of the chip. Based on the zero-frequency offset of the crystal oscillator at different second temperatures, the corresponding crystal oscillator zero-frequency offset control word is measured and determined using relevant instruments. The first fitting curve can be obtained by linearly fitting the fourth crystal oscillator control word of the zero-frequency offset of the crystal oscillator at different second temperatures with the second temperature.
[0121] The embodiments disclosed herein can shorten the time required to subsequently acquire the target crystal oscillator control word and improve the efficiency of crystal oscillator frequency offset adjustment by pre-setting the first fitting curve inside the chip.
[0122] The first fitting curve can be a temperature-crystal zero-frequency offset control word fitting curve, such as... Figure 5 As shown. In Figure 5 In the graph, the horizontal axis represents temperature, and the vertical axis represents the crystal oscillator zero-frequency offset control word. The crystal oscillator zero-frequency offset control word obtained through this function is the standard crystal oscillator zero-frequency offset control word. The corresponding crystal oscillator zero-frequency offset control word varies with different temperatures. For example, when the temperature is 0 degrees Celsius, the corresponding crystal oscillator zero-frequency offset control word is between 2400 and 2600; when the temperature is 600 degrees Celsius, the corresponding crystal oscillator zero-frequency offset control word is between 1200 and 1400.
[0123] This embodiment of the present disclosure pre-stores the first fitting curve obtained from factory testing inside the chip, enabling the terminal to quickly obtain the crystal oscillator zero-frequency offset control word corresponding to the temperature during actual operation, without having to obtain the crystal oscillator zero-frequency offset control word for each chip at different temperatures in real time.
[0124] In one embodiment, such as Figure 6 As shown, after frequency offset adjustment based on the first target crystal oscillator control word, the method may further include steps S510-S540.
[0125] S510: Obtain the first frequency offset value after adjusting the frequency offset based on the first target crystal oscillator control word.
[0126] In this embodiment of the present disclosure, after the target chip obtains the first target crystal oscillator control word, it performs frequency offset adjustment. At this time, the adjusted frequency offset can be regarded as the first frequency offset value.
[0127] It needs to be understood that the adjustment of the frequency deviation of the crystal oscillator by using the first target crystal oscillator control word is similar to "coarse adjustment", which can ensure that the frequency output after the module or terminal is powered on is not affected by a large temperature. After the module or terminal actually works for a period of time, the temperature will still rise, and at this time, the phenomenon of crystal oscillator frequency deviation will still occur, and therefore other measures need to be taken to "fine adjust" the crystal oscillator frequency deviation.
[0128] S520: In the case where the first frequency deviation value is greater than the preset frequency deviation threshold, multiplying the first frequency deviation value and the slope of the preset second fitting curve to obtain a second crystal oscillator control word offset value.
[0129] In the embodiment of the present disclosure, when it is detected that the first frequency deviation value is greater than the preset frequency deviation threshold, it indicates that the crystal oscillator frequency deviation still needs to be adjusted at this time. The first frequency deviation value is converted into a second frequency deviation value by using a preset conversion formula, and the slope of the preset second fitting curve is multiplied by the second frequency deviation value to obtain a second crystal oscillator control word offset value. The second fitting curve reflects the relationship between the crystal oscillator frequency deviation and the crystal oscillator control word at different temperatures.
[0130] In the embodiment of the present disclosure, when it is detected that the first frequency deviation value is less than or equal to the preset frequency deviation threshold, a digital compensation algorithm can be used to adjust the frequency deviation value.
[0131] In the embodiment of the present disclosure, the first frequency deviation value cannot directly participate in the calculation of the second crystal oscillator control word offset value, and therefore the first frequency deviation value needs to be converted into a second frequency deviation value, so that the second frequency deviation value is multiplied by the slope of the second fitting curve to obtain the second crystal oscillator control word offset value.
[0132] Exemplarily, the expression for converting the first frequency deviation value into the second frequency deviation value is shown in formula 6:
[0133] fo_normal = fo * freq_ch * bw / max_value (6)
[0134] Wherein, fo is the input frequency deviation, fo_normal is the second frequency deviation value, freq_ch is the test frequency point used in the calibration process, bw is the bandwidth, and max_value is the maximum value of the crystal oscillator control word.
[0135] Exemplarily, the expression for multiplying the second frequency deviation value and the slope of the second fitting curve to obtain the second crystal oscillator control word offset value is shown in formula 7:
[0136] DCXO_offset_value_2 = fo_normal * k (7)
[0137] Wherein, the DCXO_offset_value_2 is the second crystal oscillator control word offset value, the fo_normal is the second frequency offset value, and the k is the slope of the second fitting curve.
[0138] S530: Summing the second crystal oscillator control word offset value and the first target crystal oscillator control word to obtain a second target crystal oscillator control word.
[0139] In the embodiments of the present disclosure, the terminal sums the obtained second crystal oscillator control word offset value and the first target crystal oscillator control word to obtain the second target crystal oscillator control word, which is convenient for subsequent adjustment of the crystal oscillator frequency offset.
[0140] For example, the expression of summing the second crystal oscillator control word offset value and the first target crystal oscillator control word is shown in formula 8:
[0141] DCXO_value_update = DCXO_curr_value + DCXO_offset_value_2 (8)
[0142] Wherein, the DCXO_value_update is the second target crystal oscillator control word, the DCXO_curr_value is the first target crystal oscillator control word, and the DCXO_offset_value_2 is the second crystal oscillator control word offset value.
[0143] S540: Adjusting the frequency offset according to the second target crystal oscillator control word.
[0144] In the embodiments of the present disclosure, after the target chip obtains the second target crystal oscillator control word, the crystal oscillator frequency offset is adjusted.
[0145] In the embodiments of the present disclosure, the first frequency offset value is compared with the preset frequency offset threshold value, and if the first frequency offset value is greater than the preset frequency offset threshold value, the corresponding second target crystal oscillator control word is obtained to adjust the frequency offset, which reflects the rationality and superiority of the multi-level adjustment of the crystal oscillator frequency offset of the present disclosure.
[0146] In one embodiment, as shown in FIG. 6, before multiplying the first frequency offset value and the slope of the preset second fitting curve to obtain the second crystal oscillator control word offset value, the method can further include steps S610-S630. Figure 7
[0147] S610: Obtaining the frequency offset value of the crystal oscillator of the chip at different second temperatures.
[0148] S620: Determining the fifth crystal oscillator control word of the frequency offset value of the crystal oscillator at different second temperatures.
[0149] S630: Linearly fitting the frequency offset value of the crystal oscillator and the fifth crystal oscillator control word to obtain a preset second fitting curve.
[0150] In this embodiment, the second fitting curve can be preset inside the chip at the factory. Obtaining the second fitting curve requires data from a certain number of chip tests; the number of chips is not fixed and can be one, two, or more. The frequency offset of the crystal oscillator at different second temperatures is detected, where the second temperature can be the current temperature of the chip. Based on the frequency offset of the crystal oscillator at different second temperatures, the corresponding crystal oscillator frequency offset control word is measured and determined using relevant instruments. The second fitting curve can be obtained by linearly fitting the fifth crystal oscillator control word with the frequency offset value of the crystal oscillator at different second temperatures.
[0151] In this embodiment, the terminal can quickly obtain the crystal oscillator control word corresponding to the crystal oscillator frequency offset at a certain temperature through a pre-stored second fitting curve during actual operation. This eliminates the need to obtain the frequency offset value of the crystal oscillator for each chip at each temperature, shortening the frequency offset adjustment time and improving the efficiency of frequency offset adjustment.
[0152] The second fitting curve can be the crystal oscillator frequency offset versus crystal oscillator control word curve at different temperatures, such as... Figure 8 As shown. In Figure 8 In the graph, the horizontal axis represents frequency offset, and the vertical axis represents the crystal oscillator control word. There are multiple curves showing the frequency offset versus the crystal oscillator control word at different temperatures, all of which can be approximated as straight lines and use the same slope. Different frequency offsets correspond to different crystal oscillator control words. For example, at a temperature of 24 degrees Celsius, when the frequency offset is less than -8000 Hz, the crystal oscillator control word is less than 1000. When the temperature is -4 degrees Celsius, when the frequency offset is greater than 8000 Hz, the crystal oscillator control word is greater than 3000.
[0153] This embodiment of the disclosure pre-stores the second fitting curve obtained from factory testing inside the chip, enabling the terminal to quickly obtain the crystal oscillator control word corresponding to the crystal oscillator frequency offset in actual operation, without having to obtain the crystal oscillator frequency offset and crystal oscillator control word of each chip in real time.
[0154] In one embodiment, such as Figure 9 As shown, the method further includes steps S710-S750.
[0155] S710: Obtain the current status information of the terminal, which includes information about whether the terminal is in a connected state.
[0156] In this embodiment of the disclosure, the terminal needs to obtain its current status information during actual operation. When the obtained current status information includes information that the terminal is in a connected state, a frequency offset adjustment step corresponding to the connected state is executed.
[0157] This embodiment of the present disclosure obtains the current state information of the terminal, which facilitates the subsequent execution of frequency offset adjustment steps corresponding to the current state information of the terminal. This demonstrates that this embodiment of the present disclosure can adaptively adjust and is applicable to a variety of working application scenarios.
[0158] S720: Obtain the first frequency offset value after adjusting the frequency offset based on the first target crystal oscillator control word.
[0159] In this embodiment of the present disclosure, after the target chip obtains the first target crystal oscillator control word, it performs frequency offset adjustment. At this time, the adjusted frequency offset can be regarded as the first frequency offset value.
[0160] S730: When the first frequency offset value is greater than the preset frequency offset threshold, the first frequency offset value is multiplied by the slope of the preset second fitting curve to obtain the second crystal oscillator control word offset value.
[0161] In this embodiment of the disclosure, when a first frequency offset value is detected to be greater than a preset frequency offset threshold, the first frequency offset value can be converted into a second frequency offset value using a preset conversion formula, and the slope of a preset second fitting curve is multiplied by the second frequency offset value to obtain a second crystal oscillator control word offset value. The second fitting curve reflects the relationship between the crystal oscillator frequency offset and the crystal oscillator control word at different temperatures.
[0162] In this embodiment of the disclosure, when the first frequency offset value is detected to be less than or equal to a preset frequency offset threshold, a digital compensation algorithm can be used to adjust the frequency offset value.
[0163] S740: The second target crystal oscillator control word is obtained by summing the offset value of the second crystal oscillator control word with the first target crystal oscillator control word.
[0164] In this embodiment of the present disclosure, the terminal sums the obtained second crystal oscillator control word offset value and the first target crystal oscillator control word to obtain the second target crystal oscillator control word, which facilitates subsequent adjustment of the crystal oscillator frequency offset.
[0165] S750: Frequency offset adjustment based on the second target crystal oscillator control word.
[0166] In this embodiment of the disclosure, after the target chip obtains the second target crystal oscillator control word, it adjusts the crystal oscillator frequency offset.
[0167] In this embodiment, the target chip can quickly obtain the crystal control word corresponding to the crystal oscillator frequency offset at a certain temperature through a pre-stored second fitting curve during actual operation. This eliminates the need to obtain the frequency offset value of the crystal oscillator for each chip at each temperature, shortening the frequency offset adjustment time and improving the efficiency of frequency offset adjustment.
[0168] like Figure 10 As shown in the embodiments of this disclosure, a crystal oscillator frequency offset adjustment device 1000 is also provided. The crystal oscillator frequency offset adjustment device 1000 includes:
[0169] The obtaining module 1001 is configured to obtain a first temperature of a target chip, the first temperature representing a temperature value of the target chip at a current temperature.
[0170] The determining module 1002 is configured to determine a first crystal control word corresponding to the first temperature by using a preset first fitting curve, the first fitting curve representing a mapping relationship between a crystal zero frequency offset control word and a temperature.
[0171] The calculating module 1003 is configured to obtain a first crystal control word offset value by subtracting a second crystal control word from a third crystal control word, the second crystal control word being a crystal control word corresponding to a preset first reference temperature and determined by using the preset first fitting curve, and the third crystal control word being a crystal control word corresponding to the preset first reference temperature.
[0172] The calculating module 1003 is further configured to obtain a first target crystal control word by summing the first crystal control word and the first crystal control word offset value.
[0173] The adjusting module 1004 is configured to perform frequency offset adjustment according to the first target crystal control word.
[0174] In some embodiments, the obtaining module 1001 is specifically configured to:
[0175] Obtain terminal current state information, the terminal current state information including information detected that the terminal is powered on, or the current state information including information detected that the terminal is woken up from a sleep state.
[0176] In some embodiments, the crystal frequency offset adjustment apparatus further includes a judging module, the judging module being configured to judge whether a difference between the first temperature after the terminal is woken up and the temperature before the terminal is in the sleep state is greater than a preset temperature threshold, and in the case that the difference between the first temperature after the terminal is woken up and the temperature before the terminal is in the sleep state is greater than the preset temperature threshold, the first crystal control word corresponding to the first temperature is determined by using the preset first fitting curve.
[0177] In some embodiments, the calculating module 1003 is specifically configured to:
[0178] Obtain zero frequency offset values of the crystal at different second temperatures, determine fourth crystal control words of the zero frequency offset values of the crystal at the different second temperatures, and linearly fit the second temperatures and the fourth crystal control words to obtain the preset first fitting curve, wherein the second temperatures include the first temperature.
[0179] In some embodiments, the adjusting module 1004 is specifically configured to:
[0180] obtain a first frequency offset value after adjusting the frequency offset based on the first target crystal control word; in a case where the first frequency offset value is greater than a preset frequency offset threshold, multiply the first frequency offset value and a slope of a preset second fitting curve to obtain a second crystal control word offset value; sum the second crystal control word offset value and the first target crystal control word to obtain a second target crystal control word; and adjust the frequency offset according to the second target crystal control word.
[0181] In some embodiments, the calculation module 1003 is specifically configured to:
[0182] obtain frequency offset values of the crystal oscillator at different second temperatures; determine fifth crystal control words of the frequency offset values of the crystal oscillator at the different second temperatures; and linearly fit the frequency offset values of the crystal oscillator and the fifth crystal control words to obtain a preset second fitting curve.
[0183] In some embodiments, the adjustment module 1004 is specifically configured to:
[0184] obtain terminal current state information, the terminal current state information including information that the terminal is in a connected state; obtain a first frequency offset value after adjusting the frequency offset based on the first target crystal control word; in a case where the first frequency offset value is greater than a preset frequency offset threshold, multiply the first frequency offset value and a slope of a preset second fitting curve to obtain a second crystal control word offset value; sum the second crystal control word offset value and the first target crystal control word to obtain a second target crystal control word; and adjust the frequency offset according to the second target crystal control word.
[0185] Figure 10 Each module / unit in the device has the function of implementing each step in Figures 1 to 4 , Figures 6 to 7 , and Figure 9 achieves the corresponding technical effects, and for brevity, will not be described here.
[0186] Figure 11 A hardware structure diagram of crystal oscillator frequency offset adjustment is shown.
[0187] The device for adjusting the frequency offset of the crystal oscillator can include a processor 1101 and a memory 1102 having computer program instructions stored therein.
[0188] Specifically, the processor 1101 can include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application.
[0189] The memory 1102 can include mass storage for data or instructions. As an example and not by way of limitation, the memory 1102 can include a hard disk drive (HDD), a floppy disk drive, flash memory, an optical disc (e.g., a compact disc (CD) or a digital versatile disc (DVD)), a solid-state drive (SSD), a USB drive, or a combination of two or more of these. Where appropriate, the memory 1102 can include removable or non-removable (or fixed) media. Where appropriate, the memory 1102 can be internal or external to the integrated gateway disaster recovery appliance. In particular embodiments, the memory 1102 is non-volatile, solid-state memory.
[0190] The memory 1102 can include read-only memory (ROM), random access memory (RAM), magnetic disk storage mediums, optical storage mediums, flash memory devices, electrical, optical, or other physical / tangible memory storage devices. Thus, in general, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., a memory device) encoded with software that, when executed (by one or more processors), is operable to
[0191] The processor 1101 implements the method of any of the above embodiments of the crystal oscillator frequency offset adjustment by reading and executing computer program instructions stored in the memory 1102.
[0192] In one example, the device for crystal oscillator frequency offset adjustment can further include a communication interface 1103 and a bus 1104. As shown, the processor 1101, the memory 1102, the communication interface 1103 are connected through the bus 1104 and complete communication between each other. Figure 11
[0193] The communication interface 1103 is mainly used to realize the communication between each module, device, unit and / or equipment in the embodiments of the present application.
[0194] Bus 1104 includes a hardware, software, or both that couples components of the online data traffic metering device to each other. As an example without limitation, bus can include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association local (VLB) bus, or another suitable bus or combination of buses. Bus 1104 may, in some aspects and implementations, include one or more buses. Although a specific bus is described and shown in the embodiments, the present application contemplates any suitable bus or interconnect. In addition, in conjunction with the method of adjusting for crystal oscillator frequency offset in the above-described embodiments, the embodiments of the present application also provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; the computer program instructions are executed by a processor to implement any of the methods of adjusting for crystal oscillator frequency offset in the above-described embodiments.
[0195] The embodiments of the present application also provide a computer program product, comprising a computer program, which, when executed by a processor, implements any of the methods of adjusting for crystal oscillator frequency offset in the above-described embodiments.
[0196] It needs to be clear that the present application is not limited to the specific configurations and processes described above and shown in the drawings. For the sake of brevity, detailed descriptions of well-known methods are omitted here. In the above-described embodiments, several specific steps are described and shown as examples. However, the method processes of the present application are not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between steps, after understanding the spirit of the present application.
[0197] The functions noted in the description of the structural block diagrams above can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application specific integrated circuits (ASICs), appropriate firmware, plug-ins, functional cards, and the like. When implemented in software, the elements of the present application are program or code segments that are used to perform the required tasks. The program or code segments can be stored in a machine-readable medium or transmitted through a data signal carried in a carrier wave over a transmission medium or communication link. A "machine-readable medium" includes any medium that can store or transport information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, and the like. The code segments can be downloaded via computer networks such as the Internet, intranets, and the like.
[0198] It is also important to note that the examples mentioned in the present application describe some methods or systems based on a series of steps or devices. However, the present application is not limited to the order of the steps mentioned above, that is, the steps can be performed in the order mentioned in the examples, or in an order different from the examples, or several steps can be performed simultaneously.
[0199] The computer program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other processing devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other processing devices to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks. These computer program instructions can also be stored in a computer readable medium that can direct a computer, other programmable data processing apparatus, or other processing devices to operate in a particular manner, such that the instructions stored in the computer readable medium produce an article of manufacture including instructions which implement the function / act specified in the flowchart and / or block diagram block or blocks. The computer program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other processing devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other processing devices to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks. These computer program instructions can also be stored in a computer readable medium that can direct a computer, other programmable data processing apparatus, or other processing devices to operate in a particular manner, such that the instructions stored in the computer readable medium produce an article of manufacture including instructions which implement the function / act specified in the flowchart and / or block diagram block or blocks.
[0200] The above merely describes a specific implementation of the present application. Those skilled in the art can clearly understand the specific working processes of the system, modules and units described above for the convenience and brevity of description, and can refer to the corresponding processes in the foregoing method embodiments, which will not be described herein again. It should be understood that the protection scope of the present application is not limited to this, and any person skilled in the art can easily think of various equivalent modifications or replacements within the technical range disclosed by the present application, and these modifications or replacements should be covered within the protection scope of the present application.
Claims
1. A method for adjusting the frequency offset of a crystal oscillator, characterized in that, The method comprises: obtaining a first temperature of a target chip, the first temperature representing a temperature value of the target chip at a current temperature; determining a first crystal control word corresponding to the first temperature by using a preset first fitting curve, the first fitting curve representing a mapping relationship between a crystal zero frequency offset control word and a temperature; obtaining a first crystal control word offset value by subtracting a second crystal control word from a third crystal control word; the second crystal control word is a crystal control word corresponding to a preset first reference temperature determined by using the preset first fitting curve; and the third crystal control word is a crystal control word corresponding to the preset first reference temperature; obtaining a first target crystal control word by summing the first crystal control word and the first crystal control word offset value; performing frequency offset adjustment according to the first target crystal control word.
2. The method of claim 1, wherein, Before the step of obtaining the first temperature of the target chip, the method further comprises: obtaining terminal current state information, the terminal current state information including information detected that the terminal is powered on, or the current state information including information detected that the terminal is woken up from a sleep state.
3. The method of claim 2, wherein, In the case where the current state information includes information detected that the terminal is woken up from a sleep state, before the step of determining the first crystal control word corresponding to the first temperature by using the preset first fitting curve, the method further comprises: determining whether a difference between the first temperature after the terminal is woken up and a temperature before the terminal is in the sleep state is greater than a preset temperature threshold value; in the case where the difference between the first temperature after the terminal is woken up and the temperature before the terminal is in the sleep state is greater than the preset temperature threshold value, determining the first crystal control word corresponding to the first temperature by using the preset first fitting curve.
4. The method of claim 1, wherein, Before the step of determining the first crystal control word corresponding to the first temperature by using the preset first fitting curve, the method further comprises: obtaining zero frequency offset values of a crystal at different second temperatures of the chip; determining fourth crystal control words of the zero frequency offset values of the crystal at the different second temperatures; linearly fitting the second temperatures and the fourth crystal control words to obtain the preset first fitting curve, wherein the second temperatures include the first temperature.
5. The method of claim 1, wherein, After the step of performing frequency offset adjustment according to the first target crystal control word, the method further comprises: obtaining a first frequency offset value after the frequency offset is adjusted based on the first target crystal control word; in the case where the first frequency offset value is greater than a preset frequency offset threshold value, multiplying the first frequency offset value and a slope of a preset second fitting curve to obtain a second crystal control word offset value; obtaining a second target crystal control word by summing the second crystal control word offset value and the first target crystal control word; performing frequency offset adjustment according to the second target crystal control word.
6. The method of claim 5, wherein, Before the step of multiplying the first frequency offset value and the slope of the preset second fitting curve to obtain the second crystal control word offset value, the method further comprises: obtaining frequency offset values of the crystal at different second temperatures of the chip; determining fifth crystal control words of the frequency offset values of the crystal at the different second temperatures; linearly fitting the frequency offset values of the crystal and the fifth crystal control words to obtain the slope of the preset second fitting curve.
7. The method according to any one of claims 1 to 6, characterized in that, The method further comprises: Obtaining terminal current state information, the terminal current state information including information that the terminal is in a connected state; Obtaining a first frequency offset value after adjusting the frequency offset based on the first target crystal control word; In the case where the first frequency offset value is greater than the preset frequency offset threshold, multiplying the first frequency offset value and a slope of a preset second fitting curve to obtain a second crystal control word offset value; Summing the second crystal control word offset value and the first target crystal control word to obtain a second target crystal control word; Adjusting the frequency offset according to the second target crystal control word.
8. A device for adjusting frequency deviation of a crystal oscillator, characterized by The apparatus comprises: An obtaining module for obtaining a first temperature of a target chip, the first temperature representing a temperature value of the target chip at a current temperature; A determining module for determining a first crystal control word corresponding to the first temperature by using a preset first fitting curve, the first fitting curve representing a mapping relationship between a crystal zero frequency offset control word and temperature; A calculating module for obtaining a first crystal control word offset value by subtracting a second crystal control word from a third crystal control word; the second crystal control word is a crystal control word corresponding to a preset first reference temperature and determined by using the preset first fitting curve; the third crystal control word is a crystal control word corresponding to the preset first reference temperature; The calculating module is further configured to sum the first crystal control word and the first crystal control word offset value to obtain a first target crystal control word; An adjusting module for adjusting the frequency offset according to the first target crystal control word.
9. A device for adjusting the frequency offset of a crystal oscillator, characterized in that, The device comprises a processor and a memory storing computer program instructions; the processor reads and executes the computer program instructions to implement the crystal frequency offset adjustment method according to any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer program instructions, and the computer program instructions are executed by the processor to implement the crystal frequency offset adjustment method according to any one of claims 1-7.
11. A computer program product, characterised in that, The computer program is executed by the processor to implement the crystal frequency offset adjustment method according to any one of claims 1-7.
Citation Information
Patent Citations
Frequency offset compensation method and system, electronic equipment and computer readable storage medium
CN114500209A
Equipment Wi-Fi adjusting and testing method, device, system and equipment
CN115902585A