Functional Description
14.3.7.2.4.5.2 Ethernet Port Transmit Event
Each ethernet port can generate a transmit ethernet event. Transmit ethernet events are generated for
valid transmitted time sync packets. There are two CPTS interfaces for each ethernet transmit port. The
first is the Px_TS_TX_DEC interface and the second is the Px_TS_TX_MII interface. Information from
these interfaces is used to generates an ethernet transmit event for each ethernet time sync packet
transmitted on the associated port.
Valid ethernet transmit time sync events are signaled to the CPTS via the Px_TS_TX_DEC interface.
When the pX_ts_tx_dec_evnt signal is asserted, a valid time sync event has been detected and will be
loaded into the event FIFO. Only valid transmit time sync packets are indicated on the Px_TS_RX_DEC
interface. The pX_ts_tx_dec_hndl, pX_ts_tx_dec_msg_type, pX_ts_tx_dec_seq_id signals are registered
on an asserted pX_ts_tx_dec_evnt.
The time stamp for the event will be generated and signaled from the Px_TS_TX_MII interface when the
packet is actually transmitted. The event will be loaded into the event FIFO when the time stamp is
recorded as controlled by the Px_TS_TX_MII interface. The handle value is incremented with each time
sync event packet and rolls over to zero after 7. There are 8 possible handle values so there can be a
maximum of 8 time sync event packets “in flight” from the TS_TX_DEC to the TS_TX_MII block at any
given time. The handle value increments only on time sync event packets.
The Px_TS_TX_MII interface issues a single clock record signal (pX_ts_tx_mii_rec) at the beginning of
each transmitted packet. If the packet is a time sync event packet then a single clock event signal
(pX_ts_tx_mii_evnt) along with a handle (pX_ts_rx_mii_hndl) will be issued before the next record signal
for the next transmitted packet. The event signal will not be issued for packets that were not indicated as
valid time sync event packets on the Px_TS_TX_DEC interface. If consecutive record indications occur
without an interleaving event indication, then the packet associated with the first record was not a time
sync event packet. The record signal is a single clock pulse indicating that a transmit packet egress has
been detected at the associated port MII interface.
Table 14-21. Values of messageType field
Message Type
Value (hex)
Sync
0
Delay_Req
1
Pdelay_Req
2
Pdelay_Resp
3
Reserved
4-7
Follow_Up
8
Delay_Resp
9
Pdelay_Resp_Follow_Up
A
Announce
B
Signaling
C
Management
D
Reserved
E-F
14.3.7.3 Interrupt Handling
When an event is push onto the Event FIFO, an interrupt can be generated to indicate to software that a
time sync event occurred. The following steps should be taken to process time sync events using
interrupts:
•
Enable the TS_PEND interrupt by setting the TS_PEND_EN bit of the CPTS_INT_ENABLE register.
•
Upon interrupt, read the CPTS_EVENT_LOW and CPTS_EVENT_HIGH register values.
•
Set the EVENT_POP field (bit zero) of the CPTS_EVENT_POP register to pop the previously read
value off of the event FIFO.
•
Process the interrupt as required by the application software
1232
Ethernet Subsystem
SPRUH73H – October 2011 – Revised April 2013
Copyright © 2011–2013, Texas Instruments Incorporated