Clock calibration circuit, clock calibration method and related equipment

By using the clock signals of the clock extraction module and the communication module in the clock calibration circuit for calibration, the problem of high clock chip design cost is solved, low power consumption and high clock accuracy are achieved, and the design of the clock calibration circuit is simplified.

CN113641214BActive Publication Date: 2024-10-29VIVO MOBILE COMM CO LTD
View PDF 13 Cites 0 Cited by

Patent Information

Application Number
CN202110974293.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-24
Publication Date
2024-10-29
Estimated Expiration
2041-08-24

AI Technical Summary

Technical Problem

The design cost of clock chips is high, and it is difficult to achieve both high clock accuracy and low power consumption when the terminal is shut down.

Method used

By introducing a clock extraction module into the clock calibration circuit and using the clock signal of the communication module as a reference signal to calibrate the clock signal of the oscillation module, it avoids adding additional calibration clock sources in the clock calibration circuit and reduces design costs.

Benefits of technology

It is possible to reduce the design cost of the clock calibration circuit when the terminal is shut down, simplify the clock calibration circuit, reduce the clock accuracy calibration steps required when the clock calibration is shipped from the factory, and improve the time accuracy of the real-time clock module.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113641214B_ABST
    Figure CN113641214B_ABST
Patent Text Reader

Abstract

The present application discloses a clock calibration circuit, a clock calibration method and related equipment, wherein the clock calibration circuit comprises a real-time clock module, an oscillation module, a clock extraction module, a communication module and a control module, wherein the first end of the clock extraction module is electrically connected to the communication module, the control module is electrically connected to the second end of the clock extraction module, the oscillation module and the real-time clock module respectively, and the oscillation module is also electrically connected to the real-time clock module; wherein the clock extraction module is used to obtain a first clock signal of the communication module, and when the error between the clock frequency of the first clock signal and the clock frequency of the second clock signal corresponding to the oscillation module exceeds a preset range, the control module calibrates the second clock signal based on the first clock signal, and updates the real-time clock module based on the calibrated second clock signal.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of communication technology, and specifically relates to a clock calibration circuit, a clock calibration method and related equipment. Background Art

[0002] When the terminal is turned off, the real-time clock module of the terminal has the requirement of both high clock accuracy and extremely low power consumption. Among them, the clock required for shutdown can be generated by integrating an oscillator module in the clock chip where the real-time clock module is located, so as to achieve the purpose of extremely low power consumption; and by integrating a dedicated clock source in the clock chip where the real-time clock module is located, the system clock can be calibrated through the dedicated clock source, so as to achieve the purpose of improving the clock accuracy of the real-time clock module. However, integrating a dedicated clock source on the clock chip will increase the design cost of the clock chip.

[0003] It can be seen that in the related art, the clock chip has the problem of high design cost. Summary of the invention

[0004] The present application aims to provide a clock calibration circuit, a clock calibration method and related equipment, which can solve the problem of high design cost of clock chips in related technologies.

[0005] In order to solve the above technical problems, this application is implemented as follows:

[0006] In a first aspect, an embodiment of the present application proposes a clock calibration circuit, comprising a real-time clock module, an oscillation module, a clock extraction module, a communication module and a control module, wherein a first end of the clock extraction module is electrically connected to the communication module, the control module is electrically connected to a second end of the clock extraction module, the oscillation module and the real-time clock module respectively, and the oscillation module is also electrically connected to the real-time clock module;

[0007] Among them, the clock extraction module is used to obtain the first clock signal of the communication module, and when the error between the clock frequency of the first clock signal and the clock frequency of the second clock signal corresponding to the oscillation module exceeds a preset range, the control module calibrates the second clock signal based on the first clock signal, and updates the real-time clock module based on the calibrated second clock signal.

[0008] In a second aspect, an embodiment of the present application provides a clock calibration method, which is applied to the clock calibration circuit as described in the first aspect, wherein the clock calibration circuit includes a real-time clock module, an oscillation module, a clock extraction module and a communication module, and the method includes:

[0009] Acquire a first clock signal of the communication module through the clock extraction module;

