Cirrus Logic EP93xx User Manual

Page 408

Advertising
background image

10-14

DS785UM1

Copyright 2007 Cirrus Logic

DMA Controller
EP93xx User’s Guide

1

0

1

0

10

The DMA Controller initiates memory-to-memory transfers in the receive direction (that is,
from memory/peripheral to DMA) under the following circumstances:

A channel has been triggered by software, that is, setting the START bit to “1”. Setting

the START bit causes the channel to begin requesting the bus, and when granted
ownership it will start transferring data immediately. The DMA controller drives the
SAR_BASEx value onto the internal AHB address bus. If CONTROL.SCT is not set, the
SAR_BASEx increments by the appropriate number of bytes upon a successful read
cycle. The DMA initiates the write portion of the transfer when the appropriate number of
read cycles is completed, that is, either when the 16-byte data bay has been filled, or
when it contains the number of bytes (less than 16) that remain to be transferred, or
when it contains sufficient data for an unaligned byte/word access (dependant on the
next address access).

A channel receives a transfer request from SSP or IDE or an external device without

handshaking signals (that is, CONTROL.NO_HDSK = “1”), and the transfer mode is set
to be either memory-to-external bus mode or external device-to-memory mode (that is,
CONTROL.TM = “01”/“10” respectively). The DMA drives the SAR_BASEx value onto
the address bus and requests a transfer size equal to the programmed peripheral width.
In the case of CONTROL.TM = “10” where the external device (which is the source for
the data) is FIFO-based, it is up to software to program the SAH bit correctly (Source
Address Hold), so that on successive transfers from the peripheral, the
SAR_CURRENTx value will not increment, thus reflecting the FIFO-nature of the
peripheral.

A channel receives a request from an external device and the transfer mode is set to be

either memory-to-external device mode or external device-to-memory mode (that is,
CONTROL.TM = “01” or “10” respectively). The DMA drives the SAR_BASEx value onto
the address bus and requests a transfer size equal to the programmed peripheral width.
In the case of CONTROL.TM = “10” where the external device (which is the source for
the data) is FIFO-based, it is up to software to program the SAH bit correctly (Source
Address Hold), so that on successive transfers from the peripheral, the
SAR_CURRENTx value will not increment, thus reflecting the FIFO-nature of the
peripheral.

When the current transfer terminates the DMA will check if the BCR register for the

“other” buffer (of the double-buffer set) has been programmed. If BCR is non-zero and
CONTROL.TM = “00”, that is, software trigger mode, then the DMA will proceed
immediately to request the AHB bus and begin a transfer from memory to DMA using
the other buffer descriptor. Software does not need to reprogram the START bit, it is
enough to have the second buffer descriptor set up while the first buffer transfer is in
progress. In the case where TM is such that external-device mode is set up, then
rollover to the other buffer will also occur if the current transfer terminates, but the DMA
will wait until it receives a DREQ from the external peripheral before initiating a transfer.

The DMA Controller initiates memory-to-memory transfers in the transmit direction (that is,
from DMA to memory/external bus) under the following circumstances:

Advertising