Intel® IXP400 Software

Access-Layer Components: Time Sync (IxTimeSyncAcc) API

Internal errors

IxTimeSyncAcc returns IX_SUCCESS when errors are not observed. The client application is expected to handle these errors/values appropriately.

20.4IxTimeSyncAcc API Usage Scenarios

The following scenarios present usage examples of the interface by a client application. They are each independent but, depending on the needs of the client application, could be intermixed.

20.4.1Polling for Transmit and Receive Timestamps

The IEEE 1588 Hardware Assist block detects a PTP message and then sets an event flag. The client application may poll for receive and/or transmit timestamps before or after the actual Sync/ Delay_Req message detection, which sets the event flags. The timestamps returned are valid only when the respective event flags are set. After the valid timestamps are retrieved, the event flags are cleared to allow for capturing new timestamps.

The IEEE 1588 Hardware Assist block indicates the availability of transmit and receive timestamps on the MII interfaces through events only. In other words, interrupts are not defined for these conditions (unlike the auxiliary timestamps and target time reached conditions, described later). The client application has to poll for these events to obtain the timestamps.

Figure 97 presents the timestamp polling flow.

.

Figure 97. Polling for Timestamps of Sync or Delay_Req

Client Application

 

IxTimeSyncAcc

 

 

 

 

 

ixTimeSyncAccSystemTimeSet (systemTime)

ixTimeSyncAccTickRateSet (tickRate)

ixTimeSyncAccPTPPortConfigSet(ptpPort,ptpPortMode)

ixTimeSyncAccPTPRxPoll (ptpPort,*ptpMsgData)

ixTimeSyncAccPTPTxPoll (ptpPort,*ptpMsgData)

IEEE 1588 Hardware Assist Block

Set system time

Set frequency scaling factor

Set port mode - Master/Slave

Sync/Delay_Req detected(Sent and/or Received)

Set event flags for sent and/or received system time snapshot

Get receive snapshot data for Port #n

Get transmit snapshot data for Port #n

B4393-01

20.4.2Interrupt Mode Operations

The IxTimeSyncAcc component uses a single interrupt on IXP46X network processors to provide the client application with Target Time hit conditions or Auxiliary Master/Slave Timestamps. It implements the following priority order when the interrupt is asserted to the Intel XScale core:

1. Target Time Reached/Hit Condition

April 2005

IXP400 Software Version 2.0

Programmer’s Guide

290

Document Number: 252539, Revision: 007

 

Page 290
Image 290
Intel IXP400 IxTimeSyncAcc API Usage Scenarios, Polling for Transmit and Receive Timestamps, Interrupt Mode Operations