随着网络化与分布式系统的应用,对系统各节点间的时钟同步精度要求越来越高,尤其在分布式运动控制中,高精度时钟同步更是一切应用的基础.针对此问题,首先分析了IEEE 1588时钟同步的基本原理,并从理论上深入研究了影响时钟同步的关键因素,经过综合分析对比各实现方案的优劣,创新性提出了具有较高性价比的基于STM32F107VC的IEEE 1588实现方案,通过捕获硬件时间戳和校正频率漂移,在自定义协议中实现了低于300 ns的高精度时钟同步.%A higher precision of clock synchronization is needed with the development of network and distributed system, and especially the high-precision clock synchronization is the foundation of all applications in a distributed "motion control system. The basic principle of IEEE 1588 standard is introduced, and the key factors which affect the clock synchronization are studied theoretically. Through comparison of various methods, the best cost-effective implementation based on STM32F107VC microprocessor is decided, and the high precision clock synchronization below 300ns is realized by capturing hardware time stamp and adjusting frequency drift.
展开▼