Datasheet

ENC424J600/624J600
DS39935C-page 106 2010 Microchip Technology Inc.
11.2 Manual and Automatic Flow
Control
11.2.1 MANUAL FLOW CONTROL
Manual flow control is enabled by default on device
power-up and whenever the AUTOFC bit (ECON2<7>)
is cleared. Setting AUTOFC disables manual flow
control.
To begin manual flow control in Full-Duplex mode, set
FCOP<1:0> to one of the following combinations:
•Idle (
00’): Flow control is disabled or Idle.
Single Pause (‘
01’): Transmit one pause frame for
the time indicated in EPAUS; automatically
returns to the Idle state (‘
00’).
Continuous Pause (‘
10’): Periodically transmit
pause frames using the value indicated in EPAUS
for an indefinite time; must be terminated using
End (‘
11’).
•End (
11’): Transmit one pause frame with a timer
of 0000h, then return to the Idle state (‘
00’).
In Half-Duplex mode, set FCOP<1:0> to
10’ to begin
flow control and to
00’ to terminate flow control.
11.2.2 AUTOMATIC FLOW CONTROL
When the AUTOFC bit is set, the ENCX24J600 auto-
matically initiates flow control operation when the
amount of data in the receive buffer crosses an upper
threshold value. Flow control automatically terminates
once the amount of pending data shrinks below a lower
threshold. These thresholds, or “watermarks”, are
determined by the upper and lower bytes (respectively)
of the Receive Watermark register, ERXWM. These
thresholds represent 96-byte blocks.
For example, setting the RXFWM bits to 20h and the
RXEWM bits to 10h initiates flow control when more
than 3072 bytes of data are present in the buffer. Flow
control terminates when fewer than 1536 bytes of data
are in the buffer.
In Automatic mode, the value of FCOP<1:0> is
controlled by the device and must not be changed by
software. These bits, however, can be used as status
bits to determine what state the automatic flow control
engine is in. A value of ‘
10’ indicates flow control is
active, while ‘
00’ indicates that flow control is Idle.
To use automatic flow control:
1. Set the EPAUS register to indicate how many
pause quanta should be specified in each
control frame. It is recommended that the default
value be used.
2. Set RXFWM<7:0> (ERXWM<15:8>) to indicate
when flow control is to begin. When this number
of 96-byte blocks is consumed in the receive
buffer, the device considers its receive buffer to
be full and initiates flow control. Use the default
value of 16 if the full threshold is to be set at
1536 bytes.
3. Set RXEWM<7:0> (ERXWM<7:0>) to indicate
when flow control is to end. When the number of
occupied 96-byte blocks falls below this level,
the device considers its receive buffer to be
empty enough to receive more data. Use the
default value of 15 if the empty threshold is to be
set at 1440 bytes.
4. Set AUTOFC (ECON2<7>) to give control of the
FCOP<1:0> bits to the automatic flow control
hardware.
Note: When flow control is used in conjunction
with auto-negotiation, also set the ADPAUS
bits (PHANA<11:10>) to ‘
01’ during initial-
ization. See
Section 12.0 “Speed/Duplex
Configuration and Auto-Negotiation”
for
more information.
Note: Setting RXFWM to be equal to RXEWM
(i.e., no hysteresis between full and empty)
is not permitted. For automatic flow control
to operate correctly, RXEWM must always
be at least one less than RXFWM, implying
at least 96 bytes of hysteresis.