English
Language : 

ENC624J600-I Datasheet, PDF (38/168 Pages) Microchip Technology – Stand-Alone 10/100 Ethernet Controller with SPI or Parallel Interface
ENC424J600/624J600
3.5.5.2 Circular Wrapping with ERXDATA
As with the general purpose pointers, operations with
ERXDATA normally cause the ERXRDPT or
ERXWRPT Pointer to automatically increment by one
byte address. However, if the end of the receive buffer
area (5FFFh) is reached, the pointer will increment to
the start of the receive FIFO buffer area instead, as
defined by ERXST (Figure 3-7).
The receive wrapping rules for the ERXDATA interface
are identical to the buffer wrapping rules used by the
receive hardware. Therefore, this register interface is
ideally suited to reading packet data from the receive
buffer. The host controller can set the ERXRDPT value
at the start of a packet in the receive buffer and sequen-
tially read out the entire packet contents without having
to write to the ERXRDPT Read Pointer again.
FIGURE 3-7:
CIRCULAR BUFFER
WRAPPING USING THE
ERXDATA WINDOW
0000h
General Purpose
Buffer
Circular RX FIFO
Buffer
Unimplemented
ERXST – 1
ERXST
5FFFh
EQUATION 3-2: POINTER INCREMENT LOGIC FOR ERXRDPT AND ERXWRPT
if ERXRDPT/ERXWRPT = 5FFFh, then
ERXRDPT/ERXWRPT = ERXST
else
ERXRDPT/ERXWRPT = ERXRDPT/ERXWRPT + 1
3.5.5.3 Circular Wrapping with EUDADATA
The user-defined buffer area is primarily useful for
setting up a circular FIFO within the general purpose
area for use by TCP/IP stacks or other applications. The
wrap-around behavior of the user-defined buffer area is
somewhat more complicated than with the general
purpose or receive buffer cases. This is because the
user-definable boundaries set by EUDAST and
EUDAND take priority over normal wrapping behavior.
Like other pointers, EUDAST and EUDAND are fully
user-configurable from the host microcontroller. Unlike
ERXST, which must not be modified while the receive
hardware is enabled, EUDAST and EUDAND can be
modified at any time.
As in the previous instances, operations with
EUDADATA normally cause the EUDARDPT or
EUDAWRPT Pointer to automatically increment by one
byte address. If the value in EUDAND is reached, the
pointer will increment to the address specified by
EUDAST instead. However, if the end of memory
(5FFFh) is reached, and EUDAND is located at some
other address, the pointer will increment to the begin-
ning of memory (0000h). If EUDAND is set to 5FFFh,
the pointer address increments to the value of
EUDAST, instead of 0000h.
The increment behavior logic is explained in
Equation 3-3.
EQUATION 3-3: POINTER INCREMENT LOGIC FOR EUDARDPT AND EUDAWRPT
if EUDARDPT/EUDAWRPT = EUDAND, then
EUDARDPT/EUDAWRPT = EUDAST
else if EUDARDPT/EUDAWRPT = 5FFFh, then
EUDARDPT/EUDAWRPT = 0000h
else
EUDARDPT/EUDAWRPT = EUDARDPT/EUDAWRPT + 1
DS39935C-page 36
 2010 Microchip Technology Inc.