RM0082
HS_Media independent interface (MII)
Doc ID 018672 Rev 1
515/844
24.5
How to initialize DMA
1.
Write to DMA register0 (Bus Mode) to set the host bus access parameters.
2.
Write to DMA register7 (Interrupt Enable) to mask needless interrupt causes.
3.
Create the Transmit And Receive descriptor lists into the host physical memory space.
4.
Write to both DMA register3 (Receive Descriptor List Address
) and
register4 (Transmit Descriptor List Address,
) providing the DMA with the
starting address of each descriptor list.
5.
Write to MAC register1 (MAC Frame Filter,
), register2 (Hash Table
) and register3 (Hash Table Low,
) for described
filtering options.
6.
Write to MAC register0 (MAC configuration,
) to configure and enable
the Transmit And Receive operating modes. The PS and DM bits are set based on the
auto-negotiation result (read from the PHY).
7.
Write to DMA register6 (operation mode,
) setting bits [1] SR and [13] ST
to start reception and transmission, respectively.
[13]
Reserved
-
[12:00] RBS1
Receive Buffer 1 Size.
These 11 bit field reports the size (in bytes) of the
first data buffer.
Note:
The RBS1 value must be a multiple of 4/8/16 depending on the bus
width otherwise the resulting behaviour is undefined.
Note:
If RBS1 value is 13'h0, then the DMA ignores this buffer and uses the
2nd buffer or next descriptor (depending on RCH bit value).
Table 420.
Receive descriptor 2 (RDES2)
Bit
Name
Description
[31:00]
Buffer 1 Address
Pointer
This field indicates the physical address of the 1st data buffer pointed to
by this descriptor.
Table 421.
Receive descriptor 3 (RDES3)
Bit
Name
Description
[31:00]
Buffer 2 Address
Pointer
(Next Descriptor
Address)
This field indicates the physical address of the 2nd data buffer pointed
to by this descriptor, if descriptor chaining is used.
If RDES1[24] bit is set, then this field contains the pointer to the
physical memory when the next descriptor is present.
Table 419.
Receive descriptor 1 (RDES1) (continued)
Bit
Name
Description