[0010] When an error between a clock frequency of the first clock signal and a clock frequency of a second clock signal corresponding to the oscillation module exceeds a preset range, calibrating the second clock signal based on the first clock signal;

[0011] The real-time clock module is updated based on the calibrated second clock signal.

[0012] In a third aspect, an embodiment of the present application provides a clock calibration device, the device comprising the clock calibration circuit as described in the first aspect, the clock calibration circuit comprising a real-time clock module, an oscillation module, a clock extraction module and a communication module, the device further comprising:

[0013] A first acquisition module, used for acquiring a first clock signal of the communication module through the clock extraction module;

[0014] a calibration module, configured to calibrate the second clock signal based on the first clock signal when an error between a clock frequency of the first clock signal and a clock frequency of a second clock signal corresponding to the oscillation module exceeds a preset range;

[0015] An updating module is used to update the real-time clock module based on the calibrated second clock signal.

[0016] In a fourth aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the method described in the second aspect.

[0017] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the method described in the second aspect are implemented.

[0018] In a sixth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the second aspect.

[0019] In an embodiment of the present application, a first clock signal of a communication module is acquired through a clock extraction module, and the acquired first clock signal is used as a clock reference signal, so that when an error between a clock frequency of the acquired first clock signal and a clock frequency of a second clock signal corresponding to an oscillation module exceeds a preset range, the first clock signal is used as a reference clock signal to calibrate the second clock signal corresponding to the oscillation module, so as to avoid adding an additional calibration clock source in the clock calibration circuit, that is, there is no need to use a clock chip, thereby achieving the purpose of reducing the design cost of the clock calibration circuit.

[0020] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:

[0022] Figure 1 is a structural block diagram of a clock calibration circuit provided in an embodiment of the present application;

[0023] Figure 2 is a schematic diagram of the principle of clock calibration provided in an embodiment of the present application;

[0024] Figure 3 is a flow chart of a clock calibration method provided in an embodiment of the present application;

[0025] Figure 4 is a structural diagram of a clock calibration device provided in an embodiment of the present application;

[0026] Figure 5 It is one of the structural diagrams of the electronic device provided in the embodiment of the present application;

[0027] Figure 6 This is the second structural diagram of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION

[0028] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0029] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0030] The clock calibration solution provided in the embodiment of the present application is described in detail below through specific embodiments and application scenarios in conjunction with the accompanying drawings.

[0031] like Figure 1 As shown, the embodiment of the present application provides a clock calibration circuit, which can be applied to electronic devices such as mobile phones, tablet computers (Tablet Personal Computer), laptop computers (Laptop Computer), personal digital assistants (Personal Digital Assistant, PDA for short), mobile Internet devices (Mobile Internet Device, MID) or wearable devices (Wearable Device), and the clock calibration circuit includes a real-time clock module 10, an oscillation module 20, a clock extraction module 30, a communication module 40 and a control module 50, a first end of the clock extraction module 30 is electrically connected to the communication module 40, the control module 50 is electrically connected to the second end of the clock extraction module 30, the oscillation module 20 and the real-time clock module 10 respectively, and the oscillation module 20 is also electrically connected to the real-time clock module 10;

[0032] Among them, the clock extraction module 30 is used to obtain the first clock signal of the communication module 40, and when the error between the clock frequency of the first clock signal and the clock frequency of the second clock signal corresponding to the oscillation module 20 exceeds a preset range, the control module 50 calibrates the second clock signal based on the first clock signal, and updates the real-time clock module 10 based on the calibrated second clock signal.

[0033] It is understandable that the clock calibration circuit may also include other functional modules, such as a driving circuit, a counter, and the like.

[0034] In the present embodiment, since the clock information contained in the communication module 40 needs to be used for modulation and mediation of the transmitted information at the transmitting end and the receiving end, that is, the clock information contained in the communication module 40 needs to have a high degree of accuracy; therefore, the first clock signal of the communication module 40 can be obtained through the clock extraction module 30, and the obtained first clock signal is used as a clock reference signal, so that when the error between the clock frequency of the obtained first clock signal and the clock frequency of the second clock signal corresponding to the oscillation module 20 exceeds a preset range, the first clock signal is used as a reference clock signal to calibrate the second clock signal corresponding to the oscillation module 20, so as to avoid adding an additional calibration clock source in the clock calibration circuit, thereby achieving the purpose of reducing the design cost of the clock calibration circuit, that is, achieving the purpose of reducing the design cost of the clock chip.

