CN107957677A - A kind of time device time calibrating method of mobile unit - Google Patents

A kind of time device time calibrating method of mobile unit Download PDF

Info

Publication number
CN107957677A
CN107957677A CN201711279018.XA CN201711279018A CN107957677A CN 107957677 A CN107957677 A CN 107957677A CN 201711279018 A CN201711279018 A CN 201711279018A CN 107957677 A CN107957677 A CN 107957677A
Authority
CN
China
Prior art keywords
time
rtc
exterior
internal
gps
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
CN201711279018.XA
Other languages
Chinese (zh)
Other versions
CN107957677B (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.)
Ji Qi (chengdu) Science And Technology Co Ltd
Original Assignee
Ji Qi (chengdu) Science And Technology 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 Ji Qi (chengdu) Science And Technology Co Ltd filed Critical Ji Qi (chengdu) Science And Technology Co Ltd
Priority to CN201711279018.XA priority Critical patent/CN107957677B/en
Publication of CN107957677A publication Critical patent/CN107957677A/en
Application granted granted Critical
Publication of CN107957677B publication Critical patent/CN107957677B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G04HOROLOGY
    • G04RRADIO-CONTROLLED TIME-PIECES
    • G04R20/00Setting the time according to the time information carried or implied by the radio signal
    • G04R20/02Setting the time according to the time information carried or implied by the radio signal the radio signal being sent by a satellite, e.g. GPS
    • G04R20/04Tuning or receiving; Circuits therefor
    • GPHYSICS
    • G04HOROLOGY
    • G04RRADIO-CONTROLLED TIME-PIECES
    • G04R40/00Correcting the clock frequency
    • G04R40/06Correcting the clock frequency by computing the time value implied by the radio signal

Abstract

The invention discloses a kind of time device time calibrating method of mobile unit, the present invention using internal RTC, outside RTC timing at the same time, when server, GPS schools mode combination uninterrupted clock support can be provided for mobile unit;All applications of the present invention obtain current time by internal RTC time, greatly reduce CPU and the time loss of exterior RTC clock communication, greatly improve work efficiency.

Description

