Summary of the invention
The invention provides a kind of adjusting process and device of Real Time Clock System, to solve in prior art because clock adjustment system is before carrying out adjustment to Real Time Clock System, need to carry out for a long time temperature equalization, to ensure that the environment temperature of clock adjustment system is identical with the environment temperature of Real Time Clock System and cause the lower problem of efficiency of adjustment.
The adjusting process that the invention provides a kind of Real Time Clock System, comprising:
Gather the current ADC value of built-in temperature sensor in SOC chip;
According to the summit temperature of obtaining in advance, summit ADC value corresponding to described summit temperature, and the change curve of the temperature of default built-in temperature sensor and ADC value, Current Temperatures corresponding to described current ADC value obtained;
The temperature that inquiry is obtained in advance and the mapping relations of frequency compensation value, obtain the current frequency compensation value corresponding with described Current Temperatures;
According to described current frequency compensation value, described Real Time Clock System is carried out to adjustment.
The adjusting process that the invention provides a kind of Real Time Clock System, comprising:
Receive an ADC value that described Real Time Clock System sends, with reference to the temperature of built-in temperature sensor and the change curve of ADC value in the temperature of temperature calibration device in ADC value, described Real Time Clock System and the mapping relations of ADC value, described Real Time Clock System and the pulse per second (PPS) without alignment treatment; Wherein, ADC value corresponding to magnitude of voltage that a described ADC value is described temperature calibration device;
According to the mapping relations of the temperature of described temperature calibration device and ADC value, obtain the reference temperature corresponding with a described ADC value; And according to described reference temperature, with reference to the change curve of temperature and the ADC value of ADC value and described built-in temperature sensor, obtain the summit ADC value corresponding with pre-configured summit temperature;
According to pulse per second (PPS), the temperature of described built-in temperature sensor and the change curve of ADC value under the described pulse per second (PPS) without alignment treatment, default perfect condition, the default temperature of quartz crystal and summit ADC value corresponding to the change curve of frequency, described summit temperature and described summit temperature, obtain the mapping relations of temperature and frequency compensation value;
Summit ADC value corresponding to described summit temperature, described summit temperature and the mapping relations of described temperature and frequency compensation value are sent to described Real Time Clock System, carry out corresponding alignment treatment for described Real Time Clock System according to summit ADC value corresponding to described summit temperature, described summit temperature and the mapping relations of described temperature and frequency compensation value.
The calibration apparatus that the invention provides a kind of Real Time Clock System, comprising:
Acquisition module, for gathering the current ADC value of SOC chip built-in temperature sensor;
Acquisition module, summit ADC value corresponding to summit temperature, described summit temperature of obtaining in advance for basis, and the change curve of the temperature of default built-in temperature sensor and ADC value, obtain Current Temperatures corresponding to described current ADC value;
Described acquisition module also, for inquiring about the temperature obtained in advance and the mapping relations of frequency compensation value, obtains the current frequency compensation value corresponding with described Current Temperatures;
Adjustment module, for according to described current frequency compensation value, carries out adjustment to described Real Time Clock System.
The calibration apparatus that the invention provides a kind of Real Time Clock System, comprising:
Transceiver module, for receiving an ADC value that described Real Time Clock System sends, with reference to the temperature of built-in temperature sensor and the change curve of ADC value in ADC value, the temperature of described Real Time Clock System temperature calibration device and the mapping relations of ADC value, described Real Time Clock System and the pulse per second (PPS) without alignment treatment; Wherein, ADC value corresponding to magnitude of voltage that a described ADC value is described temperature calibration device;
Acquisition module, for according to the mapping relations of the temperature of described temperature calibration device and ADC value, obtains the reference temperature corresponding with a described ADC value; And according to described reference temperature, with reference to the change curve of temperature and the ADC value of ADC value and described built-in temperature sensor, obtain the summit ADC value corresponding with pre-configured summit temperature;
Described acquisition module also, for according to pulse per second (PPS), the temperature of described built-in temperature sensor and the change curve of ADC value under the described pulse per second (PPS) without alignment treatment, default perfect condition, the default temperature of quartz crystal and summit ADC value corresponding to the change curve of frequency, described summit temperature and described summit temperature, obtains the mapping relations of temperature and frequency compensation value;
Described transceiver module is also for summit ADC value corresponding to described summit temperature, described summit temperature and the mapping relations of described temperature and frequency compensation value are sent to described Real Time Clock System, carries out corresponding alignment treatment for described Real Time Clock System according to summit ADC value corresponding to described summit temperature, described summit temperature and the mapping relations of described temperature and frequency compensation value.
In the present invention, by gathering the current ADC value of built-in temperature sensor in SOC chip, and according to the summit temperature of obtaining in advance, the summit ADC value that this summit temperature is corresponding, and the change curve of the temperature of default built-in temperature sensor and ADC value, obtain Current Temperatures corresponding to this current ADC value, the temperature that inquiry is obtained in advance again and the mapping relations of frequency compensation value, obtain the current frequency compensation value corresponding with Current Temperatures, finally, according to this current frequency compensation value, this Real Time Clock System is carried out to adjustment, thereby leave standstill and just can realize Real Time Clock System is carried out to adjustment without Real Time Clock System being carried out to carry out before adjustment long equality of temperature, reduce Real Time Clock System adjustment to the strict requirement on temperature and time, and then improve the efficiency of adjustment.
Embodiment
Fig. 1 is the schematic flow sheet of the adjusting process embodiment mono-of Real Time Clock System of the present invention.As shown in Figure 1, the executive agent of the method is Real Time Clock System, and the method comprises:
Step 101: current voltage analog to digital conversion (Analog to Digital, hereinafter to be referred as the ADC) value that gathers built-in temperature sensor in SOC (system on a chip) (System on chip, hereinafter to be referred as SOC) chip.
Step 102: according to the summit temperature of obtaining in advance, summit ADC value corresponding to summit temperature, and the change curve of the temperature of default built-in temperature sensor and ADC value, obtain Current Temperatures corresponding to current ADC value.
Step 103: the temperature that inquiry is obtained in advance and the mapping relations of frequency compensation value, obtain the current frequency compensation value corresponding with Current Temperatures.
Step 104: according to current frequency compensation value, Real Time Clock System is carried out to adjustment.
In the present embodiment, by gathering the current ADC value of built-in temperature sensor in SOC chip, and according to the summit temperature of obtaining in advance, the summit ADC value that this summit temperature is corresponding, and the change curve of the temperature of default built-in temperature sensor and ADC value, obtain Current Temperatures corresponding to this current ADC value, the temperature that inquiry is obtained in advance again and the mapping relations of frequency compensation value, obtain the current frequency compensation value corresponding with Current Temperatures, finally, according to this current frequency compensation value, this Real Time Clock System is carried out to adjustment, thereby leave standstill and just can realize Real Time Clock System is carried out to adjustment without Real Time Clock System being carried out to carry out before adjustment long equality of temperature, reduce Real Time Clock System adjustment to the strict requirement on temperature and time, and then improve the efficiency of adjustment.
Further, Fig. 2 is the schematic flow sheet of the adjusting process embodiment bis-of Real Time Clock System of the present invention, and on the basis of the embodiment shown in above-mentioned Fig. 1, before step 101, the method can also comprise:
Step 201: gather the magnitude of voltage of temperature calibration device and the reference ADC value of built-in temperature sensor in Real Time Clock System, and obtain an ADC value corresponding with this magnitude of voltage.
In the present embodiment, temperature calibration device is in fact a thermistor, but is not limited to thermistor, its magnitude of voltage variation with temperature and changing.
Step 202: the change curve of an ADC value, this temperature with reference to ADC value, this temperature calibration device and the mapping relations of ADC value and the temperature of this built-in temperature sensor and ADC value is sent to adjustment system, for this adjustment system according to the mapping relations of the temperature of this temperature calibration device and ADC value, obtain the reference temperature corresponding with an ADC value, and according to the change curve of this reference temperature, this temperature with reference to ADC value and this built-in temperature sensor and ADC value, obtain the summit ADC value corresponding with this pre-configured summit temperature.
Wherein, the ADC value of an above-mentioned ADC value (Real Time Clock System is before carrying out adjustment) temperature calibration device when initial, the above-mentioned ADC value of built-in temperature sensor while being initial with reference to ADC value.Because said temperature is demarcated device and built-in temperature sensor and is in Real Time Clock System inside together, therefore, the corresponding temperature of an above-mentioned ADC value is identical with the corresponding temperature of reference ADC value of the inner built-in temperature sensor of Real Time Clock System, and reference temperature corresponding to an ADC value is with reference to the corresponding temperature of ADC value.Also it should be noted that, the summit temperature in the present embodiment is the summit temperature of the quartz crystal in Real Time Clock System, and it is that adjustment system is pre-configured.
In addition, in the present embodiment, Real Time Clock System by an above-mentioned ADC value, with reference to the temperature of ADC value, this temperature calibration device and the change curve of the mapping relations of ADC value and the temperature of this built-in temperature sensor and ADC value by System Programming (In-System Programming, hereinafter to be referred as ISP) interface sends to adjustment system, and adjustment system obtains reference temperature corresponding to an above-mentioned ADC value according to the mapping relations of the temperature of temperature calibration device and ADC value.Again because temperature calibration device and SOC built-in chip type temperature sensor are in Real Time Clock System inside together, be temperature calibration device identical with the environment temperature of SOC built-in chip type temperature sensor institute perception, therefore, temperature corresponding to an above-mentioned ADC value is SOC built-in chip type temperature sensor with reference to temperature corresponding to ADC value.Finally, adjustment system, according to reference temperature, with reference to the change curve of the summit temperature of ADC value, quartz crystal and the temperature of built-in temperature sensor and ADC value, obtains the summit ADC value corresponding with pre-configured summit temperature.
Step 203: receive summit temperature and summit ADC value corresponding to this summit temperature that this adjustment system sends.
In the present embodiment, this pre-configured summit temperature and summit ADC value are sent to Real Time Clock System by adjustment system, thereby make this Real Time Clock System receive by this ISP interface pre-configured above-mentioned summit temperature and ADC value corresponding to summit temperature that adjustment system sends.
In addition, preferably, in the present embodiment, a kind of specific implementation of step 102 is:
Collecting after the current ADC value of SOC built-in chip type temperature sensor, calculate the difference of the current ADC value summit ADC value corresponding with summit temperature, if judge, the difference of current ADC value and summit ADC value is more than or equal to 0, obtain the temperature of SOC built-in chip type temperature sensor and the high-temperature region slope of ADC value change curve, the difference of current ADC value and summit ADC value and high-temperature region slope are carried out to ratio and just can obtain current temperature offset amount, afterwards by above-mentioned reference temperature and the summation of current temperature offset amount, further obtain Current Temperatures corresponding to current ADC value.If judge, the difference of the current ADC value ADC value corresponding with summit temperature is less than 0, obtain the temperature of SOC built-in chip type temperature sensor and the low-temperature space slope of ADC value change curve, the difference of current ADC value and summit ADC value and low-temperature space slope are carried out to ratio and just can obtain current temperature offset amount, by above-mentioned reference temperature and the summation of current temperature offset amount, further obtain Current Temperatures corresponding to current ADC value afterwards.
Further, Fig. 3 is the schematic flow sheet of the adjusting process embodiment tri-of Real Time Clock System of the present invention.On the basis of the embodiment shown in above-mentioned Fig. 2, after step 203, before step 101, the method can also comprise:
Step 301: send the pulse per second (PPS) without alignment treatment to this adjustment system, according to being somebody's turn to do without the pulse per second (PPS) under pulse per second (PPS), the default perfect condition of alignment treatment, the default temperature of quartz crystal and the change curve of frequency, the temperature of this built-in temperature sensor and the change curve of ADC value and this summit temperature and summit ADC value corresponding to this summit temperature, obtain the mapping relations of this temperature and frequency compensation value for this adjustment system.
Step 302: receive this temperature of this adjustment system transmission and the mapping relations of frequency compensation value.
Particularly, Real Time Clock System is by the change curve of the temperature of SOC built-in chip type temperature sensor and ADC value, send to adjustment system by ISP interface, Real Time Clock System sends a pulse per second (PPS) without adjustment to adjustment system by ISP interface afterwards, difference is carried out in pulse per second (PPS) under the pulse per second (PPS) without adjustment that adjustment system utilization receives and default perfect condition, and the relation of utilizing cycle and frequency to be inversely proportional to obtains to the limit fixed frequency offset corresponding to this difference at temperature.Adjustment system is by utilizing SOC built-in chip type real-time clock (Real Time Clock in addition, hereinafter to be referred as RTC) the numerical value increment of the frequency departure offset registers of module, fixed frequency offset and numerical value increment are carried out to ratio, to the limit frequency compensation value corresponding to temperature.
Afterwards, adjustment system is according to self temperature of default quartz crystal and the change curve of frequency (curve that this curve provides for quartz crystal producer) and the summit temperature of obtaining and frequency compensation value corresponding to summit temperature, just can obtain frequency compensation value corresponding under different temperatures, be the mapping relations of temperature and frequency compensation value, and sending it to Real Time Clock System, Real Time Clock System receives the temperature of adjustment system transmission and the mapping relations of frequency compensation value by ISP interface.
In the present embodiment, by be arranged on the temperature of the temperature calibration device in Real Time Clock System and the mapping relations of ADC value with and the characteristic of thermistor, demarcate the temperature of SOC built-in chip type temperature sensor, because built-in temperature sensor and temperature calibration device are all arranged on Real Time Clock System inside, therefore the environment temperature of the two perception is identical, thereby guarantee the temperature that temperature calibration device can accurate calibration built-in temperature sensor, avoid the long-time equality of temperature that Real Time Clock System is carried out before adjustment to leave standstill, reduce Real Time Clock System adjustment to the strict requirement on temperature and time, thereby improve the efficiency of adjustment, utilize in addition temperature and the frequency variation curve of the inner quartz crystal of Real Time Clock System, obtain temperature and ADC value corresponding to summit temperature to the limit, and utilize the pulse per second (PPS) without adjustment that Real Time Clock System sends and the RTC module of SOC built-in chip type obtain frequency compensation value corresponding to temperature to the limit and then obtain temperature and the mapping relations of frequency compensation value, the mapping relations that Real Time Clock System is inquired about this temperature and frequency compensation value according to current temperature obtain the frequency compensation value under Current Temperatures, and then Real Time Clock System is compensated, guarantee the accuracy of Real Time Clock System output pulse.
Fig. 4 is the schematic flow sheet of the adjusting process embodiment tetra-of Real Time Clock System of the present invention.As shown in Figure 4, the executive agent of the method is adjustment system, and the method comprises:
Step 401: receive an ADC value that Real Time Clock System sends, with reference to the temperature of built-in temperature sensor and the change curve of ADC value in the temperature of temperature calibration device in ADC value, Real Time Clock System and the mapping relations of ADC value, Real Time Clock System and the pulse per second (PPS) without alignment treatment.
In the present embodiment, Real Time Clock System can be carried out the embodiment shown in above-mentioned Fig. 1 to Fig. 3 either method, and it is similar that it realizes principle, repeats no more herein.
Step 402: according to the mapping relations of the temperature of this temperature calibration device and ADC value, obtain the reference temperature corresponding with an ADC value; And according to this reference temperature, with reference to the change curve of temperature and the ADC value of ADC value and this built-in temperature sensor, obtain the summit ADC value corresponding with pre-configured summit temperature.
Step 403: according to summit ADC value corresponding to pulse per second (PPS), the temperature of this built-in temperature sensor and the change curve of ADC value, the temperature of this default quartz crystal and the change curve of frequency, summit temperature and this summit temperature under the pulse per second (PPS) without alignment treatment, default perfect condition, obtain the mapping relations of temperature and frequency compensation value.
Step 404: summit ADC value corresponding to summit temperature, this summit temperature and the mapping relations of this temperature and frequency compensation value are sent to Real Time Clock System, carry out corresponding alignment treatment for this Real Time Clock System according to summit ADC value corresponding to this summit temperature, this summit temperature and the mapping relations of this temperature and frequency compensation value.
Concrete, adjustment system receives by ISP interface the ADC value that Real Time Clock System sends, the mapping relations of the temperature of temperature calibration device and ADC value in Real Time Clock System, the change curve of the temperature of built-in temperature sensor and ADC value in Real Time Clock System, adjustment system obtains temperature corresponding to an above-mentioned ADC value according to the mapping relations of the temperature of temperature calibration device and ADC value, temperature calibration device and SOC built-in chip type temperature sensor are in Real Time Clock System inside together again, therefore temperature calibration device is identical with the environment temperature of SOC built-in chip type temperature sensor institute perception, temperature corresponding to an above-mentioned ADC value is SOC built-in chip type temperature sensor with reference to reference temperature corresponding to ADC value, adjustment system is again according to above-mentioned reference temperature in addition, with reference to the change curve of temperature and the ADC value of ADC value and above-mentioned built-in temperature sensor, obtain the ADC value corresponding with pre-configured summit temperature.
In addition, adjustment system receives by ISP interface the pulse per second (PPS) without adjustment that Real Time Clock System sends, difference is carried out in pulse per second (PPS) under the pulse per second (PPS) without adjustment that adjustment system utilization receives and default perfect condition, the relation of utilizing cycle and frequency to be inversely proportional to obtains frequency departure corresponding to temperature to the limit, adjustment system is by utilizing the numerical value increment of the frequency departure offset registers that is built in the RTC module in SOC chip in Real Time Clock System afterwards, frequency departure corresponding above-mentioned summit temperature and numerical value increment are carried out to ratio, frequency compensation value corresponding to temperature to the limit, afterwards, adjustment system is according to self temperature of default quartz crystal and the change curve of frequency and frequency compensation value corresponding to summit temperature obtained, just can obtain frequency compensation value corresponding under different temperatures, be the mapping relations of temperature and frequency compensation value, and send it to Real Time Clock System by ISP interface.
In the present embodiment, adjustment system receives by ISP interface the temperature of temperature calibration device and the mapping relations of ADC value and the ADC value that Real Time Clock System sends, determine reference temperature corresponding to an ADC value, it is the reference temperature of SOC built-in chip type temperature sensor in Real Time Clock System, avoid so the long-time equality of temperature that Real Time Clock System is carried out before adjustment to leave standstill, reduce real-time clock adjustment to the strict requirement on temperature and time, thereby improved the efficiency of adjustment, adjustment system is according to pre-configured summit temperature in addition, the summit ADC value that summit temperature is corresponding and temperature and the frequency variation curve of quartz crystal, obtain the mapping relations of temperature and frequency compensation value, and the mapping relations of this temperature and frequency compensation value are sent to Real Time Clock System, determine with the mapping relations that make Real Time Clock System to inquire about this temperature and frequency compensation value according to current temperature the current frequency compensation value that Current Temperatures is corresponding, and then Real Time Clock System is compensated, thereby leave standstill and just can realize Real Time Clock System is carried out to adjustment without Real Time Clock System being carried out to carry out before adjustment long equality of temperature, reduce Real Time Clock System adjustment to the strict requirement on temperature and time, and then improve the efficiency of adjustment.
Fig. 5 is the schematic flow sheet of the adjusting process embodiment five of Real Time Clock System of the present invention.As shown in Figure 5, the executive agent of the method is adjustment system, and the method comprises:
Step 501: receive an ADC value that Real Time Clock System sends, with reference to the temperature of built-in temperature sensor and the change curve of ADC value in the temperature of temperature calibration device in ADC value, Real Time Clock System and the mapping relations of ADC value, Real Time Clock System and the pulse per second (PPS) without alignment treatment.
In the present embodiment, Real Time Clock System can be carried out the embodiment shown in above-mentioned Fig. 1 to Fig. 3 either method, and it is similar that it realizes principle, repeats no more herein.
Step 502: according to the mapping relations of the temperature of this temperature calibration device and ADC value, obtain the reference temperature corresponding with an ADC value; And according to this reference temperature, with reference to the change curve of temperature and the ADC value of ADC value and this built-in temperature sensor, obtain the summit ADC value corresponding with pre-configured summit temperature.
Step 503: according to summit ADC value corresponding to pulse per second (PPS), the temperature of this built-in temperature sensor and the change curve of ADC value, the temperature of this default quartz crystal and the change curve of frequency, summit temperature and this summit temperature under the described pulse per second (PPS) without alignment treatment, default perfect condition, obtain the mapping relations of temperature and frequency compensation value.
Step 504: gather the pulse per second (PPS) after Real Time Clock System adjustment.
Step 505: judge whether the pulse per second (PPS) after adjustment meets adjustment condition.To perform step 506 if judge; If judge noly, perform step 507.
Step 506: adjustment success, the successful result of output adjustment.Adjustment finishes.
Step 507: adjustment failure, output adjustment failure result and parameter.
Concrete, adjustment system receives by ISP interface the ADC value that Real Time Clock System sends, the mapping relations of the temperature of temperature calibration device and ADC value in Real Time Clock System, the change curve of the temperature of built-in temperature sensor and ADC value in Real Time Clock System, adjustment system obtains temperature corresponding to an above-mentioned ADC value according to the mapping relations of the temperature of temperature calibration device and ADC value, temperature calibration device and SOC built-in chip type temperature sensor are in Real Time Clock System inside together again, therefore temperature calibration device is identical with the environment temperature of SOC built-in chip type temperature sensor institute perception, temperature corresponding to an above-mentioned ADC value is SOC built-in chip type temperature sensor with reference to reference temperature corresponding to ADC value, adjustment system is again according to above-mentioned reference temperature in addition, with reference to the change curve of temperature and the ADC value of ADC value and above-mentioned built-in temperature sensor, obtain the ADC value corresponding with pre-configured summit temperature.
In addition, adjustment system receives by ISP interface the pulse per second (PPS) without adjustment that Real Time Clock System sends, difference is carried out in pulse per second (PPS) under the pulse per second (PPS) without adjustment that adjustment system utilization receives and default perfect condition, the relation of utilizing cycle and frequency to be inversely proportional to obtains frequency departure corresponding to temperature to the limit, adjustment system is by utilizing the numerical value increment of the frequency departure offset registers that is built in the RTC module in SOC chip in Real Time Clock System afterwards, frequency departure corresponding summit temperature and numerical value increment are carried out to ratio, frequency compensation value corresponding to temperature to the limit, afterwards, adjustment system, according to the change curve of the temperature of default quartz crystal and frequency and frequency compensation value corresponding to summit temperature obtained, just can obtain frequency compensation value corresponding under different temperatures, i.e. the mapping relations of temperature and frequency compensation value, then adjustment system carries out alignment treatment according to the reference frequency offset under the reference temperature of obtaining to the received pulse per second (PPS) without adjustment.
Afterwards, adjustment system is measured the pulse per second (PPS) after adjustment, if the pulse per second (PPS) after adjustment meets adjustment condition, adjustment condition is herein adjusting accuracy, even the frequency departure of the pulse per second (PPS) after adjustment is in the scope of the frequency departure degree of stability setting, the successful result of adjustment system output adjustment, know that according to the adjustment result of adjustment system demonstration whether the adjustment of Real Time Clock System is successful so that obtain user, if adjustment system is measured the frequency departure of the pulse per second (PPS) after adjustment not in the scope of the frequency departure degree of stability setting, adjustment failure, adjustment system can be exported adjustment failure result and parameter, frequency departure precision that this parameter comprises pulse per second (PPS) after adjustment etc., so that research staff makes next step instruction to this adjustment system according to this adjustment failure information and parameter.
In the present embodiment, adjustment system receives by ISP interface the temperature of temperature calibration device and the mapping relations of ADC value and the ADC value that Real Time Clock System sends, determine reference temperature corresponding to an ADC value, it is the reference temperature of SOC built-in chip type temperature sensor in Real Time Clock System, avoid so the long equality of temperature that Real Time Clock System is carried out before adjustment to leave standstill, reduce real-time clock adjustment to the strict requirement on temperature and time, thereby improved the efficiency of adjustment, adjustment system is by measuring and judge whether it meets adjustment condition the pulse per second (PPS) after the adjustment of output in addition, judging that the pulse per second (PPS) after adjustment meets after adjustment condition, the temperature that institute's computing is obtained and the mapping relations of frequency compensation value send to Real Time Clock System, determine with the mapping relations that make Real Time Clock System to inquire about this temperature and frequency compensation value according to current temperature the current frequency compensation value that Current Temperatures is corresponding, and then Real Time Clock System is compensated, avoid, in the inaccurate situation of adjusting accuracy, Real Time Clock System is carried out to adjustment and frequency compensation, guarantee like this accuracy of Real Time Clock System output pulse.
Fig. 6 is the structural representation of the calibration apparatus embodiment mono-of Real Time Clock System of the present invention, as shown in Figure 6, this device comprises: acquisition module 61, acquisition module 62 and adjustment module 63, wherein, acquisition module 61, for gathering the current ADC value of SOC chip built-in temperature sensor; Acquisition module 62, summit ADC value corresponding to summit temperature, this summit temperature of obtaining in advance for basis, and the change curve of the temperature of default built-in temperature sensor and ADC value, obtain Current Temperatures corresponding to current ADC value; Described acquisition module 62 also, for inquiring about the temperature obtained in advance and the mapping relations of frequency compensation value, obtains the current frequency compensation value corresponding with this Current Temperatures; Adjustment module 63, for according to described this current frequency compensation value, carries out adjustment to described this Real Time Clock System.
The calibration apparatus of the Real Time Clock System of the present embodiment can execution graph 1 shown in embodiment of the method, it is similar that it realizes principle, repeats no more herein.
In the present embodiment, the summit temperature of obtaining in advance by acquisition module, the summit ADC value that summit temperature is corresponding, reference temperature and reference ADC value corresponding to this reference temperature, can obtain the Current Temperatures corresponding to current ADC value of built-in temperature sensor in current SOC chip, and the temperature obtained in advance of inquiry and the mapping relations of frequency compensation value, obtain the current frequency compensation value corresponding with Current Temperatures, last adjustment module is according to current frequency compensation value, Real Time Clock System is carried out to adjustment, solve in prior art because clock adjustment system is before carrying out adjustment to Real Time Clock System, need to carry out for a long time temperature equalization, cause the lower problem of efficiency of adjustment to ensure that the environment temperature of clock adjustment system is identical with the environment temperature of Real Time Clock System, thereby improve the efficiency of adjustment.
Fig. 7 is the structural representation of the calibration apparatus embodiment bis-of Real Time Clock System of the present invention, on above-mentioned basis embodiment illustrated in fig. 6, above-mentioned acquisition module 61 is concrete also for gathering the reference ADC value of magnitude of voltage and above-mentioned built-in temperature sensor of above-mentioned Real Time Clock System temperature calibration device; Above-mentioned acquisition module 62, also for obtaining an ADC value corresponding with above-mentioned magnitude of voltage.
This device also comprises transceiver module 64, for by an above-mentioned ADC value, above-mentionedly send to adjustment system with reference to ADC value, the said temperature demarcation temperature of device and the change curve of the mapping relations of ADC value and the temperature of above-mentioned built-in temperature sensor and ADC value, according to the mapping relations of the temperature of this temperature calibration device and ADC value, obtain the reference temperature corresponding with an above-mentioned ADC value for this adjustment system; And according to above-mentioned reference temperature, the above-mentioned change curve with reference to the summit temperature of ADC value, quartz crystal and the temperature of above-mentioned built-in temperature sensor and ADC value, obtain and the summit ADC value corresponding with pre-configured above-mentioned summit temperature; Summit temperature and summit ADC value corresponding to this summit temperature that transceiver module 64 also sends for receiving above-mentioned adjustment system.
Preferably, transceiver module 64 is also for sending the pulse per second (PPS) without alignment treatment to described adjustment system, according to the pulse per second (PPS) under the described pulse per second (PPS) without alignment treatment, default perfect condition, the default temperature of quartz crystal and the change curve of frequency, the temperature of described built-in temperature sensor and the change curve of ADC value and described summit temperature and summit ADC value corresponding to described summit temperature, obtain the mapping relations of described temperature and frequency compensation value for described adjustment system; Transceiver module 64 is also for receiving the temperature of above-mentioned adjustment system transmission and the mapping relations of frequency compensation value.
The calibration apparatus of the Real Time Clock System of the present embodiment can execution graph 2 and Fig. 3 shown in embodiment of the method, it is similar that it realizes principle, repeats no more herein.
In the present embodiment, acquisition module obtains summit temperature by transceiver module, the summit ADC value that summit temperature is corresponding, reference temperature and reference ADC value corresponding to this reference temperature, and then the temperature of the SOC built-in chip type temperature sensor institute perception in Real Time Clock System is demarcated, the environment temperature of institute's perception of guaranteeing acquisition module and SOC built-in chip type temperature sensor is identical, it is the temperature that acquisition module can prepare to demarcate the perception of SOC built-in chip type temperature sensor institute, avoid the long-time equality of temperature that Real Time Clock System is carried out before adjustment to leave standstill, reduce Real Time Clock System adjustment to the strict requirement on temperature and time, thereby improve the efficiency of adjustment, obtain in addition the mapping relations of temperature and frequency compensation value by acquisition module and transceiver module acting in conjunction, the mapping relations that Real Time Clock System is inquired about this temperature and frequency compensation value according to current temperature obtain the frequency compensation value under Current Temperatures, and then Real Time Clock System is compensated, guarantee the accuracy of Real Time Clock System output pulse.
Fig. 8 is the structural representation of the calibration apparatus embodiment tri-of Real Time Clock System of the present invention, as shown in Figure 8, this device comprises: transceiver module 71 and acquisition module 72, wherein, transceiver module 71, for receiving an ADC value that above-mentioned Real Time Clock System sends, with reference to the temperature of built-in temperature sensor and the change curve of ADC value in ADC value, the temperature of above-mentioned Real Time Clock System temperature calibration device and the mapping relations of ADC value, above-mentioned Real Time Clock System and the pulse per second (PPS) without alignment treatment; Wherein, an above-mentioned ADC value is the ADC value that described temperature calibration device is corresponding; Transceiver module 71 is also for summit ADC value corresponding to above-mentioned summit temperature, above-mentioned summit temperature and the mapping relations of said temperature and frequency compensation value are sent to above-mentioned Real Time Clock System, carries out corresponding alignment treatment for above-mentioned Real Time Clock System according to summit ADC value corresponding to above-mentioned summit temperature, above-mentioned summit temperature and the mapping relations of said temperature and frequency compensation value; Acquisition module 72, for demarcating the temperature of device and the mapping relations of ADC value according to said temperature, obtains the reference temperature corresponding with an above-mentioned ADC value; And according to above-mentioned reference temperature, with reference to the change curve of temperature and the ADC value of ADC value, summit temperature and above-mentioned built-in temperature sensor, obtain the summit ADC value corresponding with pre-configured summit temperature; Acquisition module 72 also, for demarcating the temperature of device and summit ADC value corresponding to the mapping relations of ADC value, above-mentioned summit temperature and above-mentioned summit temperature according to pulse per second (PPS), the temperature of above-mentioned built-in temperature sensor and the change curve of ADC value, the temperature of above-mentioned default quartz crystal and the change curve of frequency, said temperature under the pulse per second (PPS) without alignment treatment, default perfect condition, obtains the mapping relations of temperature and frequency compensation value.
The calibration apparatus of the Real Time Clock System of the present embodiment can execution graph 4 shown in embodiment of the method, it is similar that it realizes principle, repeats no more herein.
In the present embodiment, adjustment system receives by transceiver module the temperature of temperature calibration device and the mapping relations of ADC value and the ADC value that Real Time Clock System sends, determine reference temperature corresponding to an ADC value, it is the reference temperature of SOC built-in chip type temperature sensor in Real Time Clock System, avoid so the long-time equality of temperature that Real Time Clock System is carried out before adjustment to leave standstill, reduce Real Time Clock System adjustment to the strict requirement on temperature and time, thereby improved the efficiency of adjustment; The temperature that adjustment system obtains acquisition module computing in addition and the mapping relations of frequency compensation value send to Real Time Clock System by transceiver module, determine with the mapping relations that make Real Time Clock System to inquire about this temperature and frequency compensation value according to current temperature the current frequency compensation value that Current Temperatures is corresponding, and then Real Time Clock System is compensated, guarantee the accuracy of Real Time Clock System output pulse.
Fig. 9 is the structural representation of the calibration apparatus embodiment tetra-of Real Time Clock System of the present invention, and on above-mentioned basis embodiment illustrated in fig. 8, this device also comprises acquisition module 73 and judge module 74.Wherein, acquisition module 73, for gathering the pulse per second (PPS) after above-mentioned Real Time Clock System adjustment; Judge module 74, if for judging whether the pulse per second (PPS) after adjustment meets adjustment condition, if the pulse per second (PPS) that described transceiver module 71 is also judged after described adjustment for described judge module 74 meets described adjustment condition, exports the successful result of adjustment; If the pulse per second (PPS) that transceiver module 71 is also judged after described adjustment for described judge module 74 does not meet described adjustment condition, export adjustment failure result and parameter.
The calibration apparatus of the Real Time Clock System of the present embodiment can execution graph 5 shown in embodiment of the method, it is similar that it realizes principle, repeats no more herein.
In the present embodiment, adjustment system transceiver module receives the temperature of temperature calibration device and the mapping relations of ADC value and an ADC value of Real Time Clock System transmission and sends acquisition module to, acquisition module demarcates the temperature of device according to said temperature and the mapping relations of ADC value are determined reference temperature corresponding to an ADC value, it is the reference temperature of SOC built-in chip type temperature sensor in Real Time Clock System, avoid so the long equality of temperature that Real Time Clock System is carried out before adjustment to leave standstill, reduce Real Time Clock System adjustment to the strict requirement on temperature and time, thereby improve the efficiency of adjustment, adjustment system gathers the pulse per second (PPS) after Real Time Clock System adjustment by acquisition module in addition, and the pulse per second (PPS) after to the adjustment of output is measured and is judged whether it meets adjustment condition by judge module, judging that the pulse per second (PPS) after adjustment meets after adjustment condition, the successful result of output adjustment, and then determine with the mapping relations that make Real Time Clock System to inquire about this temperature and frequency compensation value according to current temperature the current frequency compensation value that Current Temperatures is corresponding, and then Real Time Clock System is compensated, avoid, in the inaccurate situation of adjusting accuracy, Real Time Clock System is carried out to adjustment and frequency compensation, guarantee like this accuracy of Real Time Clock System output pulse.
One of ordinary skill in the art will appreciate that: all or part of step that realizes above-mentioned each embodiment of the method can complete by the relevant hardware of programmed instruction.Aforesaid program can be stored in a computer read/write memory medium.This program, in the time carrying out, is carried out the step that comprises above-mentioned each embodiment of the method; And aforesaid storage medium comprises: various media that can be program code stored such as ROM, RAM, magnetic disc or CDs.
Finally it should be noted that: above each embodiment, only in order to technical scheme of the present invention to be described, is not intended to limit; Although the present invention is had been described in detail with reference to aforementioned each embodiment, those of ordinary skill in the art is to be understood that: its technical scheme that still can record aforementioned each embodiment is modified, or some or all of technical characterictic is wherein equal to replacement; And these amendments or replacement do not make the essence of appropriate technical solution depart from the scope of various embodiments of the present invention technical scheme.