CN107219395B - A kind of detection method of RTC crystal oscillator - Google Patents

A kind of detection method of RTC crystal oscillator Download PDF

Info

Publication number
CN107219395B
CN107219395B CN201710369759.0A CN201710369759A CN107219395B CN 107219395 B CN107219395 B CN 107219395B CN 201710369759 A CN201710369759 A CN 201710369759A CN 107219395 B CN107219395 B CN 107219395B
Authority
CN
China
Prior art keywords
time
crystal oscillator
register
cmos
rtc
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.)
Active
Application number
CN201710369759.0A
Other languages
Chinese (zh)
Other versions
CN107219395A (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.)
Zhengzhou Yunhai Information Technology Co Ltd
Original Assignee
Zhengzhou Yunhai Information 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 Zhengzhou Yunhai Information Technology Co Ltd filed Critical Zhengzhou Yunhai Information Technology Co Ltd
Priority to CN201710369759.0A priority Critical patent/CN107219395B/en
Publication of CN107219395A publication Critical patent/CN107219395A/en
Application granted granted Critical
Publication of CN107219395B publication Critical patent/CN107219395B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R23/00Arrangements for measuring frequencies; Arrangements for analysing frequency spectra
    • G01R23/02Arrangements for measuring frequency, e.g. pulse repetition rate; Arrangements for measuring period of current or voltage

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Electric Clocks (AREA)

Abstract

The invention discloses a kind of detection methods of RTC crystal oscillator, comprising: the setting of read status register A, B, C, and the data read are saved;Interrupt flag bit in register A, register B is set, keeps alarm interrupt effective;The current CMOS time is read, start_time is denoted as;The CMOS time is tuned up 1 second;Check alarm interrupt flag bit in register C whether effectively;Setting alarm clock, which interrupts, to be issued;It checks whether alarm interrupt issues, if issued, reads the CMOS time, be denoted as end_time;If end_time subtracted start_time not equal to 1 second, then it represents that the concussion of RTC crystal oscillator is problematic;Otherwise, it means that the concussion of RTC crystal oscillator is qualified;This method effectively can detect and identify that the problem of crystal oscillator frequency drifts out range improves test coverage to reduce the cost of our material logistics convenient for operation.

Description

