Functional Description
5. Byte 23 contains 0x11 (UDP Fixed).
6. Byte 30 contains decimal 224 (0xe0).
7. Byte 31 contains 0x00.
8. Byte 32 contains 0x01.
9. Byte 33 contains one of the following:
•
Decimal 129 and the pX_ts_129 bit in the switch Px_Control register is set
•
Decimal 130 and the pX_ts_130 bit in the switch Px_Control register is set
•
Decimal 131 and the pX_ts_131 bit in the switch Px_Control register is set
•
Decimal 129 and the pX_ts_132 bit in the switch Px_Control register is set
10. Bytes 36 and 37 contain one of the following:
•
Decimal 0x01 and 0x3f respectively and and the pX_ts_319 bit in the switch Px_Control register is
set.
•
Decimal 0x01 and 0x40 respectively and and the pX_ts_320 bit in the switch Px_Control register is
set.
11. The PTP message begins in byte 42.
12. The packet message type is enabled in the pX_ts_msg_type_en field in Px_Control.
13. The packet was received without error (not long/short/mac_ctl/crc/code/align).
14. The ALE determined that the packet is to be sent only to the host (port 0).
14.3.2.2.2 IEEE 1588v2 Transmit Packet Operation
There are two CPSW_3G transmit time sync interfaces for each ethernet port. The first is the TS_TX_DEC
interface and the second is the TS_TX_MII interface. Both interfaces are generated in the switch and are
input to the CPTS module. The pX_ts_tx_en bit in the Px_Control register must be set for transmit time
sync operation to be enabled.
The TS_TX_DEC function decodes each packet to be transmitted and determines if the packet meets the
time sync event packet criteria. If the packet is determined to be a time sync event packet, then the time
sync event is signaled to the CPTS controller via the TS_TX_DEC interface (pX_ts_tx_dec_evnt,
pX_ts_tx_dec_hndl[3:0], pX_ts_tx_dec_msg_type, pX_ts_tx_dec_seq_id). The event signal is a single
clock pulse indicating that the packet matched the time sync event packet criteria and that the associated
packet handle, message type, and sequence ID are valid.
The 16-bit sequence ID is found in the time sync event packet at the sequence ID offset into the message
header (pX_ts_seq_id_offset). No indication is given for transmit packets that do not meet the time sync
event criteria. The time sync event packet handle is also passed along with the packet to the TS_TX_MII
with an indication that the packet is a time sync event packet. Unlike receive, only transmit event packets
increment the handle value. The decode function is separated from the record function because some
systems may encript the packet. The encription is after the decode function on transmit (egress). A packet
is determined to be a transmit event packet if the following is met:
14.3.2.2.2.1 Annex F
1. Transmit time sync is enabled (pX_ts_tx_en is set in the switch Px_Control register).
2. One of the following sequences is true:
•
The first packet ltype matches ts_ltype1 and pX_ts_ltype1_en is set
•
The first packet ltype matches ts_ltype2 and pX_ts_ltype2_en is set
•
The first packet ltype matches vlan_ltype1 and pX_vlan_ltype1_en is set and the second packet
matches ts_ltype1 and pX_ts_ltype1_en is set
•
The first packet ltype matches vlan_ltype1 and pX_vlan_ltype1_en is set and the second packet
ltype matches ts_ltype2 and pX_ts_ltype2_en is set
•
The first packet ltype matches vlan_ltype2 and pX_vlan_ltype2_en is set and the second packet
ltype matches ts_ltype1 and pX_ts_ltype1_en is set
•
The first packet ltype matches vlan_ltype2 and pX_vlan_ltype2_en is set and the second packet
1184
Ethernet Subsystem
SPRUH73H – October 2011 – Revised April 2013
Copyright © 2011–2013, Texas Instruments Incorporated