[0035] In this way, based on the clock calibration circuit provided by the present application, the real-time clock module 10 can also be designed independently of the system clock source, thereby achieving the purpose of simplifying the clock calibration circuit; moreover, the clock extraction module 30 obtains the first clock signal of the communication module 40, and uses the obtained first clock signal as the clock reference signal, which can also reduce the calibration link of the clock accuracy required when the clock calibration circuit leaves the factory, thereby achieving the purpose of further reducing the design cost of the clock calibration circuit.

[0036] The clock chip may be understood as a chip including a clock calibration circuit, and the calibration clock source may be understood as a clock source that generates a reference clock signal.

[0037] It can be understood that the calibration principle of the clock calibration circuit provided in the embodiment of the present application is to utilize the clock information contained in the communication module 40, that is, to utilize the clock information with higher precision as the reference clock signal for calibrating the oscillation module 20, so as to avoid separately designing a calibration clock source in the clock calibration circuit, that is, there is no need to separately set up a clock chip, thereby achieving the purpose of simplifying the design cost of the clock calibration circuit.

[0038] Among them, the clock information contained in the communication module 40 can come from the system clock source of the electronic device, that is, the clock information contained in the communication module 40 has high accuracy, so that the first clock signal obtained from the communication module 40 can meet the calibration requirements of the second clock signal corresponding to the oscillation module 20.

[0039] like Figure 2 As shown, the first clock signal of the communication module 40 and the second clock signal corresponding to the oscillation module 20 can be obtained, and the clock frequency of the first clock signal of the communication module 40 can be compared with the clock frequency of the second clock signal corresponding to the oscillation module 20 to determine whether the error between the clock frequency of the first clock signal and the clock frequency of the second clock signal meets the preset range. When the clock frequency error between the first clock signal and the second clock signal exceeds the preset range, the first clock signal is used as a reference clock signal to calibrate the second clock signal, and the real-time clock module 10 is updated based on the calibrated second clock signal to improve the time accuracy corresponding to the real-time clock module 10.

[0040] For example, the clock frequency of the second clock signal corresponding to the oscillation module 20 is set to about 1Hz, and there is a fluctuation tolerance of 0.6Hz to 2Hz due to the manufacturing process, and a known clock signal (such as the first clock signal) of 10Hz (corresponding to a signal period of 100 milliseconds) is used as a reference clock signal; assuming that the calibrated clock frequency is 2Hz (corresponding to a period of 600 milliseconds), the rising and falling edges of the 10Hz reference signal are used as counters, that is, one cycle (100 milliseconds) is counted twice, and the 2Hz signal (period is 600 milliseconds) is counted 10 times, which is smaller than the count of 20 times corresponding to the target 1Hz, that is, the current clock frequency is too fast, and the capacitors, resistors and other devices of the oscillation module 20 need to be adjusted to adjust the clock frequency of the second clock signal, and then compare and judge until the difference between the period count value of the calibrated clock frequency and the target is less than the set value, thereby realizing the calibration of the clock frequency of the second clock signal. Among them, the set value can be 2, and the set value can be adjusted based on the requirements of calibration speed and accuracy.

[0041] Furthermore, the clock signal in the present application may be a clock signal with a fixed period and a fixed duty cycle, and the calibrated clock may be counted using a high-frequency reference clock so as to be compared with a set target value. To improve the calibration accuracy, the two edges of the reference clock may be used for counting so as to improve the calibration accuracy to 1 / 2 of the reference clock period.

[0042] Optionally, the communication module 40 includes any one of a system power management interface, a serial peripheral interface, a first integrated circuit, and a second integrated circuit.

[0043] It is understandable that since communication modules such as the system power management interface, serial peripheral interface, first integrated circuit, and second integrated circuit may need to exchange information with other modules, and since the information needs to be modulated and mediated at the sending and receiving ends during the interaction process, the communication module used for information interaction needs to contain high-precision clock information.

