![](http://datasheet.mmic.net.cn/230000/79RC32438-200BB_datasheet_15568909/79RC32438-200BB_256.png)
IDT DMA Controller
Internal DMA Operation
79RC32438 User Reference Manual
9 - 10
November 4, 2002
Notes
The DMA controller may be incorrectly programmed with an address which does not map to a valid
device. When this occurs, the address space monitor reports an error to the DMA controller. If the DMA
controller attempts to read a DMA descriptor from an un-decoded address, the DMA operation is terminated
causing the error (E) bit and the halt (H) bit to be set in the DMAxS register and the RUN bit to be cleared
the DMAxC register. If the DMA controller attempts to read or write a DMA data buffer that corresponds to
an undecoded address, then the DMA operation is terminated. This results in the DMA discontinuing the
current DMA descriptor operation, clearing the RUN bit in the DMAxS register, setting the T bit in the
descriptor, and updating all other status information in the descriptor. Once the descriptor contents are
written back to memory, the halt (H) bit and error (E) bit in the DMAxS register are set.
Clearing the RUN bit in the DMAxC register provides a means of orderly halting a DMA operation but
sometimes a need exists to abort a DMA operation without cooperation from the peripheral. For example,
resetting a peripheral during a DMA operation may make it impossible to halt a DMA operation since the
DMA will wait indefinitely for the peripheral to supply updated DEVCS and DEVCMD values. A DMA opera-
tion may be aborted without cooperation from a peripheral by writing a one to the Abort (A) bit in the DMAxC
register. This causes the DMA channel to complete the current DMA transaction on the bus if one is in
progress, write back the descriptor
1
with the terminated (T) bit set, set the Halt (H) bit in the DMAxS
register, and clear the run bit. If a DMA operation is aborted while the DMA is in the process of following a
link or performing a chaining operation, the terminated bit will not be set in any descriptor.
DMA Request Event
A DMA request event causes a data quantum to be transferred by the DMA controller between a periph-
eral device and memory. The amount of data contained in a DMA quantum is defined by the DMA transfer
size. The DMA transfer size is specified for each peripheral device and is the amount of data transferred by
the DMA controller when it gains ownership of the IP bus.
The mode field in the DMAxC register allows the DMA to be configured to operate in one of three
modes: auto request, burst request, and transfer request. In auto request mode, DMA request events
generated by the selected peripheral device are ignored, and the DMA controller generates internal request
events at the maximum possible rate. This causes a block of data to be transferred by the DMA controller
without the need for DMA request events to be generated by the peripheral device.
In burst request mode, a DMA request event signalled by the selected peripheral device causes the
DMA controller to begin internally generating request events until the DMA operation completes. Thus, in
this mode the first request event generated by the peripheral signals the start of a burst transfer. This mode
allows the peripheral device to externally signal the beginning of a burst DMA operation.
In transfer request mode, a DMA request event signalled by the selected peripheral device causes the
DMA controller to transfer a single data quantum between the peripheral device and memory. Thus, for
each data quantum of a DMA operation, the peripheral must signal to the DMA controller when the transfer
should take place. All of the DMA peripheral devices internal to the RC32438 operate in transfer request
mode. Configuring an internal peripheral device for auto request or burst request modes will produce unde-
sirable consequences. External DMA operations, described later in this chapter, support all three modes.
DMA Descriptor List and Chaining
A DMA descriptor list consists of a linked list of DMA descriptors, with the LINK field of each descriptor
pointing to the next descriptor in the list. The LINK field of the last descriptor in a descriptor list is zero.
Descriptor list processing begins when the address of a DMA descriptor is written to the DMAxDPTR
register. This causes the DMA controller to read a descriptor from memory, performs the specified DMA
operation, update the descriptor status information, and follows the LINK field to the next descriptor in the
descriptor list. The DMAxDPTR register may be read at any time to determine the currently active
descriptor in the descriptor list.
DMA chaining is enabled by initializing the DMA next descriptor pointer (DMAxNDPTR) with the starting
address of a DMA descriptor list. When the DMA controller completes the operation associated with the last
descriptor in a descriptor list, and DMA chaining is not enabled (that is, DMAxNDPTR is zero), then the halt
1.
Aborting a DMA operation may result in undefined values in the DEVCS and DEVCMD fields.