A kind of detection method of RTC crystal oscillator
Technical field
The present invention relates to the hardware detection methods of computer system, and in particular to can detect crystal oscillator frequency drift exception The detection method of RTC crystal oscillator.
Background technique
The major function of RTC (Real Time Clock) crystal oscillator (32768Hz) is to provide vibration frequency to RTC block.Such as Fruit is without this crystal oscillator, and the time of RTC is impossible to keep, and when server starts every time, operating system is with regard to none time base Standard goes to calibrate.If certain RTC crystal oscillator works abnormal, the time of RTC is just inaccurate, means that operation in this way The time of system is also inaccurate.
Time inaccuracy is intolerable for server, because this will cause serial significant problem, such as this Platform server causes client huge with the rule of " valence is high preferential, time priority " in stock exchange, will be made to become visionary hope Loss.
In an assembling process, the control to crystal oscillator quality is generally all only simple to survey for existing server, looks at the time It is whether normal in a short time, without effectively detection and recognition methods.It thus cannot fundamentally solve crystal oscillator frequency drift Out the problem of range, it is unfavorable for enterprise's control material logistics cost, also will affect the satisfaction rate of client.
As Chinese patent (application publication number CN103634121A) discloses " it is a kind of improve reliability of dynamic token time System and method ", the system include dynamic token, crystal oscillator tester, computer and cipher server, and dynamic token has display Device, crystal oscillator tester have crystal oscillator inductive probe, and crystal oscillator tester is connect by first serial with computer, and computer passes through the second string Mouth is connect with dynamic token, and key server is connect with computer, and crystal oscillator tester is connected by crystal oscillator inductive probe and dynamic token Connect, wherein token time that the crystal oscillator deviation and key server of the dynamic token for detecting crystal oscillator inductive probe are sent and Token key generates token seed together, is sent to dynamic token to generate dynamic password.By means of the invention it is possible to guarantee just True time starting dynamic token generates dynamic password, to improve the reliability and stability of dynamic token time.The invention It is based primarily upon on crystal oscillator inductive probe and the crystal oscillator deviation of dynamic token is measured, so that dynamic token end can be accurate Dynamic password is generated in time, ensure that effective verifying of the dynamic password to user identity;But still effectively it can not detect and identify Crystal oscillator frequency drifts out the problem of range out.
Summary of the invention
Of the invention provides a kind of detection method of RTC crystal oscillator, for solving in the prior art, to what is installed in server The problem of RTC crystal oscillator working performance, crystal oscillator frequency drift out range no effectively detection and recognition methods, thus cannot be from root Prevent to be provided to marketing users with server product defective on this.
The present invention is achieved by the following technical programs:
A kind of detection method of RTC crystal oscillator, comprising the following steps:
S1: the setting of CMOS RAM state register A, B, C, and the number that will be read are read by I/O port (0*70) According to preservation;
S2: setting register A, it realizes that the interruption in test process can be issued and is continuously updated with clock;
S3: the interrupt flag bit in setting register B keeps alarm interrupt effective;
S4: the current CMOS time is read, start_time is denoted as;
S5: the CMOS time is tuned up;
S6: check alarm interrupt flag bit in register C whether effectively;
S7: setting alarm clock, which interrupts, to be issued;
S8: checking whether alarm interrupt issues, if issued, reads the CMOS time, is denoted as end_time;If end_ Time subtracts start_time and tunes up the time not equal to CMOS in step S5, then it represents that the concussion of RTC crystal oscillator is problematic;Conversely, Then indicate that the concussion of RTC crystal oscillator is qualified.
A kind of detection method of RTC crystal oscillator as described above in the step S8, is closed after testing in the concussion of RTC crystal oscillator When lattice, the data of status register A, B, C of the step S1 CMOS RAM saved are restored in corresponding register.
A kind of detection method of RTC crystal oscillator as described above, in the step S5, the CMOS time is tuned up 1~5 second.
The invention has the advantages that
1, the problem of crystal oscillator frequency drifts out range effectively can be detected and identify, to reduce our material logistics Cost, improve test coverage.
2, by the use of this method, it can effectively avoid the server flows that RTC crystal oscillator does not work into client's hand, cause Customer complaint, to increase customer satisfaction degree and reduce link, cost after sale.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described.
Fig. 1 is flow chart of the invention;
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention In attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is A part of the embodiment of the present invention, instead of all the embodiments.
As shown in Figure 1, a kind of detection method of RTC crystal oscillator of the present invention, comprising the following steps:
S1: the setting of CMOS RAM state register A, B, C, and the number that will be read are read by I/O port (0*70) According to preservation;
nativeReadCMOS(0x0a,&m_regA);
nativeReadCMOS(0x0b,&m_regB);
nativeReadCMOS(0x0c,&m_regC);
S2: setting register A, it realizes that the interruption in test process can be issued and is continuously updated with clock;
nativeReadCMOS(0x0a,&tmp);
nativeWriteCMOS(0x0a,tmp|0x0f);
S3: the interrupt flag bit in setting register B keeps alarm interrupt effective;
nativeReadCMOS(0x0b,&tmp);
nativeWriteCMOS(0x0b,tmp&0x02)
S4: the current CMOS time is read, start_time is denoted as;
readRTCTime(&startTime)
S5: the CMOS time is tuned up 1 second;
AddSecondToTime(&startTime,&m_alarmTimeCur,1)
S6: check alarm interrupt flag bit in register C whether effectively;
checkInterrupt(OpRtcFunc)
S7: setting alarm clock, which interrupts, to be issued;
S8: checking whether alarm interrupt issues, if issued, reads the CMOS time, is denoted as end_time;If end_ Time subtracted start_time not equal to 1 second, then it represents that the concussion of RTC crystal oscillator is problematic;Otherwise, it means that the concussion of RTC crystal oscillator is closed Lattice.
readRTCTime(&endTime)
Further, the present embodiment, when the concussion of RTC crystal oscillator is qualified after testing, step S1 is saved in step S8 CMOS RAM status register A, B, C data, be restored in corresponding register.
nativeWriteCMOS(0x0a,m_regA);
nativeWriteCMOS(0x0b,m_regB);
nativeWriteCMOS(0x0c,m_regC);
The technology contents of the not detailed description of the present invention are well-known technique.

Claims (3)

