| In this paper, a design of achieve the clock synchronization by using IEEE1588standard is proposed. The design can communicate with distributed control system via Ethernet. It can solve the problem of real-time not high in Ethernet. This pape make a comparison with conventional method and introduce the advantages of using IEEE1588protocol to achieve high accuracy. Designed a high-precision clock synchronization server system. This system can achieve100ns expectations.Fist,the paper describes the key technologies of the IEEE1588standard. Including data type,clock synchronization model,the PTP message type,clock synchronization mechanism and clock correction calculation method. Then,chosen freescale latest microprocessor K60based on the ARM Cortex-M4core as controller,combined with DP83640PHY chip to build the foundation of IEEE1588hardware. Choicing embedded real-time systems MQX introduced by freescale to manage the various tasks and allocation of resources. RTCS protocol stack provides the foundation for server network communication. The last,described in detail of the design of the system software,including GPS time information packets receive and parse,the synchronization process message send and receive function.Testing and summary the design at the end of the paper,first,using wireshark network packet capture tools crawl communication message,the correctness of the analysis of the synchronization process communication data,then analysis the master and slave clock synchronization accuracy.the results show that the clock synchronization error reached the sub-microsecond level. Pointing out the method of design deficiencies and improved method. |