[0044] Moreover, in order to ensure the quality of information interaction, that is, to ensure the accuracy requirements of the clock information included in the system power management interface, serial peripheral interface, first integrated circuit, second integrated circuit and other communication modules, the clock signal provided by the system clock source is generally used as the clock signal of the system power management interface, serial peripheral interface, first integrated circuit, second integrated circuit and other communication modules. That is, the system power management interface, serial peripheral interface, first integrated circuit, second integrated circuit and other communication modules can share the clock signal provided by the system clock source, thereby meeting the information interaction requirements of the communication modules.

[0045] Among them, the first integrated circuit can be understood as IIC (Inter Integrated Circuit, integrated interconnect circuit), and the second integrated circuit can be understood as IIIC (Improved Inter Integrated Circuit, improved integrated interconnect circuit).

[0046] Moreover, the communication module 40 may also be other communication interfaces or communication circuits on the electronic device, as long as the accuracy of the clock information contained in the communication module 40 can meet the calibration requirement of the second clock signal corresponding to the oscillation module 20 .

[0047] It should be noted that the clock frequency of the second clock signal generated by the oscillation module 20 may be unknown (within the tolerance range) due to the chip manufacturing process tolerance; therefore, the manufacturing tolerance is taken into consideration when designing the oscillation module 20, that is, the resistance and capacitance of the oscillation module 20 can be adjusted to achieve calibration of the clock frequency corresponding to the oscillation module 20.

[0048] In one example, the clock frequency of the first clock signal and the clock frequency of the calibrated second clock signal may be in a multiple relationship of an integer.

[0049] Specifically, in the process of adjusting the clock accuracy of an electronic device including the clock calibration circuit of the present application, during the first startup of the electronic device, the clock extraction module 30 will obtain the first clock signal of the communication module 40, and use the obtained first clock signal as the clock reference signal; and when the error between the obtained first clock signal and the second clock signal corresponding to the oscillation module 20 exceeds a preset range, the first clock signal is used as a reference clock signal to calibrate the second clock signal corresponding to the oscillation module 20, and the calibrated second clock signal is locked, so that the locked and calibrated second clock signal can be used as the update parameter of the real-time clock module, thereby achieving the adjustment of the clock accuracy.

[0050] like Figure 3 As shown, the embodiment of the present application further provides a clock calibration method, which can be applied to the clock calibration circuit in the aforementioned embodiment or an electronic device including the clock calibration circuit in the aforementioned embodiment, wherein the clock calibration circuit includes a real-time clock module, an oscillation module, a clock extraction module and a communication module, and the clock calibration method includes the following steps:

[0051] Step 301: Acquire a first clock signal of the communication module through the clock extraction module.

[0052] In this step, the clock information contained in the communication module has high accuracy, that is, the clock information contained in the communication module can be used as a reference clock signal to calibrate the clock frequency corresponding to the oscillation module; therefore, the first clock signal of the communication module can be obtained through the clock extraction module, so that the obtained first clock signal can be used as a reference clock signal to avoid adding an additional calibration clock source in the clock calibration circuit, thereby achieving the purpose of reducing the design cost of the clock calibration circuit.

[0053] Step 302: When an error between a clock frequency of the first clock signal and a clock frequency of a second clock signal corresponding to the oscillation module exceeds a preset range, calibrate the second clock signal based on the first clock signal.

[0054] In this step, the error between the clock frequency of the first clock signal and the clock frequency of the second clock signal corresponding to the oscillation module exceeds the preset range, which can be understood as a problem of poor accuracy of the time generated based on the second clock signal, that is, the time generated by the real-time clock module has a problem of poor accuracy.

[0055] Therefore, when the error between the clock frequency of the first clock signal and the clock frequency of the second clock signal exceeds a preset range, the first clock signal corresponding to the communication module can be used as a clock reference signal to calibrate the second clock signal, and the calibrated second clock signal can be locked so that the locked calibrated second clock signal can be used as an update parameter of the real-time clock module, thereby achieving the purpose of reducing the design cost of the clock calibration circuit.

[0056] When the error between the clock frequency of the first clock signal and the clock frequency of the second clock signal corresponding to the oscillation module satisfies a preset range, the second clock signal corresponding to the oscillation module can be locked and used as an update parameter of the implementation clock module.