1. a kind of detection method of RTC crystal oscillator, which comprises the following steps:
S1: the setting of CMOS RAM state register A, B, C are read by the port I/O, and the data read are saved;
S2: setting register A, it realizes that the interruption in test process can be issued and is continuously updated with clock;
S3: the interrupt flag bit in setting register B keeps alarm interrupt effective;
S4: the current CMOS time is read, start_time is denoted as;
S5: the CMOS time is tuned up;
S6: check alarm interrupt flag bit in register C whether effectively;
S7: setting alarm clock, which interrupts, to be issued;
S8: checking whether alarm interrupt issues, if issued, reads the CMOS time, is denoted as end_time;If end_time subtracts Start_time is gone to tune up the time not equal to CMOS in step S5, then it represents that the concussion of RTC crystal oscillator is problematic;Otherwise, it means that The concussion of RTC crystal oscillator is qualified.
2. a kind of detection method of RTC crystal oscillator according to claim 1, which is characterized in that in the step S8, in RTC When crystal oscillator concussion is qualified after testing, by the data of status register A, B, C of the step S1 CMOS RAM saved, it is restored to phase In the register answered.
3. a kind of detection method of RTC crystal oscillator according to claim 1, which is characterized in that in the step S5, when CMOS Between tune up 1~5 second.
CN201710369759.0A 2017-05-23 2017-05-23 A kind of detection method of RTC crystal oscillator Active CN107219395B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710369759.0A CN107219395B (en) 2017-05-23 2017-05-23 A kind of detection method of RTC crystal oscillator

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710369759.0A CN107219395B (en) 2017-05-23 2017-05-23 A kind of detection method of RTC crystal oscillator

Publications (2)

Publication Number Publication Date
CN107219395A CN107219395A (en) 2017-09-29
CN107219395B true CN107219395B (en) 2019-06-18

Family

ID=59944335

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710369759.0A Active CN107219395B (en) 2017-05-23 2017-05-23 A kind of detection method of RTC crystal oscillator

Country Status (1)

Country Link
CN (1) CN107219395B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109782841B (en) * 2018-12-29 2020-09-11 百富计算机技术(深圳)有限公司 Real-time clock implementation method based on RTC chip, terminal equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5017801A (en) * 1989-03-23 1991-05-21 Siemens Aktiengesellschaft Method and apparatus for converting a gap-infested read-in clock into a gap-free read-out clock
CN102857197A (en) * 2012-09-22 2013-01-02 福州大学 Calibration method for improving frequency accuracy of built-in remote control (RC) oscillator
CN103105530A (en) * 2013-01-08 2013-05-15 河北远东通信系统工程有限公司 Detection method for frequency hopping changes of crystal oscillator
CN104122440A (en) * 2014-07-24 2014-10-29 中国电子科技集团公司第二十九研究所 Method for sensing crystal oscillator frequency shift

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5017801A (en) * 1989-03-23 1991-05-21 Siemens Aktiengesellschaft Method and apparatus for converting a gap-infested read-in clock into a gap-free read-out clock
CN102857197A (en) * 2012-09-22 2013-01-02 福州大学 Calibration method for improving frequency accuracy of built-in remote control (RC) oscillator
CN103105530A (en) * 2013-01-08 2013-05-15 河北远东通信系统工程有限公司 Detection method for frequency hopping changes of crystal oscillator
CN104122440A (en) * 2014-07-24 2014-10-29 中国电子科技集团公司第二十九研究所 Method for sensing crystal oscillator frequency shift

Also Published As

Publication number Publication date
CN107219395A (en) 2017-09-29

Similar Documents

Publication Publication Date Title
US9767291B2 (en) Systems and methods for security and risk assessment and testing of applications
CN109164786A (en) A kind of anomaly detection method based on time correlation baseline, device and equipment
US10147025B2 (en) Visual indicator status recognition
CA3125196A1 (en) System and method of filtering internet traffic via a client fingerprint
US9779265B1 (en) Encryption key effective date
US20150120914A1 (en) Service monitoring system and service monitoring method
US11003563B2 (en) Compliance testing through sandbox environments
US20150067153A1 (en) Remote monitoring of data facility in real-time using wireless sensor network
US10884059B2 (en) Determining the integrity of a computing device
CN109308421A (en) A kind of information tamper resistant method, device, server and computer storage medium
CN110224874A (en) A kind of processing method and processing device of equipment fault
US20200252317A1 (en) Mitigating failure in request handling
CN107219395B (en) A kind of detection method of RTC crystal oscillator
US9158614B2 (en) Service management device, display method, and information storage medium
CN109254922A (en) A kind of automated testing method and device of server B MC Redfish function
CN110336770A (en) Method, apparatus, equipment and the storage medium of long-range monitoring loophole
US7890444B2 (en) Visualization of data availability and risk
KR102192038B1 (en) A method for managing a real-time clock in a portable anti-counterfeiting device
JP4786392B2 (en) Event information management system
CN106933858B (en) Page source statistical method and view controller
CN109995706A (en) A kind of method, apparatus of security audit, electronic equipment and storage medium
JP5102555B2 (en) Log analysis support device
CN109635552A (en) Electronic equipment identity information verification method and device
WO2017169323A1 (en) Information processing device, information processing method, and non-transitory computer-readable medium
EP3575750A1 (en) Network monitoring and control of data logging apparatus

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