element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Wireless
  • Technologies
  • More
Wireless
Forum 利用IEEE 1588和Blackfin嵌入式处理器实现设备时钟同步
  • Blog
  • Forum
  • Documents
  • Polls
  • Quiz
  • Events
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Wireless to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 0 replies
  • Subscribers 220 subscribers
  • Views 88 views
  • Users 0 members are here
  • 设备时钟同步
  • blackfin
  • 1588
  • 嵌入式处理器
  • ieee
Related

利用IEEE 1588和Blackfin嵌入式处理器实现设备时钟同步

铁丝19
铁丝19 over 14 years ago

来源;END  china  ADI公司 Jiang Wu | Robert Peloquin

 

简介

  IEEE 1588标准诞生于2002年,主要定义网络分布式时钟的同步协议。测试与测量、电信和多媒体流处理等许多不同应用,都开始首选这种时钟同步方法。这种标准化时钟同步法成本效益高,支持异构系统,并可提供纳秒级同步精度。

  本文介绍原版IEEE 1588-2002标准以及更新版本IEEE 1588-2008中的改进内容。由于IEEE 1588在一些目标应用中越来越重要,因此ADSP-BF5181BlackfinRegistered嵌入式处理器中也集成专用硬件来支持IEEE 1588。本文将概要介绍其功能,并通过一个示例来展示利用ADSP-BF518处理器解决方案获得的时钟同步性能结果。

  现在几点了?

  大多数系统都需要利用本振来维护自己的时间概念。图1显示硬件和软件如何组合,在系统内产生时间信息。

   

image

  图1. 本地计时

  系统内的硬件和软件资源均可使用此时间信息。对于硬件,振荡器时钟会产生一个或多个物理时钟信号(时钟输出),并可利用这些时钟信号驱动或触发系统的其它部分。软件中维护的时间通常称为“系统时间”。系统时间可以用时钟脉冲数或秒/纳秒的形式表示。系统软件利用振荡器时钟脉冲数及其频率信息得出时间,并提供“应用程序编程接口”(API)函数,软件的其它部分可以使用这些函数检索并设置时间。如果需要绝对时间,则所提供的时间将与预定义时间点,即基准时间点相关联。

  时钟同步

  许多应用要求两台独立的设备以同步方式工作。如果每台设备仅依靠自己的振荡器,则各振荡器的特性与工作条件差异将会限制时钟同步工作的能力。一些简单可行的解决方案可以克服这些限制,包括:

  所有设备共用一个物理振荡器。这种方法仅对距离很近的分布式系统可行;高频时钟信号无法实现长距离可靠传输。
所有设备均使用特性几乎完全相同的振荡器。由于很难获得几乎完全一样的振荡器,并确保性能不随时间飘移,因此这种方法不可行。更重要的是,各振荡器的工作条件并不相同。
如果所有设备均通过一个通信网络(例如以太网)互连,则这些设备可以通过网络交换时间消息,根据单个“主”时钟动态调整各自的时钟。利用传统的时间同步协议——“网络时间协议”(NTP),系统中的每台设备根据它从NTP时间服务器获取的时间信息调整其时钟。然而,该协议只能实现毫秒级同步精度。
IEEE 1588定义了一个新协议,能够实现纳秒级同步精度。下面讨论该标准如何实现这种水平的时钟同步。

  IEEE 1588有何作用

  IEEE 1588标准定义了一种时间同步协议,适用于地理位置分散但通过某种通信技术(例如以太网)互连的设备。设备之间通过交换时序消息,从而保持相同的绝对系统时间(用秒和纳秒表示)。

  要实现此目标,一个直观的方法是将一台具有“最佳”(最精确)时钟的设备指定为“主时钟”设备,让它向其它设备广播其时间。其它设备将会调整各自的时间,与主时钟所发送的时间保持一致。不过,这种解决方案也有几点不足:

  主时钟设备无法以极短的间隔广播时间,因此“从”时钟设备必须使用自己独立的“低劣”振荡器,在主时钟设备的两次广播之间插入时间点。这将导致主时钟更新周期之间的同步精度下降。
广播路径难免存在延迟,延迟幅度取决于通信技术,例如物理信号沿导线从一台设备传输至另一台设备所需的时间。这种延迟会进一步扩大主时钟与各从时钟之间的失调。
主时钟设备与各从时钟设备之间的广播路径存在差异,这会进一步降低各从时钟设备之间的同步精度。
IEEE 1588要求通过测量路径延迟,解决第二个和第三个问题。它还要求待调整的从时钟与主时钟保持步调一致,从而减轻第一个问题。如果可能,使用更小的广播间隔和更高质量的振荡器,可以进一步减轻第一个问题。

  IEEE 1588如何测量通信延迟

  IEEE 1588-20022 定义了四种消息Sync、Followup、DelayReq和DelayResp,用来测量前向(主时钟至从时钟)和后向(从时钟至主时钟)路径的通信延迟。更新版本IEEE 1588-2008,3还提供其它机制,新增三种消息:PdelayReq、PdelayResp和 PdelayRespFollowup来测量“点对点延迟”。

  这些消息中,Sync、DelayReq、PdelayReq和PdelayResp是所谓“事件”消息,在离开和到达一台设备时必须加上“时间戳”(记录本地时间)。给分组加上时间戳的方法有两种:

  1. 消息由软件处理时出现软件时间戳。通常出现在消息的接收/发送“中断服务程序”(ISR)中,该时间戳为系统时间的当前值。

  2. 消息实际到达或离开设备时出现硬件时间戳。该时间戳操作由硬件执行,硬件会维护自己的连续时间信息。

  两种时间戳方法均为IEEE 1588所接受,但硬件时间戳的精度明显更高,如下文所述。

  • Sign in to reply
  • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube