09.12.2012 Views

RM0090: Reference manual - STMicroelectronics

RM0090: Reference manual - STMicroelectronics

RM0090: Reference manual - STMicroelectronics

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Ethernet (ETH): media access control (MAC) with DMA controller <strong>RM0090</strong><br />

Figure 342. Networked time synchronization<br />

1. The master broadcasts PTP Sync messages to all its nodes. The Sync message<br />

contains the master’s reference time information. The time at which this message<br />

leaves the master’s system is t1 . For Ethernet ports, this time has to be captured at the<br />

MII.<br />

2. A slave receives the Sync message and also captures the exact time, t2 , using its<br />

timing reference.<br />

3. The master then sends the slave a Follow_up message, which contains the t1 information for later use.<br />

4. The slave sends the master a Delay_Req message, noting the exact time, t3 , at which<br />

this frame leaves the MII.<br />

5. The master receives this message and captures the exact time, t4 , at which it enters its<br />

system.<br />

6. The master sends the t4 information to the slave in the Delay_Resp message.<br />

7. The slave uses the four values of t1 , t2 , t3 , and t4 to synchronize its local timing<br />

reference to the master’s timing reference.<br />

Most of the protocol implementation occurs in the software, above the UDP layer. As<br />

described above, however, hardware support is required to capture the exact time when<br />

specific PTP packets enter or leave the Ethernet port at the MII. This timing information has<br />

to be captured and returned to the software for a proper, high-accuracy implementation of<br />

PTP.<br />

<strong>Reference</strong> timing source<br />

Master clock time Slave clock time<br />

To get a snapshot of the time, the core requires a reference time in 64-bit format (split into<br />

two 32-bit channels, with the upper 32 bits providing time in seconds, and the lower 32 bits<br />

indicating time in nanoseconds) as defined in the IEEE 1588 specification.<br />

The PTP reference clock input is used to internally generate the reference time (also called<br />

the System Time) and to capture time stamps. The frequency of this reference clock must<br />

935/1416 Doc ID 018909 Rev 3<br />

t 1<br />

t 2m<br />

t 3m<br />

t 4<br />

Sync message<br />

Delay_Req message<br />

Follow_up message<br />

containing value of t1<br />

Delay_Resp message<br />

containing value of t4<br />

time<br />

t 2<br />

t 3<br />

Data at<br />

slave clock<br />

t 2<br />

t 1 , t 2<br />

t 1 , t 2 , t 3<br />

t 1 , t 2 , t 3 , t 4<br />

ai15669

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!