A kind of time device time calibrating method of mobile unit
Technical field
The present invention relates to the time device time calibrating method of time calibration technical field, specially a kind of mobile unit.
Background technology
Embedded system time calibration mode mainly has now:The calibration sides such as server time calibration, gps time calibration Formula;When equipment can not be connected with server, such as:GPRS/3G/4G signals are weak, server exception etc., server time calibration side Formula will be unable to carry out;Ephemeris time can not be obtained when gps signal is weak, gps time calibrating mode also will be unable to carry out;Embedded system Timing is mainly carried out using the mode such as exterior RTC chip or internal RTC block, but exterior RTC chip is generally led to using I2C News, its communication speed is slower, for needing the scene drawback for frequently reading current time larger;The internal easy factor of RTC clock Situations such as group is crossed the border, code is abnormal is illegally modified, and stability is poor.
The content of the invention
It is an object of the invention to provide a kind of time device time calibrating method of mobile unit, to solve above-mentioned background The problem of being proposed in technology.
To achieve the above object, the present invention provides following technical solution:A kind of time device time calibration of mobile unit Method, using internal RTC, outside RTC timing at the same time, when server, GPS schools a kind of time for mobile unit that mode combines set Standby time calibrating method;Calibration method is respectively:
A, clock alignment is powered on:It is interior using the timing mode of internal RTC, outside RTC timing at the same time, exterior RTC charged pools Portion RTC works under exterior electric power thus supplied;Internal RTC clock is read exterior in the case where upper electric network, GPS are work RTC clock count value is calibrated for internal RTC;
B, server time is calibrated:Equipment actively can obtain real-time time after being server connection to server, obtain At the same time can be carried out to exterior RTC and inside RTC time calibration after taking the time;
C, gps time is calibrated:After GPS positioning, equipment can timing detection gps time and outside RTC and inside RTC when Between deviation, when time deviation is more than a certain range, current gps time can be used to exterior RTC and inside RTC progress time school It is accurate;
D, current RTC time obtains:Based on mobile unit using current time as baseline, to time requirement of real-time compared with Gao Te Point, all references obtain current time by internal RTC time, reduce CPU and exterior RTC clock communication time, improve CPU work efficiencies.
Preferably, time calibration protection is further included:To outside or inside RTC carry out time calibration when, all can to it is external when Between be detected, whether detection time legal, if illegal do not calibrate RTC.
Preferably, time calibration process:Because internal RTC clock is without battery, inside RTC time is invalid after system starts, therefore First read the exterior internal RTC time of RTC time calibration;After system Connection Service device, current time is obtained from server, is used for The internal RTC of calibration and exterior RTC time;After band GPS positioning, system detect in real time exterior current RTC time and gps time when Between it is poor, if the time difference be more than 10s, when RTC carries out pressure school inside and out system pair.
Compared with prior art, the beneficial effects of the invention are as follows:The present invention uses internal RTC, outside RTC timing at the same time, Mode combination can provide uninterrupted clock for mobile unit and support when server, GPS schools;All applications of the present invention are by interior Portion's RTC time obtains current time, greatly reduces CPU and the time loss of exterior RTC clock communication, substantially increases work Efficiency.
Brief description of the drawings
Fig. 1 is flow chart of the present invention.
Embodiment
Below in conjunction with the attached drawing in the embodiment of the present invention, the technical solution in the embodiment of the present invention is carried out clear, complete Site preparation describes, it is clear that described embodiment is only part of the embodiment of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, those of ordinary skill in the art are obtained every other without making creative work Embodiment, belongs to the scope of protection of the invention.
Referring to Fig. 1, the present invention provides a kind of technical solution:The present invention provides following technical solution:A kind of mobile unit Time device time calibrating method, using internal RTC, outside RTC timing at the same time, mode combines when server, GPS schools one The time device time calibrating method of kind mobile unit;Calibration method is respectively:
A, clock alignment is powered on:It is interior using the timing mode of internal RTC, outside RTC timing at the same time, exterior RTC charged pools Portion RTC works under exterior electric power thus supplied;Internal RTC clock is read exterior in the case where upper electric network, GPS are work RTC clock count value is calibrated for internal RTC;
B, server time is calibrated:Equipment actively can obtain real-time time after being server connection to server, obtain At the same time can be carried out to exterior RTC and inside RTC time calibration after taking the time;
C, gps time is calibrated:After GPS positioning, equipment can timing detection gps time and outside RTC and inside RTC when Between deviation, when time deviation is more than a certain range, current gps time can be used to exterior RTC and inside RTC progress time school It is accurate;
D, current RTC time obtains:Based on mobile unit using current time as baseline, to time requirement of real-time compared with Gao Te Point, all references obtain current time by internal RTC time, reduce CPU and exterior RTC clock communication time, improve CPU work efficiencies.
In the present invention, time calibration protection is further included:, all can be to external when carrying out time calibration to outside or inside RTC Time is detected, and whether detection time is legal, if illegal do not calibrate RTC.
In the present invention, time calibration process:Because internal RTC clock is without battery, inside RTC time is invalid after system starts, Therefore first read the exterior internal RTC time of RTC time calibration;After system Connection Service device, current time is obtained from server, is used In the internal RTC of calibration and exterior RTC time;After band GPS positioning, system detects exterior current RTC time and gps time in real time Time difference, if the time difference be more than 10s, when RTC carries out pressure school inside and out system pair.
In the present invention, time calibration subfunction is, time calibration subfunction there are two kinds return the result TRUE- it is normal, FALSE- is abnormal;Whether time calibration subfunction first detects input time legal, if illegal directly return to FALSE;If Time detecting is normal, configures internal RTC clock and reads internal RTC clock, if the time difference is more than 2 seconds, directly returns FALSE;Exterior RTC time is similarly configured, if inside RTC and exterior RTC time setting are normal, returns to TRUE.
In the present invention, time legitimacy detection principle is:Current time have to be larger than current firmware compilation time;When current Between must be in current firmware compilation time 10 years;Current time year, month, day cannot be zero;2 months leap years should be less than being equal to day 29 days;The day in 2 months non-leap years should be less than or equal to 28 days;It should be less than the day in the solar month being equal to 30 days;It should be less than the moon in solar month of 30 days being equal to 31 My god;When should be less than 24 it is small when;Dividing be less than 60 points;Second should be less than 60 seconds.
The present invention using internal RTC, outside RTC timing at the same time, when server, GPS schools mode combination can be set to be vehicle-mounted It is standby that uninterrupted clock support is provided;All applications of the present invention obtain current time by internal RTC time, greatly reduce CPU and the time loss of exterior RTC clock communication, greatly improve work efficiency.
Although an embodiment of the present invention has been shown and described, for the ordinary skill in the art, can be with Understanding without departing from the principles and spirit of the present invention can carry out these embodiments a variety of changes, modification, replace And modification, the scope of the present invention is defined by the appended.

