UM10360 All information provided in this document is subject to legal disclaimers. © NXP B.V. 2013. All rights reserved.
User manual Rev. 3 — 19 December 2013  183 of 841
NXP Semiconductors
UM10360
Chapter 10: LPC176x/5x Ethernet
Please note that the transmit descriptors, receive descriptors and receive statuses are 8 
bytes each while the transmit statuses are 4 bytes each. All descriptor arrays and transmit 
statuses need to be aligned on 4 byte boundaries; receive status arrays need to be 
aligned on 8 byte boundaries. The number of descriptors in the descriptor arrays needs to 
be written to the TxDescriptorNumber/RxDescriptorNumber registers using a -1 encoding 
i.e. the value in the registers is the number of descriptors minus one e.g. if the descriptor 
array has 4 descriptors the value of the number of descriptors register should be 3.
After setting up the descriptor arrays, frame buffers need to be allocated for the receive 
descriptors before enabling the receive data path. The Packet field of the receive 
descriptors needs to be filled with the base address of the frame buffer of that descriptor. 
Amongst others the Control field in the receive descriptor needs to contain the size of the 
data buffer using -1 encoding.
The receive data path has a configurable filtering function for discarding/ignoring specific 
Ethernet frames. The filtering function should also be configured during initialization.
After an assertion of the hardware reset, the soft reset bit in the MAC will be asserted. The 
soft reset condition must be removed before the Ethernet block can be enabled.
Enabling of the receive function is located in two places. The receive DMA manager 
needs to be enabled and the receive data path of the MAC needs to be enabled. To 
prevent overflow in the receive DMA engine the receive DMA engine should be enabled 
by setting the RxEnable bit in the Command register before enabling the receive data path 
in the MAC by setting the RECEIVE ENABLE bit in the MAC1 register.
The transmit DMA engine can be enabled at any time by setting the TxEnable bit in the 
Command register.
Before enabling the data paths, several options can be programmed in the MAC, such as 
automatic flow control, transmit to receive loop-back for verification, full/half duplex 
modes, etc.
Base addresses of descriptor arrays and descriptor array sizes cannot be modified 
without a (soft) reset of the receive and transmit data paths.
10.17.3 Transmit process
Overview
This section outlines the transmission process.
Device driver sets up descriptors and data
If the descriptor array is full the device driver should wait for the descriptor arrays to 
become not full before writing to a descriptor in the descriptor array. If the descriptor array 
is not full, the device driver should use the descriptor numbered TxProduceIndex of the 
array pointed to by TxDescriptor.
The Packet pointer in the descriptor is set to point to a data frame or frame fragment to be 
transmitted. The Size field in the Command field of the descriptor should be set to the 
number of bytes in the fragment buffer, -1 encoded. Additional control information can be 
indicated in the Control field in the descriptor (bits Interrupt, Last, CRC, Pad).