1 Introduction
10BASE‑T1S networks enable system designers to expand standard Ethernet networks to include low-bandwidth devices on multidrop networks. These devices were previously connected via a variety of interfaces, such as CAN, LIN and RS-485, each of which requires specialized gateways to bring their data into the Ethernet ecosystem. An advantage of standardization is the ability to use existing software stacks which provide additional features that are built upon Ethernet. One of these key features available for Ethernet based systems is support for time aware networks, which enables clock synchronization and precision timestamps across multiple network segments. In particular, IEEE Std 1588 describes version 2 of the Precision Time Protocol, PTPv2, for precision clock synchronization in a time-aware system.
IEEE Std 1588 can be implemented in a variety of profiles which describe sets of standards including combinations of optional features optimized for different end applications. One common profile described in IEEE Std 802.1AS specifies a generalized Precision Time Protocol (gPTP) profile, which is also the profile used by Ethernet Audio/Video Bridging (AVB). The generalized precision time protocol is often used synonymously with PTP and with time sensitive networking, but it is only a subset of possible options.
A time-aware system consists of one or more network segments containing endpoints connected by bridges. The endpoint with the best clock is known as the grandmaster; gPTP allows the grandmaster’s clock to be distributed across the network. The grandmaster is connected to a time aware bridge via a point-to-point connection. The bridge can connect to other time sensitive bridges or connect with time sensitive endpoints. In Figure 1-1, the grandmaster is connected to bridge A. Bridge A will synchronize its clock directly to the grandmaster. Bridge A is connected to bridges B and C as well as endpoint E and all 3 synchronize their clocks to bridge A. Because bridge A is synchronized to the grandmaster, B, C and E are also synchronized to the grandmaster. Any devices connected to ports of Bridge B will synchronize their clocks to the clock of Bridge B. Any devices connected to Bridge C, in this case F, G and H, will synchronize their clocks to Bridge C. This method is called a peer-to-peer synchronization scheme. IEEE Std 802.1AS ensures synchronization accuracy of 1 ms or better between the grandmaster and endpoints separated by up to six bridges using this synchronization method.
In any time-aware network, any time-aware bridge will have one port which the bridge will use to synchronize its wall clock. This port is connected to a clock source, which can be the grandmaster or another time-aware bridge. The PTP protocol is used to convey the timestamps necessary for synchronization. For bridge A in Figure 1-1, the clock source is the grandmaster, while for bridges B and C, the clock source is bridge A. Clock sources can also be called clock transmitters. When distinguishing a single link of this chain, a clock source may be called a local clock source, as in bridge A is the local clock source for bridge C or bridge C is the local clock source for endpoint F.
A time-aware bridge synchronizes it clock from a clock source on one port, and acts as a clock source for its other ports. Each output port can be connected to either endpoints or other bridges. The bridge will uses its wall clock, calculates delays from both the network and internal sources and uses that calculation to generate the correct timestamps and correction fields required for the PTP protocol. A device that is not a clock source can be called a clock sink or a clock receiver. Bridges are clock sinks on the port that is connected to the clock source, but clock sources on other ports. The orange arrows in Figure 1-1 use a circle to indicate the clock source for a particular connection and an arrow to indicate the clock sink.
Full implementation of IEEE 802.1AS requires software implementation of a large number of protocols and often takes advantage of special hardware features like priority queuing. Controllers which support these features are more expensive than is otherwise needed for a simple sensor, actuator or LED driver. As an alternative, Figure 1-2 shows a very simple example of a network containing nodes based on the LAN8650/1, where each device's local wall clock can be synchronized to provide timestamping for local events. Here, the time aware bridge is shown in three parts: the time aware station controller and its two Ethernet interfaces. The bridge's wall clock acts as the local clock source for the mixing segment: it provides the messages that enable the minimally time aware devices on the mixing segment to synchronize their wall clocks. The time aware station controller can optionally synchronize its wall clock from an external grandmaster using IEEE 802.1AS, in which case this controller requires hardware support for time sensitive networking, such as MAC timestamping and priority queues. The minimally time aware systems in the figure are simple microcontrollers. They are assumed to have slower clock speeds and small memories, and will have no hardware support design to assist with time sensitive networking. This application note will show how these small devices can still have clocks synchronized to the local clock source, including description of necessary software.