Claims (3)

  1. A kind of 1. time device time calibrating method of mobile unit, it is characterised in that:Counted at the same time using internal RTC, outside RTC When, the time device time calibrating method for a kind of mobile unit that mode combines when server, GPS schools;Calibration method is respectively:
    A, clock alignment is powered on:It is internal using the timing mode of internal RTC, outside RTC timing at the same time, exterior RTC charged pools RTC works under exterior electric power thus supplied;Internal RTC clock reads exterior RTC in the case where upper electric network, GPS are work Clock count value is calibrated for internal RTC;
    B, server time is calibrated:Equipment actively can obtain real-time time after being server connection to server, when obtaining Between after can at the same time to exterior RTC and inside RTC progress time calibration;
    C, gps time is calibrated:After GPS positioning, the time that equipment can periodically detect gps time and outside RTC and inside RTC is inclined Difference, when time deviation is more than a certain range, can use current gps time to exterior RTC and inside RTC progress time calibrations;
    D, current RTC time obtains:Based on mobile unit using current time as baseline, to the higher feature of time requirement of real-time, All references obtains current time by internal RTC time, reduces CPU and exterior RTC clock communication time, improves CPU work efficiencies.
  2. A kind of 2. time device time calibrating method of mobile unit according to claim 1, it is characterised in that:Further include Time calibration protects:When carrying out time calibration to outside or inside RTC, future times can be all detected, detection time is It is no legal, if illegal do not calibrate RTC.
  3. A kind of 3. time device time calibrating method of mobile unit according to claim 1, it is characterised in that:Time school Quasi- process:Because internal RTC clock is without battery, inside RTC time is invalid after system starts, therefore first reads exterior RTC time calibration Internal RTC time;After system Connection Service device, current time is obtained from server, for calibrating internal RTC and outside RTC Time;After band GPS positioning, system detects the time difference of exterior current RTC time and gps time in real time, if the time difference is more than 10s, when RTC carries out pressure school inside and out system pair.
CN201711279018.XA 2017-12-06 2017-12-06 Time equipment time calibration method of vehicle-mounted equipment Active CN107957677B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711279018.XA CN107957677B (en) 2017-12-06 2017-12-06 Time equipment time calibration method of vehicle-mounted equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711279018.XA CN107957677B (en) 2017-12-06 2017-12-06 Time equipment time calibration method of vehicle-mounted equipment

Publications (2)

Publication Number Publication Date
CN107957677A true CN107957677A (en) 2018-04-24
CN107957677B CN107957677B (en) 2020-04-28

Family

ID=61958148

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711279018.XA Active CN107957677B (en) 2017-12-06 2017-12-06 Time equipment time calibration method of vehicle-mounted equipment

Country Status (1)

Country Link
CN (1) CN107957677B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111726190A (en) * 2020-06-18 2020-09-29 四川艾贝斯科技发展有限公司 System time calibration method for street lamp control system
CN112468172A (en) * 2020-11-17 2021-03-09 常州仁千电气科技股份有限公司 Vehicle-mounted network terminal TBOX

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011226866A (en) * 2010-04-16 2011-11-10 Seiko Instruments Inc Gps timepiece and its method
CN103309228A (en) * 2013-06-21 2013-09-18 厦门雅迅网络股份有限公司 Time correcting method of car-mounted terminal system
CN103399484A (en) * 2013-07-23 2013-11-20 深圳市元征科技股份有限公司 Local clock calibrating method and vehicle-mounted equipment
CN104808479A (en) * 2014-01-23 2015-07-29 大陆汽车车身电子系统(芜湖)有限公司 Device and method for updating vehicle-mounted clock
CN104866065A (en) * 2014-02-21 2015-08-26 三星电子株式会社 Low Power Driving Method And Electronic Device Performing Thereof
CN107329398A (en) * 2017-06-06 2017-11-07 湖南中联重科智能技术有限公司 Car-mounted terminal time keeping system and method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011226866A (en) * 2010-04-16 2011-11-10 Seiko Instruments Inc Gps timepiece and its method
CN103309228A (en) * 2013-06-21 2013-09-18 厦门雅迅网络股份有限公司 Time correcting method of car-mounted terminal system
CN103399484A (en) * 2013-07-23 2013-11-20 深圳市元征科技股份有限公司 Local clock calibrating method and vehicle-mounted equipment
CN104808479A (en) * 2014-01-23 2015-07-29 大陆汽车车身电子系统(芜湖)有限公司 Device and method for updating vehicle-mounted clock
CN104866065A (en) * 2014-02-21 2015-08-26 三星电子株式会社 Low Power Driving Method And Electronic Device Performing Thereof
CN107329398A (en) * 2017-06-06 2017-11-07 湖南中联重科智能技术有限公司 Car-mounted terminal time keeping system and method

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111726190A (en) * 2020-06-18 2020-09-29 四川艾贝斯科技发展有限公司 System time calibration method for street lamp control system
CN111726190B (en) * 2020-06-18 2022-10-04 四川艾贝斯科技发展有限公司 System time calibration method for street lamp control system
CN112468172A (en) * 2020-11-17 2021-03-09 常州仁千电气科技股份有限公司 Vehicle-mounted network terminal TBOX

Also Published As

Publication number Publication date
CN107957677B (en) 2020-04-28

Similar Documents

Publication Publication Date Title
WO2012045261A1 (en) Timing time service method and device using a navigational satellite
CN202008583U (en) Clock source of synchronous phasor measuring device
CN105142210B (en) A kind of real-time clock synchronous calibration method and sensor for wireless sense network
CN107957677A (en) A kind of time device time calibrating method of mobile unit
CN105824233A (en) Initiative time service module based on Beidou/GPS and ammeter initiative time service method
CN108535722B (en) Radar reference azimuth calibration device
CN105486392A (en) Small electronic weighing system based on single-chip microcomputer
CN102589351B (en) Digitizing collection device and detection method based on antiaircraft gun operation parameter of weather modification
CN105182394A (en) Combination navigation passive positioning method and apparatus for Beidou positioning system and inertial navigation system
CN205749668U (en) Big-dipper satellite time dissemination system is utilized to carry out the intelligent electric energy meter of automatic correcting time
CN202362445U (en) Electronic type mutual inductor on-site check meter
CN209433013U (en) A kind of integrated electronic gyroscope high-precision Beidou monitoring stake
CN206920837U (en) A kind of multiple clock sources correction device of vehicle-mounted TBOX systems
CN110689702A (en) Safety early warning method and device based on intelligent wearable device and intelligent wearable device
CN207218854U (en) A kind of camera of automatic data collection geography information
CN205721116U (en) A kind of active time service module based on the Big Dipper/GPS
CN205353375U (en) Radiation detection system
CN202282036U (en) Radio frequency identification (RFID) system capable of calibrating time
CN202511874U (en) Blasting vibration measuring recorder using GPS global accurate timing and positioning technology
CN105043339A (en) Method and system for measuring distance between electric transmission line and interference object
CN205214382U (en) Intelligence location shoe -pad
CN116819940A (en) Time calibration system for batteryless electric energy meter
CN103135441B (en) Global position system (GPS) timing device and running method thereof
CN204166296U (en) A kind of GPS time service device
CN203982090U (en) A kind of Big Dipper wrist-watch

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