
Fast Ethernet Controller (FEC)
MPC5566 Microcontroller Reference Manual, Rev. 2
15-46
Freescale Semiconductor
The driver (RxBD software producer) must set up some number of “empty” buffers for the Ethernet by
initializing the address field and the E and W bits of the receive BDs. The receive DMA consumes the
buffers by:
•
Filling them with data as frames are received
•
Clearing the E bit to 0
•
Setting the L bit to 1 to indicate the last buffer in the frame,
•
Setting the frame status bits (if L = 1) and the length field.
If a receive frame spans multiple receive buffers, the L bit is only set for the last buffer in the frame. For
non-last buffers, the length field in the receive BD is written by the DMA (at the same time the E bit is
cleared) with the default receive buffer length value. For end-of-frame buffers, the receive BD is written
with L = 1 and information is written to the status bits (M, BC, MC, LG, NO, CR, OV, TR). Some of the
status bits are error indicators which, if set, indicate the receive frame must be discarded and not given to
higher layers. The frame status/length information is written into the receive FIFO following the end of
the frame (as a single 32-bit word) by the receive logic. The length field for the end-of-frame buffer is
written with the length of the entire frame, not just the length of the last buffer.
For simplicity, the driver can assign a default receive buffer length large enough to contain an entire frame,
keeping in mind that a malfunction on the network or an implementation that is not within the specification
can result in giant frames. Frames of 2K (2048) bytes or larger are truncated by the FEC at 2047 bytes to
guarantee the application never receives frame larger than 2047 bytes.
Similar to transmit, the FEC polls the receive descriptor ring after the driver sets up receive BDs and writes
to the RDAR register. As frames are received, the FEC fills the receive buffers and updates the associated
BDs, then reads the next BD in the receive descriptor ring. If the FEC reads a receive BD and finds the E
bit = 0, it polls the BD again. If BD = 0 a second time, the FEC stops reading the receive BDs until the
driver writes to RDAR.
15.5.2
Ethernet Receive Buffer Descriptor (RxBD)
In the RxBD, the application initializes the E and W bits in the first word and the pointer in second word.
When the buffer has been DMA’d, the Ethernet controller modifies the E, L, M, BC, MC, LG, NO, CR,
OV, and TR bits and writes the length of the used portion of the buffer in the first word. The M, BC, MC,
LG, NO, CR, OV and TR bits in the first word of the buffer descriptor are only modified by the Ethernet
controller when the L bit is set to 1.
.
0 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
0
E
RO1
W
RO2
L
—
—
M
BC
MC
LG
NO
—
CR
OV
TR
2
Data Length
4
Rx Data Buffer Pointer - A [0:15]
6
Rx Data Buffer Pointer - A [16:31]
Figure 15-30. Receive Buffer Descriptor (RxBD)
Содержание MPC5566
Страница 12: ...MPC5566 Microcontroller Reference Manual Devices Supported MPC5566 MPC5566 RM Rev 2 0 23 Apr 2008...
Страница 81: ...Introduction MPC5566 Microcontroller Reference Manual Rev 2 1 24 Freescale Semiconductor...
Страница 135: ...Signal Description MPC5566 Microcontroller Reference Manual Rev 2 2 54 Freescale Semiconductor...
Страница 189: ...Reset MPC5566 Microcontroller Reference Manual Rev 2 4 20 Freescale Semiconductor...
Страница 331: ...System Integration Unit SIU MPC5566 Microcontroller Reference Manual Rev 2 6 128 Freescale Semiconductor...
Страница 343: ...Crossbar Switch XBAR MPC5566 Microcontroller Reference Manual Rev 2 7 12 Freescale Semiconductor...
Страница 361: ...Error Correction Status Module ECSM MPC5566 Microcontroller Reference Manual Rev 2 8 18 Freescale Semiconductor...
Страница 455: ...Interrupt Controller INTC MPC5566 Microcontroller Reference Manual Rev 2 10 42 Freescale Semiconductor...
Страница 603: ...Flash Memory MPC5566 Microcontroller Reference Manual Rev 2 13 38 Freescale Semiconductor...
Страница 609: ...SRAM MPC5566 Microcontroller Reference Manual Rev 2 14 6 Freescale Semiconductor...
Страница 679: ...Boot Assist Module BAM MPC5566 Microcontroller Reference Manual Rev 2 16 20 Freescale Semiconductor...
Страница 997: ...Deserial Serial Peripheral Interface DSPI MPC5566 Microcontroller Reference Manual Rev 2 20 72 Freescale Semiconductor...
Страница 1037: ...Enhanced Serial Communication Interface eSCI MPC5566 Microcontroller Reference Manual Rev 2 21 40 Freescale Semiconductor...
Страница 1073: ...MPC5566 Microcontroller Reference Manual Rev 2 22 36 Freescale Semiconductor...
Страница 1081: ...Voltage Regulator Controller VRC and POR Module MPC5566 Microcontroller Reference Manual Rev 2 23 8 Freescale Semiconductor...
Страница 1093: ...IEEE 1149 1 Test Access Port Controller JTAGC MPC5566 Microcontroller Reference Manual Rev 2 24 12 Freescale Semiconductor...
Страница 1185: ...Nexus MPC5566 Microcontroller Reference Manual Rev 2 25 92 Freescale Semiconductor...
Страница 1267: ...MPC5566 Reference Manual Revision History MPC5566 Microcontroller Reference Manual Rev 2 Freescale Semiconductor C 10...
Страница 1268: ...MPC5566 Reference Manual Revision History MPC5566 Microcontroller Reference Manual Rev 2 Freescale Semiconductor C 11...