
DR
AFT
DR
AFT
DRAFT
DR
D
RAFT
DRAFT
DRA
FT DRAF
D
RAFT DRAFT DRAFT DRAFT DRAFT D
DRAFT
D
RAFT DRA
FT DRAFT DRAFT DRAFT DRA
UM10360_0
© NXP B.V. 2009. All rights reserved.
User manual
Rev. 00.06 — 5 June 2009
162 of 808
NXP Semiconductors
UM10360
Chapter 10: LPC17xx Ethernet
After reset, the values of the DMA registers will be zero. During initialization, the device
driver will allocate the descriptor and status array in memory. In this example, an array of
four descriptors is allocated; the array is 4x2x4 bytes and aligned on a 4 byte address
boundary. Since the number of descriptors matches the number of statuses, the status
array consists of four elements; the array is 4x2x4 bytes and aligned on a 8 byte address
boundary. The device driver writes the base address of the descriptor array
(0x2008 10EC) in the RxDescriptor register, and the base address of the status array
(0x2008 11F8) in the RxStatus register. The device driver writes the number of descriptors
and statuses minus 1 (3) in the RxDescriptorNumber register. The descriptors and
statuses in the arrays need not be initialized yet.
After allocating the descriptors, a fragment buffer needs to be allocated for each of the
descriptors. Each fragment buffer can be between 1 byte and 2 k bytes. The base
address of the fragment buffer is stored in the Packet field of the descriptors. The number
of bytes in the fragment buffer is stored in the Size field of the descriptor Control word.
The Interrupt field in the Control word of the descriptor can be set to generate an interrupt
as soon as the descriptor has been filled by the receive process. In this example the
fragment buffers are 8 bytes, so the value of the Size field in the Control word of the
descriptor is set to 7. Note that in this example, the fragment buffers are actually a
Fig 20. Receive Example Memory and Registers
PACKET
0x20081409
RxStatus
0x200811F8
RxDescriptor
0x200810EC
0x200810EC
0x200810F0
0x200810F4
0x200810F8
0x200810FC
0x20081100
0x20081104
0x20081108
0x
200811F8
0x
20081200
0x
20081208
0x
20081210
PACKET
0x20081411
PACKET
0x20081419
PACKET
0x20081325
descriptor array
De
sc
ri
p
to
r 0
D
es
c
ri
pt
or
1
D
e
scr
ip
to
r 2
D
e
sc
ri
pt
or
3
des
cr
ipt
or
ar
ray
fragment buffers
RxProduceIndex
RxConsumeIndex
RxDescriptorNumber = 3
S
ta
tu
s
1
S
ta
tu
s 0
S
tat
us
3
S
tat
us
2
st
at
us
ar
ray
status array
FRAGMENT 1 BUFFER
(8 bytes)
FRAGMENT 0 BUFFER
(8 bytes)
FRAGMENT 2 BUFFER
(3 bytes)
FRAGMENT 3 BUFFER
(8 bytes)
1
7
CONTROL
1
7
CONTROL
1
7
CONTROL
1
7
CONTROL
StatusInfo 7
StatusHashCRC
StatusInfo 7
StatusHashCRC
StatusInfo 7
StatusHashCRC
StatusInfo 2
StatusHashCRC
0x2008140
9
0x2008141
0
0x20081411
0x20081418
0x20081325
0x2008132C
0x20081419
0x2008141B