The invention discloses an RTC
crystal oscillator detection method. The method comprises steps that setting of state registers A, B and C is read, and the read data is saved; interruption flag bits of the register A and the register B are set, so interruption of an
alarm clock is made to be valid; the present
CMOS time is read and is marked as start_time; the
CMOS time is set one second faster; whether an interruption flag bit of the
alarm clock is valid in the register C is checked; interruption of the
alarm clock is set and emitted; whether interruption of the alarm
clock is emitted is checked, if yes, the
CMOS time is read and is marked as end_time; if (end_time)-(start_time) is not equal to 1, shock of the RTC
crystal oscillator is proved to be in a fault, otherwise, shock of the RTC
crystal oscillator is qualified. The method is advantaged in that the method is convenient for operation, a problem that frequency of the
crystal oscillator drifts out of the scope can be effectively detected and identified, material management cost is reduced, and a test coverage rate is improved.