SMSC LAN91C111 32/16/8-Bit Three-In-One Fast Ethernet Controller

9.7EPH Loopback Test

The following steps will transmit a packet and loop it back through the EPH (Ethernet Protocol Handler) block and back to the MAC.

Set the transmitter (EPH LOOP, TXENA)

Write 0x2001 to the TRANSMIT CONTROL register (bank 0, offset 0) Set the receiver (RXEN)

Write 0x0100 to the RECEIVE CONTROL register (bank 0, offset 4) Set the CONTROL register to receive bad packets

Set the RCV_BAD bit (bit 14) in the CONTROL register (bank 1, offset C)

Transmit a packet (perform Section ý9.3 - Transmitting A Packet, page 59, but omit “Turn on transmitter”) Receive the packet (perform Section ý9.5 - Receiving A Packet, page 60, but omit “Turn on receiver”)

If the packet is not received within 100ms after transmission or the packet is received with errors, the EPH loopback failed.

9.8PHY Loopback Test

The following steps will transmit a packet out of the MAC, into the PHY, looped through the PHY and back to the MAC (it does not leave the PHY or go out on the wire).

Set the transmitter (FDUPLX, TXENA)

Write 0x0801 to the TRANSMIT CONTROL register (bank 0, offset 0) Set the receiver (RXEN)

Write 0x0100 to the RECEIVE CONTROL register (bank 0, offset 4) Set the CONTROL register to receive bad packets

Set the RCV_BAD bit (bit 14) in the CONTROL register (bank 1, offset C) Set the internal PHY

Set the LPBK bit (bit 14) in the PHY CONTROL register (offset 0)

Transmit a packet (perform Section ý9.3 - Transmitting A Packet, page 59, but omit “Turn on transmitter”) Receive the packet (perform Section ý9.5 - Receiving A Packet, page 60, but omit “Turn on receiver”)

If the packet is not received within 100ms after transmission or the packet is received with errors, the PHY loopback failed.

9.9External Loopback Test

This test transmits a packet out the MAC, through the PHY, out on the wire, looped back through the PHY and MAC.

Create a loopback plug by wiring a RJ45 plug as follows:

„Pin 1 to pin 3

„Pin 2 to pin 6

„Pin 3 to pin 1

„Pin 6 to pin 2

Insert the RJ45 loopback plug onto the board under test (if equipped). Repeat Section ý9.8 - PHY Loopback Test, page 62, but omit “Set the internal PHY.”

SMSC AN 9.6

53

Revision 1.0 (08-14-08)

APPLICATION NOTE