CN115941150A - Clock output method, clock module, electronic device, and storage medium - Google Patents

Clock output method, clock module, electronic device, and storage medium Download PDF

Info

Publication number
CN115941150A
CN115941150A CN202211288927.0A CN202211288927A CN115941150A CN 115941150 A CN115941150 A CN 115941150A CN 202211288927 A CN202211288927 A CN 202211288927A CN 115941150 A CN115941150 A CN 115941150A
Authority
CN
China
Prior art keywords
clock signal
clock
temperature
offset
internal clock
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202211288927.0A
Other languages
Chinese (zh)
Other versions
CN115941150B (en
Inventor
陈功
刘搏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Gencotech Communication Equipment Co ltd
Original Assignee
Shenzhen Gencotech Communication Equipment Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Gencotech Communication Equipment Co ltd filed Critical Shenzhen Gencotech Communication Equipment Co ltd
Priority to CN202211288927.0A priority Critical patent/CN115941150B/en
Publication of CN115941150A publication Critical patent/CN115941150A/en
Application granted granted Critical
Publication of CN115941150B publication Critical patent/CN115941150B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Oscillators With Electromechanical Resonators (AREA)

Abstract

The application belongs to the technical field of communication, and provides a clock output method, a clock module, electronic equipment and a storage medium, wherein the method comprises the following steps: acquiring the current environment temperature; when a normal external clock signal is received, determining the clock offset of an internal clock signal corresponding to the current environment temperature, and determining the internal clock signal according to the clock offset; updating the corresponding relation between the temperature and the clock offset according to the difference between the external clock signal and the internal clock signal; when the external clock signal is abnormal, the internal clock signal is determined according to the real-time acquired environmental temperature and the corresponding relation between the updated temperature and the clock offset, and the internal clock signal is used as the output signal of the clock module. The corresponding relation between the temperature and the clock offset is dynamically updated based on the external clock signal, the precision of the internal clock signal output according to the dynamically updated corresponding relation is higher, and the improvement of the communication reliability by using the clock signal is facilitated.

Description

Clock output method, clock module, electronic device, and storage medium
Technical Field
The present application relates to the field of communications technologies, and in particular, to a clock output method, a clock module, an electronic device, and a storage medium.
Background
When the devices perform synchronous communication, it is necessary to ensure that clock frequencies of the two devices performing synchronous communication are consistent, so that the receiving end can correctly analyze data sent by the sending end according to the synchronized clock frequencies. With the development of communication technology, the requirement for the accuracy of clock frequency is higher in some fields. For example, in the case of an unmanned automobile, real-time communication with other devices in intelligent transportation is possible by receiving 1PPS (pulse per second) supplied from a GPS as a reference clock. However, when the unmanned vehicle enters a tunnel, an indoor space, or the like, the reference clock provided by the GPS cannot be accurately acquired. At this time, the clock frequency of the device is switched to the clock frequency provided by the clock module of the device itself. Therefore, the accuracy of the clock frequency of the clock module itself affects the reliability of real-time communication.
However, when the crystal oscillator in the clock module generates the reference frequency, the crystal oscillator is also affected by environmental factors such as temperature. For example, when a vehicle enters a tunnel or the like, the reference frequency output by the crystal oscillator may change due to the change of the environmental temperature, which may affect the reliability of real-time communication.
Disclosure of Invention
The embodiment of the application provides a clock output method, a clock module, an electronic device and a storage medium, which can solve the problem that the output of an internal clock signal is influenced by temperature and is inaccurate.
In a first aspect, an embodiment of the present application provides a clock output method, where the method includes the following steps:
acquiring the current environment temperature;
when a normal external clock signal is received, determining the clock offset of the internal clock signal corresponding to the current environment temperature according to the corresponding relation between the pre-stored temperature and the clock offset, wherein the precision of the external clock signal is higher than that of the internal clock signal;
updating the corresponding relation between the temperature and the clock offset according to the difference between the external clock signal and the internal clock signal;
when the external clock signal is abnormal, the internal clock signal is determined according to the real-time acquired environment temperature and the corresponding relation between the updated temperature and the clock offset, and the internal clock signal is used as the output signal of the clock module.
In a possible implementation manner of the first aspect, updating a correspondence between a temperature and a clock offset according to a difference between an external clock signal and an internal clock signal includes:
and when the difference between the external clock signal and the internal clock signal is larger than a preset value, updating the corresponding relation between the temperature and the clock offset according to the external clock signal.
In a possible implementation manner of the first aspect, updating a correspondence between a temperature and a clock offset according to a difference between an external clock signal and an internal clock signal includes:
and updating the corresponding relation between the temperature and the clock offset by combining the difference between the external clock signal and the internal clock signal in an iterative updating mode according to a preset updating period.
In a possible implementation manner of the first aspect, updating a corresponding relationship between a temperature and a clock offset according to a difference between an external clock signal and an internal clock signal includes:
determining a control signal of a current internal clock source when a difference between the external clock signal and the internal clock signal is less than a predetermined difference threshold;
and updating the corresponding relation between the current environment temperature and the clock offset according to the corresponding relation between the control signal of the internal clock source and the clock offset.
In a possible implementation manner of the first aspect, after updating the correspondence between the temperature and the clock offset according to a difference between the external clock signal and the internal clock signal, the method further includes:
searching a preset number of temperatures in the updated corresponding relation by taking the current environment temperature as a center, and determining the corresponding relation between the searched temperatures and the clock offset;
and determining fitting points according to the corresponding relation between the searched preset number of temperatures and the clock offset, and generating a fitting curve according to the fitting points.
In a possible implementation manner of the first aspect, the external clock signal is a pulse per second signal in a satellite signal, and the internal clock signal is a clock signal of a crystal oscillator.
In a possible implementation manner of the first aspect, the crystal oscillator is a voltage-controlled crystal oscillator;
determining an internal clock signal according to the environment temperature acquired in real time and by combining the updated corresponding relation between the temperature and the clock offset, wherein the determining comprises the following steps:
determining the magnitude of the clock offset by combining the updated corresponding relation between the temperature and the clock offset according to the environment temperature acquired in real time;
when the clock offset is negative, reducing the voltage-controlled voltage of the crystal oscillator according to the magnitude of the clock offset;
and when the clock offset is positive, increasing the voltage-controlled voltage of the crystal oscillator according to the magnitude of the clock offset.
In a second aspect, an embodiment of the present application provides a clock module, where the module includes:
an internal clock source for generating an internal clock signal;
the controller is used for determining the clock offset of the internal clock signal corresponding to the current environment temperature according to the corresponding relation between the pre-stored temperature and the clock offset, and determining the internal clock signal according to the clock offset, wherein the precision of the external clock signal is higher than that of the internal clock signal; updating the corresponding relation between the temperature and the clock offset according to the difference between the external clock signal and the internal clock signal; updating the internal clock signal according to the environment temperature acquired in real time and by combining the updated corresponding relation between the temperature and the clock offset;
the temperature sensor is used for acquiring the current environment temperature;
the first clock output interface outputs the internal clock signal when the external clock signal is abnormal;
the second clock output interface outputs the received external clock signal when receiving the normal external clock signal;
and the clock signal receiving interface is used for receiving an external clock signal.
In a third aspect, an embodiment of the present application provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the method according to any one of the first aspect when executing the computer program.
In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, including: the computer-readable storage medium stores a computer program which, when executed by a processor, performs the steps of the method according to any one of the first aspect.
Compared with the prior art, the embodiment of the application has the advantages that:
according to the method and the device, the corresponding relation between the temperature and the clock offset is continuously updated according to the difference between the external clock signal and the internal clock signal and the temperature obtained in real time, so that the precision of the corresponding relation between the temperature and the clock offset is improved, the precision of the corresponding relation is close to that of the external clock signal, when the internal clock signal is determined by applying the corresponding relation between the temperature and the clock offset, a more accurate internal clock signal can be obtained, and the real-time communication of the clock module can be more reliable.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
Fig. 1 is a schematic structural diagram of a clock module according to an embodiment of the present application;
FIG. 2 is a flow chart of a clock output method according to an embodiment of the present application;
FIG. 3 is a flow chart of one manner of iterative adjustment provided by an embodiment of the present application;
FIG. 4 is a graph of a temperature versus clock offset fit according to an embodiment of the present disclosure;
fig. 5 is a schematic view of an application scenario of a clock module according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to" determining "or" in response to detecting ". Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".
Furthermore, in the description of the present application and the appended claims, the terms "first," "second," "third," and the like are used for distinguishing between descriptions and not necessarily for describing or implying relative importance.
The application provides a clock output method, a clock module, electronic equipment and a computer storage medium, which can solve the problem that an internal clock signal is not accurately influenced by temperature, and are applied to scenes that external clock signals such as satellites cannot be obtained and only the internal clock signal of the equipment can be used for real-time communication.
Fig. 1 is a schematic structural diagram of a clock module according to an embodiment of the present application. As shown in fig. 1, the clock module includes an internal clock source 101, a controller 102, a temperature sensor 103, a first clock output interface 104, a second clock output interface 105, and a clock receiving interface 106. The clock receiving interface 106 can receive a high-precision clock signal, such as a unit second pulse signal of a satellite. The clock receiving interface 106 and the second clock output interface 105 may be connected to the controller 102, and when the clock receiving interface 106 receives a normal external clock signal, the received external clock signal may be output by the second clock output interface 105. The corresponding relationship between the temperature and the clock offset may be stored in the controller 102 in advance, and the corresponding clock offset may be found based on the ambient temperature collected by the temperature sensor 103. After the internal clock signal is preliminarily adjusted based on the found clock offset, the internal clock signal output by the internal clock source 101 can be obtained, the internal clock signal is compared with the external clock signal received by the clock receiving interface 106, the controller 102 generates a control signal according to the difference between the internal clock signal and the external clock signal, and adjusts the clock signal of the internal clock source 101, so that the clock signal output by the internal clock source 101 is consistent with the clock signal of the external clock source, and the updated corresponding relationship between the temperature and the clock offset is obtained.
In a possible implementation manner, a driving circuit may be further included between the internal clock source 101 and the controller 102, for performing frequency division or frequency multiplication processing on the clock signal output by the internal clock source 101. Before the first clock output interface 104 outputs the clock signal, a waveform conversion circuit may be further included for converting the output clock signal into a desired waveform, such as a square wave or a sine wave. When the controller 102 outputs the control signal to adjust the clock offset of the internal clock source 101, the digital signal output by the digital-to-analog conversion module may be converted into an analog signal, so as to adjust the clock offset of the internal clock source 101.
The controller 102 may include a processor such as a single chip, an FPGA, and the like, and the internal clock source 101 may include a voltage controlled crystal oscillator, and the like.
Fig. 2 shows a flowchart of a clock output method provided in an embodiment of the present application, where an execution subject of the clock output method may be a clock module, and the clock output method includes the following steps:
in S201, the current ambient temperature is acquired.
The temperature of the environment where the clock module is currently located may be determined based on the temperature sensor 103 included in the clock module collecting the temperature signal. In a possible implementation manner, the temperature sensor 103 may be disposed within a predetermined range of the internal clock source 101, so that the collected ambient temperature can more accurately reflect the ambient temperature of the internal clock source 101 (the clock source generating the internal clock signal).
In S202, when a normal external clock signal is received, the clock offset of the internal clock signal corresponding to the current ambient temperature is determined according to the pre-stored correspondence between the temperature and the clock offset.
Before the clock module leaves the factory, the corresponding relation between the universal temperature and the clock offset can be preset. Based on the corresponding relationship between the general temperature and the clock offset, the accuracy requirement of the clock signal output by the clock module when the temperature of the internal clock source 101 drifts in a specific period of time of most clock modules can be met. However, due to individual differences of the internal clock source 101 in the clock module and aging occurring along with the use of the clock module, the preset temperature and clock offset may not be suitable for the requirement that the internal clock source 101 of the clock module outputs an accurate clock signal. Therefore, the embodiment of the present application may perform update optimization based on subsequent S203 and S204.
One possible implementation of the external clock signal is a unit pulse per second (1 PPS, which is called a one pulse per second) transmitted by a satellite.
Whether a normal unit second pulse signal is received or not can be detected in a polling mode. When the external clock signal is a unit second pulse signal transmitted from a satellite, the clock module cannot normally receive a normal unit second pulse signal if the clock module is indoors or passes through a tunnel or the like. When the clock module is in an outdoor scene, a normal pulse signal per second can be received.
The clock offset may refer to an offset between a clock signal output by the internal clock source 101 in a standard control state and a clock signal expected to be output by the internal clock source 101. For example, the frequency of the clock signal expected to be output by the internal clock source 101 is 12MHz, and the frequency of the actually output clock signal may be 12.5MHz due to the influence of the ambient temperature. The deviation between the two is 12.5MHz-12MHz (= 0.5 MHz). When the internal clock source 101 is in the standard control state, the voltage-controlled crystal oscillator may refer to a standard control voltage set in the specification parameters.
According to the pre-stored corresponding relation between the temperature and the clock offset, the clock offset corresponding to the current environment temperature can be determined, and the corresponding control signal is generated based on the determined clock offset. The analog-to-digital conversion circuit may be configured to adjust the internal clock signal output by the internal clock source 101 based on the voltage signal converted by the control signal.
For example, according to the preset corresponding relationship between the temperature and the clock offset, the clock offset corresponding to the current ambient temperature is found to be 1.8MHz. The adjustment signal or control signal of the internal clock source 101 may be generated based on the clock offset. After the control pin of the internal clock source 101 receives the control signal, the output frequency of the internal clock source 101 is adjusted, and the output frequency of the internal clock source 101 is initially increased.
The external clock signal in the embodiments of the present application may include a high-precision clock signal provided by an external device such as a satellite. The internal clock signal may comprise a clock signal provided by a crystal oscillator with adjustable output frequency, i.e. the internal clock source 101 may be an adjustable crystal oscillator, including a voltage controlled crystal oscillator, for example.
In S203, updating a corresponding relationship between a temperature and a clock offset according to a difference between an external clock signal and an internal clock signal;
in the foregoing step, a possible implementation manner is that, when the external clock signal of the external clock source can be normally acquired, or the acquired external clock signal is a normal signal (or an accurate clock signal), a predetermined value may be set, and when a difference between the external clock signal and the internal clock signal determined based on the predetermined correspondence is greater than the predetermined value, the correspondence between the temperature and the clock offset is updated based on the difference.
For example, the internal clock source 101 is a voltage-regulated crystal oscillator, and the larger the voltage is, the larger the frequency of the output clock signal is. The control voltage of the internal clock source 101 may be adjusted according to the difference between the internal clock signal and the external clock signal to change the internal clock signal, thereby reducing the difference between the internal clock signal and the external clock signal. For example, when the frequency of the clock signal of the internal clock source 101 is smaller, the voltage-controlled voltage of the internal clock source 101 is increased, and when the frequency of the clock signal of the internal clock source 101 is larger, the voltage-controlled voltage of the internal clock source 101 is decreased.
The difference between the internal clock signal and the external clock signal can be gradually reduced by means of multiple iterative adjustments until the difference is smaller than a predetermined value or a predetermined requirement is met.
When the difference between the two is smaller than the predetermined value or meets the predetermined requirement, the clock offset corresponding to the current environment temperature update may be determined based on the current control signal (which may be a control voltage, for example). For example, when the control voltage is 0.2V, the corresponding clock offset is 0.3MHz.
Fig. 3 shows a flow chart of one way of iterative adjustment described above, which comprises the following steps:
in S301, an iterative learning period is preset;
segmenting within a certain time, and performing iterative updating once within each time period;
and optimizing the corresponding relation between the temperature acquired in the previous time period and the clock offset in the next time period.
In S302, determining a difference between an external clock signal and an internal clock signal;
the method comprises the steps of firstly obtaining and substituting the temperature obtained in real time into the corresponding relation between the temperature and the clock offset which are stored in advance to obtain the clock offset, determining an internal clock signal according to the clock offset, and then comparing the frequency corresponding relation between an external clock signal and the internal clock signal to determine the difference.
In S303, updating the corresponding relation between the temperature and the clock offset;
and updating the clock offset at the temperature in the time period according to the difference between the external clock signal and the internal clock signal determined in the step S302.
In S304, the clock offset at the temperature is obtained according to the updated corresponding relationship between the temperature and the clock offset, and the internal clock signal is determined and updated according to the clock offset.
In S305, it is determined whether the iteration cycle is finished, and when the iteration cycle is finished, S306 is executed to determine the corresponding relationship between the temperature and the clock offset, otherwise, S302 is executed again.
It can be understood that, when the clock offset corresponding to the temperature is updated, the clock module should be at the same ambient temperature, or the change of the ambient temperature where the clock module is located meets the preset temperature range. In order to quickly update the correspondence relationship between the temperature and the clock offset, an iterative learning cycle may be set in advance. For example, the iterative learning cycle can be set to 18 seconds, 10 times of iterative learning can be completed within 3 minutes, and the corresponding relationship between the temperature and the clock offset can be updated quickly and accurately.
When the ambient temperature changes, the difference between the internal clock signal and the external clock signal determined according to the currently stored correspondence of the clock module at the changed ambient temperature may be determined, and whether the correspondence between the temperature and the clock needs to be updated is determined based on the difference.
Or, when the update interval between the temperature and the clock offset exceeds a predetermined time, the update process of the corresponding relationship between the temperature and the clock offset may be triggered.
In order to increase the adaptive range for updating the updated corresponding relationship, curve fitting may be performed on a plurality of points in the updated corresponding relationship, and the corresponding system of the temperature and the clock offset may be updated based on the fitted curve, so that the requirement for adjusting the clock signal of the internal clock source 101 in more temperature scenes may be met through updating the corresponding relationship.
In order to improve the adjustment accuracy of the internal clock source 101, when performing curve fitting, a predetermined number of temperatures close to the current ambient temperature (the predetermined number of temperatures includes the current ambient temperature) may be searched in the correspondence relationship updated before based on the current ambient temperature as a center. And further determining the corresponding relation between the searched temperature and the clock offset according to the searched temperature. The fitting points are determined based on the corresponding relation between the searched temperature and the clock offset, curve fitting is carried out based on the determined fitting points, the fitted curve can reflect the clock offset corresponding to the current temperature more accurately, and according to the fitted curve, the clock control requirement of more environmental temperatures can be effectively met, and the precision of the clock signal output by the internal clock source 101 is improved. It can be understood that the fitted curve obtained after curve fitting is performed with the current ambient temperature as the center can reduce the influence of errors in generating the corresponding relationship, and improve the accuracy of clock control at the current temperature and the temperature near the current temperature. The curve fitting result may be as shown in fig. 4, and the resulting fitted curve may include one or more fitted curve segments.
In S204, when the external clock signal is abnormal, the internal clock signal is updated according to the real-time acquired environmental temperature and the corresponding relationship between the updated temperature and the clock offset, and the internal clock signal is used as the output signal of the clock module.
When the external clock signal is acquired abnormally or the acquired external clock signal is abnormal, because the corresponding relationship between the temperature and the clock offset is updated in the clock module, the clock offset corresponding to the current ambient temperature is searched based on the corresponding relationship, and the control signal of the internal clock source 101 is output, so that the internal clock source 101 overcomes the influence caused by the ambient temperature, and outputs a more accurate clock signal.
It can be understood that, in the embodiment of the present application, when the external clock signal can be normally received, the external clock signal may be directly used as the output signal, so that the clock module may output an accurate clock signal.
In a possible implementation manner, in order to improve the accuracy of the internal clock signal output by the internal clock source 101, after the frequency of the internal clock signal of the internal clock source 101 is adjusted, the phase of the internal clock source 101 may be further adjusted, so that the phase of the internal clock signal output by the internal clock source 101 matches the phase of the external clock source, thereby further improving the output accuracy of the clock signal of the clock module.
Fig. 5 shows an application scenario diagram of a clock module in this embodiment, an unmanned vehicle acquires a pulse-per-second signal sent by a satellite signal as an external clock signal received by a vehicle communication device, the external clock signal is used as a reference signal for communicating with other traffic devices, when the unmanned vehicle enters a tunnel or an indoor location and cannot acquire the satellite signal, the vehicle communication device acquires an internal clock signal as the reference signal by using a built-in clock module, the internal clock signal is a clock signal output by a crystal oscillator in an internal clock source 101 in the clock module, the internal clock signal is continuously adjusted by a controller 102, the difference between the internal clock signal and the external clock signal is reduced, the continuously optimized internal clock signal is used as the reference signal, and a more reliable real-time communication support can be provided for the vehicle.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. For the specific working processes of the units and modules in the system, reference may be made to the corresponding processes in the foregoing method embodiments, which are not described herein again.
Fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application. As shown in fig. 6, the electronic apparatus 6 of this embodiment includes: at least one processor 60 (only one shown in fig. 6), a memory 61, and a computer program 62 stored in the memory 61 and executable on the at least one processor 60, the processor 60 implementing the steps in any of the various clock output method embodiments described above when executing the computer program 62.
The electronic device 6 may be a desktop computer, a notebook, a palm computer, a cloud server, or other computing devices. The electronic device 6 may include, but is not limited to, a processor 60, a memory 61. Those skilled in the art will appreciate that fig. 6 is merely an example of the electronic device 6, and does not constitute a limitation of the electronic device 6, and may include more or less components than those shown, or combine some of the components, or different components, such as an input-output device, a network access device, etc.
The Processor 60 may be a Central Processing Unit (CPU), and the Processor 60 may be other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 61 may in some embodiments be an internal storage unit of the electronic device 6, such as a hard disk or a memory of the electronic device 6. The memory 61 may also be an external storage device of the electronic device 6 in other embodiments, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the electronic device 6. Further, the memory 61 may also include both an internal storage unit of the electronic device 6 and an external storage device. The memory 61 is used for storing an operating system, an application program, a BootLoader (BootLoader), data, and other programs, such as program codes of the computer program. The memory 61 may also be used to temporarily store data that has been output or is to be output.
An embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the computer program implements the steps in the foregoing method embodiments.
The embodiments of the present application provide a computer program product, which when running on a mobile terminal, enables the mobile terminal to implement the steps in the above method embodiments when executed.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, all or part of the processes in the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium and can implement the steps of the embodiments of the methods described above when the computer program is executed by a processor. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include at least: any entity or device capable of carrying computer program code to a photographing apparatus/terminal device, recording medium, computer Memory, read-Only Memory (ROM), random Access Memory (RAM), electrical carrier wave signals, telecommunication signals, and software distribution medium. Such as a usb-drive, a removable hard drive, a magnetic or optical disk, etc. In certain jurisdictions, computer-readable media may not be an electrical carrier signal or a telecommunications signal in accordance with legislative and patent practice.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the technical solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in an electrical, mechanical or other form.
The above-mentioned embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (10)

1. A clock output method, the method comprising:
acquiring the current environment temperature;
when a normal external clock signal is received, determining the clock offset of the internal clock signal corresponding to the current environment temperature according to the corresponding relation between the pre-stored temperature and the clock offset, and determining the internal clock signal according to the clock offset, wherein the precision of the external clock signal is higher than that of the internal clock signal;
updating the corresponding relation between the temperature and the clock offset according to the difference between the external clock signal and the internal clock signal;
and when the external clock signal is abnormal, updating the internal clock signal according to the real-time acquired environmental temperature and by combining the updated corresponding relation between the temperature and the clock offset, and taking the internal clock signal as an output signal of a clock module.
2. The method of claim 1, wherein updating the temperature-to-clock offset correspondence according to the difference between the external clock signal and the internal clock signal comprises:
and when the difference between the external clock signal and the internal clock signal is larger than a preset value, updating the corresponding relation between the temperature and the clock offset according to the external clock signal.
3. The method of claim 1, wherein updating the temperature-to-clock offset correspondence according to the difference between the external clock signal and the internal clock signal comprises:
and updating the corresponding relation between the temperature and the clock offset by combining the difference between the external clock signal and the internal clock signal in an iterative updating mode according to a preset updating period.
4. The method of claim 1, wherein updating the temperature-to-clock offset correspondence according to the difference between the external clock signal and the internal clock signal comprises:
determining a control signal of a current internal clock source when a difference between the external clock signal and the internal clock signal is less than a predetermined difference threshold;
and updating the corresponding relation between the current environment temperature and the clock offset according to the corresponding relation between the control signal of the internal clock source and the clock offset.
5. The method of claim 4, wherein after updating the temperature to clock offset correspondence according to the difference between the external clock signal and the internal clock signal, the method further comprises:
searching a preset number of temperatures in the updated corresponding relation by taking the current environment temperature as a center, and determining the corresponding relation between the searched temperatures and the clock offset;
and determining fitting points according to the corresponding relation between the searched preset number of temperatures and the clock offset, and generating a fitting curve according to the fitting points.
6. The method of claim 1, wherein the external clock signal is a pulse-per-second signal in a satellite signal, and the internal clock signal is a clock signal of a crystal oscillator.
7. The method of claim 6, wherein the crystal oscillator is a voltage controlled crystal oscillator;
determining the internal clock signal according to the environment temperature acquired in real time and by combining the updated corresponding relation between the temperature and the clock offset, wherein the determining comprises the following steps:
determining the magnitude of the clock offset by combining the updated corresponding relation between the temperature and the clock offset according to the environment temperature acquired in real time;
when the clock offset is negative, reducing the voltage-controlled voltage of the crystal oscillator according to the magnitude of the clock offset;
and when the clock offset is positive, increasing the voltage-controlled voltage of the crystal oscillator according to the magnitude of the clock offset.
8. A clock module, the module comprising:
an internal clock source for generating an internal clock signal;
the controller is used for determining the clock offset of an internal clock signal corresponding to the current environment temperature according to the corresponding relation between the pre-stored temperature and the clock offset, and determining the internal clock signal according to the clock offset, wherein the precision of the external clock signal is higher than that of the internal clock signal; updating the corresponding relation between the temperature and the clock offset according to the difference between the external clock signal and the internal clock signal; according to the environment temperature obtained in real time, the internal clock signal is updated by combining the updated corresponding relation between the temperature and the clock offset;
the temperature sensor is used for acquiring the current environment temperature;
the first clock output interface outputs the internal clock signal when the external clock signal is abnormal;
the second clock output interface outputs the received external clock signal when receiving the normal external clock signal;
and the clock signal receiving interface is used for receiving an external clock signal.
9. An electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of a method according to any one of claims 1 to 7.
CN202211288927.0A 2022-10-20 2022-10-20 Clock output method, clock module, electronic device and storage medium Active CN115941150B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211288927.0A CN115941150B (en) 2022-10-20 2022-10-20 Clock output method, clock module, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211288927.0A CN115941150B (en) 2022-10-20 2022-10-20 Clock output method, clock module, electronic device and storage medium

Publications (2)

Publication Number Publication Date
CN115941150A true CN115941150A (en) 2023-04-07
CN115941150B CN115941150B (en) 2023-09-29

Family

ID=86556603

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211288927.0A Active CN115941150B (en) 2022-10-20 2022-10-20 Clock output method, clock module, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN115941150B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5864315A (en) * 1997-04-07 1999-01-26 General Electric Company Very low power high accuracy time and frequency circuits in GPS based tracking units
CN101692124A (en) * 2008-02-05 2010-04-07 晨星软件研发(深圳)有限公司 High accuracy satellite receiving controller and associated method
CN108011631A (en) * 2017-12-19 2018-05-08 建荣半导体(深圳)有限公司 Work clock generation method, clock source and chip
CN108663696A (en) * 2018-04-27 2018-10-16 Oppo广东移动通信有限公司 Update method, device, storage medium and the mobile terminal of temperature and frequency deviation relationship
CN112260789A (en) * 2020-10-20 2021-01-22 哲库科技(北京)有限公司 Clock source system, clock synchronization system and clock synchronization method
CN112821976A (en) * 2020-12-31 2021-05-18 锐捷网络股份有限公司 Method and device for maintaining local clock synchronization
WO2022110280A1 (en) * 2020-11-27 2022-06-02 辰芯科技有限公司 Method and apparatus for updating local time, device, and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5864315A (en) * 1997-04-07 1999-01-26 General Electric Company Very low power high accuracy time and frequency circuits in GPS based tracking units
CN101692124A (en) * 2008-02-05 2010-04-07 晨星软件研发(深圳)有限公司 High accuracy satellite receiving controller and associated method
CN108011631A (en) * 2017-12-19 2018-05-08 建荣半导体(深圳)有限公司 Work clock generation method, clock source and chip
CN108663696A (en) * 2018-04-27 2018-10-16 Oppo广东移动通信有限公司 Update method, device, storage medium and the mobile terminal of temperature and frequency deviation relationship
CN112260789A (en) * 2020-10-20 2021-01-22 哲库科技(北京)有限公司 Clock source system, clock synchronization system and clock synchronization method
WO2022110280A1 (en) * 2020-11-27 2022-06-02 辰芯科技有限公司 Method and apparatus for updating local time, device, and storage medium
CN112821976A (en) * 2020-12-31 2021-05-18 锐捷网络股份有限公司 Method and device for maintaining local clock synchronization

Also Published As

Publication number Publication date
CN115941150B (en) 2023-09-29

Similar Documents

Publication Publication Date Title
CN111585682B (en) Sensor time synchronization method and device and terminal equipment
WO2022121018A1 (en) Robot, and mapping method and apparatus therefor
CN112866098B (en) Gateway time service method, device, electronic equipment and computer readable medium
WO2022062671A1 (en) Timing synchronization method, visual navigation aid device control method, and related apparatuses
WO2022062670A1 (en) Timing method, visual navigational aid device control method, and related apparatus
CN115941150A (en) Clock output method, clock module, electronic device, and storage medium
CN108988832B (en) Method for detecting a delay associated with an electronic device and corresponding electronic device
US20190188081A1 (en) Electronic device with automatic and stable system restart function
CN112235916B (en) Light intensity control method of visual navigation aid equipment and related device
CN109167705B (en) Method and system for acquiring delay step time in storage module
CN114545761B (en) Local timing updating method, device, equipment and storage medium
CN109359010B (en) Method and system for obtaining internal transmission delay of storage module
CN114499816A (en) Clock synchronization method and device, terminal equipment and readable storage medium
CN109309637B (en) Data storage method, device and storage medium for transmission signals
CN109284239B (en) Method and system for acquiring delay step time in storage module
CN113641214A (en) Clock calibration circuit, clock calibration method and related equipment
CN112737573A (en) Clock skew calibration system, method and equipment based on daisy chain and computer storage medium
TW200303676A (en) System for providing a calibrated clock and methods thereof
CN109359067B (en) Method and system for acquiring delay step time in storage module
CN112463125B (en) Timing method and equipment of virtual timer
CN116886080B (en) Control device for timing device and control method thereof
CN109144912B (en) Method and system for acquiring communication interface boundary of storage module
CN109286535B (en) Method and system for acquiring delay step time in storage module
CN114153772B (en) Method and device for determining data sampling points
CN110609464B (en) Time service method and system of embedded communication system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant