Functional Description
Software has the option of processing more than a single event from the event FIFO in the interrupt
service routine in the following way:
1. Enable the TS_PEND interrupt by setting the TS_PEND_EN bit of the CPTS_INT_ENABLE register.
2. Upon interrupt enter the CPTS service routine.
3. Read the CPTS_EVENT_LOW and CPTS_EVENT_HIGH register values.
4. Set the EVENT_POP bit of the CPTS_EVENT_POP register to pop the previously read value off of the
event FIFO.
5. Wait for an amount of time greater than eight CPTS_RFT_CLK periods
6. Read the ts_pend_raw bit in the CPTS_INTSTAT_RAW register to determine if another valid event is
in the event FIFO. If it is asserted then goto step 3. Otherwise goto step 7.
7. Process the interrupt(s) as required by the application software
Software also has the option of disabling the interrupt and polling the ts_pend_raw bit of the
CPTS_INTSTAT_RAW register to determine if a valid event is on the event FIFO.
14.3.8 MDIO
The MII Management I/F module implements the 802.3 serial management interface to interrogate and
control two Ethernet PHYs simultaneously using a shared two-wire bus. Two user access registers to
control and monitor up to two PHYs simultaneously.
14.3.8.1 MII Management Interface Frame Formats
The following tables show the read and write format of the 32-bit MII Management interface frames,
respectively.
Table 14-22. MDIO Read Frame Format
Operatio
Preamble
Start Delimiter
PHY Address
Register Address
Turnaround
Data
n Code
0xFFFFF
DDDD.DDDD.DDD
01
10
AAAAA
RRRRR
Z0
FFF
D.DDDD
Table 14-23. MDIO Write Frame Format
Operatio
Preamble
Start Delimiter
PHY Address
Register Address
Turnaround
Data
n Code
0xFFFFF
DDDD.DDDD.DDD
01
00
AAAAA
RRRRR
10
FFF
D.DDDD
The default or idle state of the two wire serial interface is a logic one. All tri-state drivers should be
disabled and the PHY’s pull-up resistor will pull the MDIO line to a logic one. Prior to initiating any other
transaction, the station management entity shall send a preamble sequence of 32 contiguous logic one
bits on the MDIO line with 32 corresponding cycles on MDCLK to provide the PHY with a pattern that it
can use to establish synchronization. A PHY shall observe a sequence of 32 contiguous logic one bits on
MDIO with 32 corresponding MDCLK cycles before it responds to any other transaction.
Preamble
The start of a frame is indicated by a preamble, which consists of a sequence of 32 contiguous bits all of
which are a “1”. This sequence provides the PHY a pattern to use to establish synchronization.
Start Delimiter
The preamble is followed by the start delimiter which is indicated by a “01” pattern. The pattern assures
transitions from the default logic one state to zero and back to one.
Operation Code
The operation code for a read is “10”, while the operation code for a write is a “00”.
PHY Address
1233
SPRUH73H – October 2011 – Revised April 2013
Ethernet Subsystem
Copyright © 2011–2013, Texas Instruments Incorporated