Fast Ethernet Controller (FEC)
Freescale Semiconductor
16-21
MCF51CN128 Reference Manual, Rev. 6
16.4.22 Receive Buffer Size Register (EMRBR)
The EMRBR is a user-programmable register that dictates the maximum size of all receive buffers. This
value should take into consideration that the receive CRC is always written into the last receive buffer. To
allow one maximum size frame per buffer, EMRBR must be set to RCR[MAX_FL] or larger. To properly
align the buffer, EMRBR must be evenly divisible by 16. To ensure this, bits 3–0 are forced low.
To minimize bus utilization (descriptor fetches), it is recommended that EMRBR be greater than or equal
to 256 bytes.
The EMRBR register is undefined at reset and must be initialized by the user.
16.5
Functional Description
This section describes the operation of the FEC, beginning with the buffer descriptors, the hardware and
software initialization sequence, then the software (Ethernet driver) interface for transmitting and
receiving frames.
Following the software initialization and operation sections are sections providing a detailed description
of the functions of the FEC.
Table 16-24. ETDSR Field Descriptions
Field
Description
31–2
X_DES_START
Pointer to start of transmit buffer descriptor queue.
1–0
Reserved, must be cleared.
Offset: 0x188
Access: User read/write
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10
9
8
7
6
5
4
3
2
1
0
R 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
R_BUF_SIZE
0 0
0
0
W
Reset — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —
Figure 16-23. Receive Buffer Size Register (EMRBR)
Table 16-25. EMRBR Field Descriptions
Field
Description
31–11
Reserved, must be cleared.
10–4
R_BUF_SIZE
Maximum size of receive buffer size in bytes. To minimize bus utilization (descriptor fetches), set this field to 256
bytes (0x10) or larger.
0x10 256 + 15 bytes (minimum size recommended)
0x11 272 + 15 bytes
...
0x7F 2032 + 15 bytes. The FEC writes up to 2047 bytes in the receive buffer. If data larger than 2047 is
received, the FEC truncates it and shows 0x7FF in the receive descriptor
3–0
Reserved, must be cleared.