[0057] Step 303: Update the real-time clock module based on the calibrated second clock signal.

[0058] In this way, by using the first clock signal corresponding to the communication module as a clock reference signal to calibrate the second clock signal, it is possible to avoid adding an additional calibration clock source to the clock calibration circuit and achieve the purpose of reducing the design cost of the clock calibration circuit.

[0059] Optionally, after acquiring the first clock signal of the communication module through the clock extraction module, when an error between a clock frequency of the first clock signal and a clock frequency of a second clock signal corresponding to the oscillation module exceeds a preset range, before calibrating the second clock signal based on the first clock signal, the method further includes:

[0060] Obtaining a clock period of the second clock signal;

[0061] A clock frequency of the second clock signal is determined based on a clock period of the second clock signal, and the clock frequency of the second clock signal is compared with the clock frequency of the first clock signal.

[0062] In this embodiment, the clock period of the second clock signal can be measured to determine the clock frequency of the second clock signal, and then determine whether the error between the clock frequency of the first clock signal and the clock frequency of the second clock signal corresponding to the oscillation module meets the preset range, so as to achieve a comparison between the clock frequency of the second clock signal and the clock frequency of the first clock signal.

[0063] The specific comparison process can be found in the aforementioned implementation manner and will not be described in detail here.

[0064] Optionally, calibrating the second clock signal based on the first clock signal includes:

[0065] A target component in the oscillation module is adjusted based on the first clock signal to calibrate the clock frequency, wherein the target component includes at least one of a capacitor, a resistor, and an inductor.

[0066] In this embodiment, the target components in the oscillation module can be adjusted to adjust the second clock signal corresponding to the oscillation module, so that the error between the adjusted second clock signal and the first clock signal meets the preset range to adjust the clock accuracy.

[0067] It can be understood that the adjustment of the oscillation module can be understood as the adjustment of the target components in the oscillation module, thereby achieving the adjustment of the clock frequency of the second clock signal.

[0068] In one example, the oscillation module includes capacitors and resistors, which can be understood as the oscillation module includes a capacitor array and a resistor array; the adjustment of the target components in the oscillation module can be understood as adjusting the capacitor array and the resistor array in the oscillation module, thereby achieving the adjustment of the clock frequency of the second clock signal corresponding to the oscillation module.

[0069] In another example, the oscillation module including an inductor can be understood as the oscillation module including an inductor array; adjusting the target components in the oscillation module can be understood as adjusting the inductor array in the oscillation module, thereby adjusting the clock frequency of the second clock signal corresponding to the oscillation module.

[0070] In addition, the devices such as capacitors, resistors and inductors in the oscillation module can also be set as variable capacitors, variable resistors and variable inductors, so that the oscillation module can be adjusted by adjusting the capacitance value of the variable capacitor, the resistance value of the variable resistor and the inductance value of the variable inductor, thereby achieving the purpose of simplifying the circuit structure of the oscillation module.

[0071] The clock calibration method provided in the embodiment of the present application obtains the first clock signal of the communication module through the clock extraction module; when the error between the clock frequency of the first clock signal and the clock frequency of the second clock signal corresponding to the oscillation module exceeds a preset range, the second clock signal is calibrated based on the first clock signal; and the real-time clock module is updated based on the calibrated second clock signal. In this way, by using the first clock signal corresponding to the communication module as a clock reference signal to calibrate the second clock signal, it is possible to avoid adding an additional calibration clock source in the clock calibration circuit, and achieve the purpose of reducing the design cost of the clock calibration circuit, as well as the purpose of reducing the design cost of the clock chip.

[0072] It should be noted that the clock calibration method provided in the embodiment of the present application can be executed by a clock calibration device or a control module in the clock calibration device for executing the clock calibration method. In the embodiment of the present application, the clock calibration device provided in the embodiment of the present application is described by taking the clock calibration method executed by the clock calibration device as an example.

[0073] like Figure 4 As shown, the embodiment of the present application further provides a clock calibration device, the device 400 includes the clock calibration circuit in the above embodiment, the clock calibration circuit includes a real-time clock module, an oscillation module, a clock extraction module and a communication module, and the device 400 also includes:

