The invention discloses a method for switching main and
backup clocks, which is applied to a
system comprising a main
clock board and a
backup clock board.
Clock generation chips of the main
clock board and the
backup clock board respectively track a common-frequency clock source of the respective clock board; the mutual transmission of the main and backup clocks and data is achieved through respective logic chips; when the main and backup clocks are to be switched, a pre-switching instruction is sent to the logic
chip of the main clock board, and after receiving the instruction, the logic
chip of the main clock board sends a synchronous instruction to the logic
chip of the backup clock board; after receiving the synchronous instruction, the logic chip of the backup clock board sends an effective synchronous
signal in a pulse form to the clock generation chip of the backup clock board; and the clock generation chip of the backup clock board stops the clock output when the synchronous
signal is effective, and restores the clock output after first
delay time when the synchronous
signal is not effective, phase positions of the main and backup clocks are aligned, and the main and backup clocks are instructed to execute main and backup switching. The method cannot cause phase position transient variation, unstable
system and poor reliability due to the switching, and simultaneouslyhas less occupied resources.