Cirrus Logic EP93xx User Manual

Page 314

Advertising
background image

9-12

DS785UM1

Copyright 2007 Cirrus Logic

1/10/100 Mbps Ethernet LAN Controller
EP93xx User’s Guide

9

9

9

most PHYs require a preamble for access to the PHY's registers. However, to be safe, check
PHY's data sheet to determine if a preamble is needed to read/write PHY registers.

9.1.4.11.1 Steps for Reading From the PHY Registers.

1. Read the value from the SelfCtl Register.

2. Since most PHYs need a Preamble for the MAC to read/write the PHY registers, you

may need to clear the PreambleSuppress bit.

3. Ensure that the PHY is not busy by polling the MIIStatus_Busy Bit in MIIStatus register.

4. Issue the command to read the register within the PHY.

5. Wait until the read command is completed. Determine this by polling the MIIStatus_Busy

bit in MIIStatus register.

6. Get the PHY data from the MII Data register.

7. Restore the old value to SelfCtl register.

Note: Steps 1, 2, and 7 are not required if the PHY doesn't need a preamble for access to the

PHY's registers.

9.1.4.11.2 Steps for Writing To the PHY Registers.

1. Read the value from SelfCtl register.

2. Since most PHYs need a Preamble for the MAC to read/write the PHY registers, you

may need to clear the PreambleSuppress bit.

3. Ensure that the PHY is not busy by polling the MIIStatus_Busy bit in MIIStatus register.

4. Put the PHY data into the PHY Data register

5. Issue the write command to write data to the register within the PHY

6. Wait until the write command is completed. Determine this by polling the MIIStatus_Busy

Bit in MIIStatus Register.

7. Restore the old value to SelfCtl register.

Note: Steps 1, 2, and 7 are not required if the PHY doesn't need a preamble for access to the

PHY's registers.

9.1.4.11.3 Steps for PHY Auto-negotiation

1. Write to the Auto-Negotiation Advertisement register (0x04). Set it in accordance with

IEEE_802.3 standard, and advertise 100/10M full/half duplex available.

2. Write to Basic Mode Control Register (0x00), to enable and restart Auto-Negotiation.

3. Poll bit Auto_Neg_Complete in the BMSR register in the PHY until the Auto-Negotiation

is complete.

Advertising