[0074] A first acquisition module 401, configured to acquire a first clock signal of the communication module through the clock extraction module;

[0075] A calibration module 402, configured to calibrate the second clock signal based on the first clock signal when an error between a clock frequency of the first clock signal and a clock frequency of a second clock signal corresponding to the oscillation module exceeds a preset range;

[0076] The updating module 403 is configured to update the real-time clock module based on the calibrated second clock signal.

[0077] Optionally, the device 400 further includes:

[0078] A second acquisition module, used to acquire a clock period corresponding to the oscillation module;

[0079] A comparison module determines a clock frequency of the second clock signal based on a clock period of the second clock signal, and compares the clock frequency of the second clock signal with the clock frequency of the first clock signal.

[0080] Optionally, the calibration module 402 specifically adjusts target components in the oscillation module based on the first clock signal to calibrate the clock frequency, and the target components include at least one of a capacitor, a resistor and an inductor.

[0081] The clock calibration device in the embodiment of the present application can be a device, or a component, integrated circuit, or chip in an electronic device. The device can be a mobile electronic device, or a non-mobile electronic device.

[0082] The clock calibration device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.

[0083] The clock calibration device provided in the embodiment of the present application can achieve Figure 3 To avoid repetition, the various processes implemented by the method embodiment are not described here.

[0084] Alternatively, if Figure 5 As shown, an embodiment of the present application also provides an electronic device 500, including a processor 502, a memory 501, and a program or instruction stored in the memory 501 and executable on the processor 502. When the program or instruction is executed by the processor 502, each process of the above-mentioned clock calibration method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.

[0085] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.

[0086] Figure 6 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of the present application.

[0087] The electronic device 600 includes but is not limited to: a radio frequency unit 601, a network module 602, an audio output unit 603, an input unit 604, a sensor 605, a display unit 606, a user input unit 607, an interface unit 608, a memory 609, and a processor 610.

[0088] Those skilled in the art will appreciate that the electronic device 600 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 610 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Figure 6 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.

[0089] Among them, the processor 610 is used to obtain the first clock signal of the communication module through the clock extraction module; when the error between the clock frequency of the first clock signal and the clock frequency of the second clock signal corresponding to the oscillation module exceeds a preset range, calibrate the second clock signal based on the first clock signal; and update the real-time clock module based on the calibrated second clock signal.

[0090] Optionally, the processor 610 is used to obtain a clock period of the second clock signal; determine a clock frequency of the second clock signal based on the clock period of the second clock signal, and compare the clock frequency of the second clock signal with the clock frequency of the first clock signal.

[0091] Optionally, the processor 610 is configured to adjust a target component in the oscillation module based on the first clock signal to calibrate the clock frequency, wherein the target component includes at least one of a capacitor, a resistor, and an inductor.

[0092] It should be understood that in the embodiment of the present application, the input unit 604 may include a graphics processor (GPU) 6041 and a microphone 6042, and the graphics processor 6041 processes the image data of the static picture or video obtained by the image capture device (such as a camera) in the video capture mode or the image capture mode. The display unit 606 may include a display panel 6061, and the display panel 6061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 607 includes a touch panel 6071 and other input devices 6072. The touch panel 6071 is also called a touch screen. The touch panel 6071 may include two parts: a touch detection device and a touch controller. Other input devices 6072 may include but are not limited to a physical keyboard, a function key (such as a volume control button, a switch button, etc.), a trackball, a mouse, and a joystick, which will not be repeated here. The memory 609 can be used to store software programs and various data, including but not limited to applications and operating systems. The processor 610 can integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, the user interface, and the application program, and the modem processor mainly processes wireless communication. It is understandable that the above-mentioned modem processor may not be integrated into the processor 610.

[0093] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned clock calibration method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0094] The processor is a processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0095] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned clock calibration method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0096] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0097] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0098] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling an electronic device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.

Claims

