PIC18F97J60 FAMILY
DS39762A-page 242
Advance Information
2006 Microchip Technology Inc.
18.6
Duplex Mode Configuration and
Negotiation
The Ethernet module does not support Automatic
Duplex mode negotiation. If it is connected to an auto-
matic duplex negotiation enabled network switch or
Ethernet controller, the module will be detected as a
half-duplex device. To communicate in full duplex, the
module and the remote node (switch, router or Ethernet
controller) must be manually configured for full-duplex
operation.
18.6.1
HALF-DUPLEX OPERATION
The Ethernet module operates in Half-Duplex mode
when the FULDPX (MACON3<0>) and PDPXMD
(PHCON1<8>) bits are cleared (=
0
). If only one of
these two bits is set, the module will be in an indetermi-
nate state and not function correctly. Since switching
between Full and Half-Duplex modes may result in this
indeterminate state, the application should not transmit
any packets (maintain the TXRTS bit clear), and
disable packet reception (maintain the RXEN bit clear)
during this period.
In Half-Duplex mode, only one Ethernet controller may
be transmitting on the physical medium at any time. If
the application requests a packet to be transmitted by
setting the TXRTS bit while another Ethernet controller
is already transmitting, the Ethernet module will delay,
waiting for the remote transmitter to stop. When it
stops, the module will attempt to transmit its packet.
Should another Ethernet controller start transmitting at
approximately the same time, the data on the wire will
become corrupt and a collision will occur.
The hardware will handle this condition in one of two
ways. If the collision occurs before the number of bytes
specified by the “Collision Window” in MACLCON2 were
transmitted, the TXRTS bit will remain set, the transmit
error interrupt will occur, a random exponential backoff
delay will elapse, as defined by the IEEE 802.3 specifica-
tion, and then a new attempt to transmit the packet from
the beginning will occur. The application will not need to
intervene. If the number of retransmission attempts
already matches the “Retransmission Maximum”
(RETMAX) defined in MACLCON1, the packet will be
aborted and the TXRTS bit will be cleared. The applica-
tion will then be responsible for taking appropriate action.
The application will be able to determine that the packet
was aborted instead of being successfully transmitted by
reading the TXABRT flag. For more information, see
Section 18.5.2 “Transmitting Packets”
.
If the collision occurs after the number of bytes speci-
fied by the “Collision Window” in MACLCON2 were
transmitted, the packet will be immediately aborted
without any retransmission attempts. Ordinarily, in
802.3 compliant networks which are properly config-
ured, this late collision will not occur. User intervention
may be required to correct the issue. This problem may
occur as a result of a full-duplex node attempting to
transmit on the half-duplex medium. Alternately, the
module may be attempting to operate in Half-Duplex
mode while it may be connected to a full-duplex
network. Excessively long cabling and network size
may also be a possible cause of late collisions.
When set in Half-Duplex mode, the Reset default
configuration will loop transmitted packets back to
itself. Unless the receive filter configuration filters these
packets out, they will be written into the circular receive
buffer just as any other network traffic. To prevent this,
set the HDLDIS bit.
18.6.2
FULL-DUPLEX OPERATION
The Ethernet module operates in Full-Duplex mode
when the FULDPX and PDPXMD bits are both set
(=
1
). If only one of these two bits is clear, the module
will be in an indeterminate state and not function
correctly. Again, since switching between Full and
Half-Duplex modes may result in this indeterminate
state, the application should not transmit any packets
and should disable packet reception during this period.
In Full-Duplex mode, packets will be transmitted while
simultaneously packets may be received. Given this, it
is impossible to cause any collisions when transmitting
packets. Several configuration fields, such as “Retrans-
mission Maximum” (RETMAX) in MACLCON1 and
“Collision Window” (COLWIN) in MACLCON2 will not
be used.
When set in Full-Duplex mode, the Reset default con-
figuration will not loop transmitted packets back to
itself. If loopback is desired for diagnostic purposes, the
application
should
set
(PHCON1<14>). Enabling loopback in Full-Duplex
mode will disable the twisted-pair output driver and
ignore all incoming data, thus dropping any link (if
established). All packets received as a result of the
loopback configuration will be subject to all enabled
receive filters, just as ordinary network traffic would be.
the
PLOOPBK
bit