Information

ENC28J60
DS80349C-page 6 2010 Microchip Technology Inc.
EXAMPLE 1:
14. Module: Memory (Ethernet Buffer)
The receive hardware may corrupt the circular
receive buffer (including the Next Packet Pointer
and receive status vector fields) when an even value
is programmed into the ERXRDPTH:ERXRDPTL
registers.
Work around
Ensure that only odd addresses are written to the
ERXRDPT registers. Assuming that ERXND con-
tains an odd value, many applications can derive a
suitable value to write to ERXRDPT by subtracting
one from the Next Packet Pointer (a value always
ensured to be even because of hardware padding)
and then compensating for a potential ERXST to
ERXND wrap-around. Assuming that the receive
buffer area does not span the 1FFFh to 0000h mem-
ory boundary, the logic in Example 2 will ensure that
ERXRDPT is programmed with an odd value:
EXAMPLE 2:
Affected Silicon Revisions
15. Module: Transmit Logic
If a collision occurs after 64 bytes have been
transmitted, the transmit logic may not set the Late
Collision Error status bit (ESTAT.LATECOL).
Work around
Whenever a late collision has potentially occurred
(both EIR.TXERIF and ESTAT.TXABRT bits will be
set), read the transmit status vector and check the
transmit late collision bit (bit 29).
Affected Silicon Revisions
ECON1.TXRST = 1
ECON1.TXRST = 0
EIR.TXERIF = 0
EIR.TXIF = 0
ECON1.TXRTS = 1
while(EIR.TXIF = 0 and EIR.TXERIF = 0)
NOP
ECON1.TXRTS = 0
read tsv
for retrycount = 0 to 15
if (EIR.TXERIF and tsv<Transmit Late Collision>) then
ECON1.TXRST = 1
ECON1.TXRST = 0
EIR.TXERIF = 0
EIR.TXIF = 0
ECON1.TXRTS = 1
while(EIR.TXIF = 0 and EIR.TXERIF = 0)
NOP
ECON1.TXRTS = 0
read tsv
else
exit for
end if
next retrycount
B1 B4 B5 B7
XXX
X
if (Next Packet Pointer = ERXST)
then:
ERXRDPT = ERXND
else:
ERXRDPT = Next Packet Pointer – 1
B1 B4 B5 B7
XXX
X