1. A clock calibration circuit, It is characterized in that It includes a real-time clock module, an oscillation module, a clock extraction module, a communication module and a control module, wherein the first end of the clock extraction module is electrically connected to the communication module, the control module is electrically connected to the second end of the clock extraction module, the oscillation module and the real-time clock module respectively, and the oscillation module is also electrically connected to the real-time clock module; Among them, the clock extraction module is used to obtain the first clock signal of the communication module, and when the error between the clock frequency of the first clock signal and the clock frequency of the second clock signal corresponding to the oscillation module exceeds a preset range, the control module calibrates the second clock signal based on the first clock signal, and updates the real-time clock module based on the calibrated second clock signal. The communication module is a communication module carrying clock information, and the clock information includes the first clock signal.

2. The clock calibration circuit according to claim 1, It is characterized in that The communication module includes any one of a system power management interface, a serial peripheral interface, a first integrated circuit, and a second integrated circuit; The clock extraction module can obtain the first clock signal through any one of the power management interface, the serial peripheral interface, the first integrated circuit, and the second integrated circuit.

3. A clock calibration method, It is characterized in that Applied to the clock calibration circuit as claimed in claim 1 or 2, the clock calibration circuit comprises a real-time clock module, an oscillation module, a clock extraction module and a communication module, the method comprises: Acquire a first clock signal of the communication module through the clock extraction module; When an error between a clock frequency of the first clock signal and a clock frequency of a second clock signal corresponding to the oscillation module exceeds a preset range, calibrating the second clock signal based on the first clock signal; updating the real-time clock module based on the calibrated second clock signal; The communication module is a communication module carrying clock information, and the clock information includes the first clock signal.

4. The method according to claim 3, It is characterized in that After acquiring the first clock signal of the communication module by the clock extraction module, before calibrating the second clock signal based on the first clock signal when the error between the clock frequency of the first clock signal and the clock frequency of the second clock signal corresponding to the oscillation module exceeds a preset range, the method further includes: Obtaining a clock period of the second clock signal; A clock frequency of the second clock signal is determined based on a clock period of the second clock signal, and the clock frequency of the second clock signal is compared with the clock frequency of the first clock signal.

5. The method according to claim 3 or 4, It is characterized in that The calibrating the second clock signal based on the first clock signal comprises: A target component in the oscillation module is adjusted based on the first clock signal to calibrate the clock frequency, wherein the target component includes at least one of a capacitor, a resistor, and an inductor.

6. A clock calibration device, It is characterized in that The device comprises the clock calibration circuit according to claim 1 or 2, wherein the clock calibration circuit comprises a real-time clock module, an oscillation module, a clock extraction module and a communication module, and the device further comprises: A first acquisition module, used for acquiring a first clock signal of the communication module through the clock extraction module; a calibration module, configured to calibrate the second clock signal based on the first clock signal when an error between a clock frequency of the first clock signal and a clock frequency of a second clock signal corresponding to the oscillation module exceeds a preset range; An updating module, configured to update the real-time clock module based on the calibrated second clock signal; The communication module is a communication module carrying clock information, and the clock information includes the first clock signal.

7. The device according to claim 6, It is characterized in that The device also includes: A second acquisition module, used to acquire a clock period corresponding to the oscillation module; A comparison module is used to determine the clock frequency of the second clock signal based on the clock period of the second clock signal, and compare the clock frequency of the second clock signal with the clock frequency of the first clock signal.

8. The device according to claim 6 or 7, It is characterized in that The calibration module is specifically used to adjust the target components in the oscillation module based on the first clock signal to calibrate the clock frequency, and the target components include at least one of a capacitor, a resistor and an inductor.

9. An electronic device, It is characterized in that The method comprises a processor, a memory and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the clock calibration method as claimed in any one of claims 3 to 5.

10. A readable storage medium, It is characterized in that The readable storage medium stores a program or an instruction, and when the program or the instruction is executed by the processor, the steps of the clock calibration method according to any one of claims 3 to 5 are implemented.

Citation Information

Patent Citations

  • Clock recovery circuit

    CN102739390A

  • Methods and device for calibrating frequencies

    CN104702278A

  • Clock frequency calibration method and device

    CN106130547A

  • Frequency calibration circuit and frequency calibration method for oscillator

    CN106656173A

  • Method and device for calibrating clock frequency

    CN107579723A