Datasheet

ENC424J600/624J600
DS39935C-page 86 2010 Microchip Technology Inc.
In full duplex, the MAC inhibits transmission of any
packets until the pause timer expires when two
conditions are met:
Flow control is enabled (RXPAUS bit is set) and
A valid pause frame was received from the
remote node
It will still be possible for software to set the TXRTS bit
to start a transmission. However, this has the effect of
queuing the packet for future transmission instead of
causing an immediate transmission to start. Once the
pause timer expires, the queued packet will transmit
normally, causing any applicable interrupts to occur.
9.2 Receiving Packets
As Ethernet frames arrive, they are written to the circu-
lar receive buffer, bounded by the Receive Buffer Start
Address (ERXST) register and the end of the physical
memory at 5FFFh. The hardware also maintains a
counter indicating the number of pending frames.
Each frame starts on an even address. The hardware
maintains a Receive Head Pointer, ERXHEAD, indicating
the next location to be written, and automatically wraps
back to ERXST when it reaches the end of memory. The
Tail Pointer, ERXTAIL, is maintained by software.
Addresses from the Tail Pointer, up to the Head Pointer,
are considered to be protected by software. This allows
the host controller to prevent incoming frames from
overwriting data that has not yet been processed.
When ERXTAIL points to the same location as
ERXHEAD, the receive packet buffer is considered to
be full. Due to this definition, there is no empty condi-
tion. For simplicity, applications may choose to keep
the Tail Pointer always set to two bytes behind the next
frame to be processed, or two bytes behind the Head
Pointer when no frames are pending. Figure 9-3 shows
these pointer relationships.
If ERXHEAD reaches ERXTAIL while receiving a
frame, or if the receive filters reject the packet, the
ERXHEAD Pointer is rolled back to its previous location
and the packet is discarded.
FIGURE 9-3: EXAMPLES OF RECEIVE BUFFER WRAP BETWEEN ERXHEAD AND ERXTAIL
T XX 01 02 03 04 05 8A 8B 8C H
...
Initial state, buffer is empty:
05 06 07 08 0A H T XX 01 02 03 04
...
Buffer has wrapped and
contains pending data:
T XX H
...
H T
XX
...
Buffer is empty:
Buffer contains pending
data to be processed:
92 93 94 95 96 97 98 99 H T XX 01 02 8A 8B 8C 8D 8E 8F 90 91
...
Buffer has wrapped
and is currently full:
H
T
XX
01 02
Free byte for incoming data
Byte protected from incoming data
Head Pointer (ERXHEAD)
Tail Pointer (ERXTAIL), skip when reading
Dummy byte, skip when reading
Next Packet Pointer for pending frame
ERXST 5FFFh