Complete the following steps to initialize the DMA:
- Provide a software reset. This resets all of the MAC internal registers and
logic (bit 0 of DMA_Mode).
- Wait for the completion of the reset process (poll bit 0 of the DMA_Mode, which is only cleared after the reset operation is completed).
- Program the following fields to initialize the DMA_SysBus_Mode register:
- AAL
- Fixed burst or undefined burst
- Burst mode values in case of AHB bus interface, OSR_LMT in case of AXI bus interface.
- If fixed length value is enabled, select the maximum burst length possible on
the AXI Bus (bits[7:1])
- Create a descriptor list for transmit and receive. In addition, make sure that
the descriptors are owned by DMA (set bit 31 of descriptor TDES3/RDES3). For
more information about descriptors, see Section 43.4.
- Program the Transmit and Receive Ring length registers
(DMA_CH(#i)_TxDesc_Ring_Length (for i=0; i<=1) and
DMA_CH(#1)_RxDesc_Ring_Length (for i=0; i<=1)). The ring length programmed
must be at least 4.
Note: The
descriptor address from the start to the end of the ring must not cross the
4GB boundary.
- Initialize receive and transmit descriptor list address with the base address of the transmit and receive descriptor (DMA_CH(#i)TxDesc_List_Address (for i = 0; i <=1), DMA_CH (#i)_RxDesc_List_Address (for i=0; i <=1)). also, program transmit and receive tail pointer registers indicating to the DMA about the available descriptors (DMA_CH (#i)_TxDesc_Tail_Pointer (for i=0; i <= 1) and DMA_CH (#i)_TxDesc_Tail_Pointer (for i=0; i<=1))..,
Note: (For 40-bit or 48-bit addressing mode, program
the higher address List registers DMA_CH[n]_TxDesc_List_HAddress,
DMA_CH[n]_RxDesc_List_HAddress). The tailpointer registers must be advanced to the
location immediately after the descriptors that are set, for the DMA to know that
additional descriptors are available.