D M A M o d u l e

Ethernet receiver considerations

When an Ethernet frame is received, DMA channel 1 searches the four buffer descriptors for the optimum buffer size. The search order is A, B, C, D. The search stops as soon as the DMA channel finds an available buffer that is large enough to hold the entire frame. The search also stops when the DMA channel finds a DMA Control register whose CE bit is set to zero.

Because interrupts are set when DMA channel 1 encounters buffers that are not ready, the device driver should be designed with the smallest buffers in the A pool and the largest buffers in the D pool. The number of available pools can be configured, from 1

to 4, with proper use of the CE bits.

An Ethernet receive FIFO overrun condition can occur (the FIFO becomes full while receiving an Ethernet packet) if insufficient buffers are allocated by the application. If this condition occurs (signaled by the NRIP bit in the DMA Channel 1 Status register), you must use this procedure to guarantee successful operation:

1Set the ERXDMA, in the Ethernet General Control register, to zero.

2SET the ERX bit, in the Ethernet General Control register, to zero.

3Set the CE bit, in the DMA Control register, to zero.

4Add new buffers for Ethernet DMA.

5Restore the DMA Control register.

6Restore the ERX bit.

7Restore the ERXDMA bit.

External peripheral DMA support

DMA channels 3, 4, 5, and 6 can be set up for external DMA transfers, using three signals — DREQ_, DACK_, and DONE_ — to facilitate communications between the NS7520 and an external device. It is up to the external device to source or react to these signals. The external device can be a block of memory using memory-to- memory transfers. Within every transaction on the bus, a cycle on the external bus is executed corresponding to timing generated by the MEM module.

w w w . d i g i . c o m

1 4 5

Page 159
Image 159
Digi NS7520 manual Ethernet receiver considerations, External peripheral DMA support