
Ethernet Module
MCF5272 ColdFire
®
Integrated Microprocessor User’s Manual, Rev. 3
Freescale Semiconductor
11-35
11.6.1
FEC Buffer Descriptor Tables
The data for the fast Ethernet frames must reside in memory external to the FEC. The data for a frame is
placed in one or more buffers. Each buffer has a pointer to it in a buffer descriptor (BD). In addition to
pointing to the buffer, the BD contains the current state of the buffer. To permit maximum user flexibility,
the BDs are also located in external memory.
Software defines buffers by allocating/initializing memory and initializing buffer descriptors. Setting the
RxBD[E] or TxBD[R] produces the buffer. Software writing to either TDAR or RDAR tells the FEC that
a buffer has been placed in external memory for the transmit or receive data traffic, respectively. The
hardware reads the BDs and processes the buffers after they have been defined. After the data DMA is
complete and the BDs have been written by the DMA engine, RxBD[E] or TxBD[R] are cleared by
hardware to indicate that the buffer has been processed. Software may poll the BDs to detect when the
buffers have been processed or may rely on the buffer/frame interrupts.
The ETHER_EN signal operates as a reset to the BD/DMA logic. When ETHER_EN is negated, the DMA
engine BD pointers are reset to point to the starting transmit and receive BDs. The buffer descriptors are
not initialized by hardware during reset. At least one transmit and receive BD must be initialized by
software (write 0x0000_0000 to the most significant word of buffer descriptor) before the ETHER_EN bit
is set.
The BDs are organized in two separate rings, one for receive buffers and one for transmit buffers. ERDSR
defines the starting address of the receive BDs and ETDSR the same for the transmit BDs. The last buffer
descriptor in each ring is defined by the wrap (W) bit. When set, W indicates that the next descriptor in the
ring is at the location pointed to by ERDSR and ETDSR for the receive and transmit rings, respectively.
Buffers descriptor rings must start on a double-word boundary.
The format of the transmit and receive buffer descriptors are given in
11.6.1.1
Ethernet Receive Buffer Descriptor (RxBD)
In the RxBD, the user initializes the E and W bits in the first word and the pointer in the second word.
When the buffer has been sent as a DMA, the FEC will modify the E, L, M, LG, NO, SH, CR, and OV bits
and write the length of the used portion of the buffer in the first word. The M, LG, NO, SH, CR, and OV
bits in the first word of the buffer descriptor are modified by the FEC only when the L bit is set.
The first word of the RxBD contains control and status bits. Its format is detailed below.
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
+0
E
RO1
W
RO2
L
—
M
BC
MC
LG
NO
SH
CR
OV
TR
+2
DATA LENGTH
+4
Rx Data Buffer Pointer A[31–16]
+6
Rx Data Buffer Pointer A[15–0]
Figure 11-27. Receive Buffer Descriptor (RxBD)