4 WORDS (SRC A)
16 WORDS (SRC B)
1 WORDS (SRC C)
4 (DEST A)
16 (DEST B)
1 (DEST C)
SRC
DST
ITEMS = 1
Unused
SRC
DST
ITEMS = 16
Unused
SRC
DST
ITEMS = 4
Unused
A
B
C
SRC
DST
ITEMS = n
SRC
DST
ITEMS = 12
Channel Primary
Control Structure
Channel Alternate
Control Structure
³7$6.´$
³7$6.´%
³7$6.´&
Source and Destination
Buffer in Memory
Task List in Memory
Channel Control
Table In Memory
1 2 3
Functional Description
www.ti.com
124
SWRU543–January 2019
Submit Documentation Feedback
Copyright © 2019, Texas Instruments Incorporated
Direct Memory Access (DMA)
4.2.5.5 Memory Scatter-Gather Mode
Memory scatter-gather mode is a complex mode used when data must be transferred to or from varied
locations in memory instead of to or from a set of contiguous locations in a memory buffer. For example, a
gather µDMA operation could selectively read the payload of several stored packets of a communication
protocol and store them together in sequence in a memory buffer.
In memory scatter-gather mode, the primary control structure programs the alternate control structure from
a table in memory. The table is set up by the processor software and contains a list of control structures,
each containing the source and destination end pointers, and the control word for a specific transfer. The
mode of each control word must be set to scatter-gather mode. Each entry in the table is in turn copied to
the alternate structure where it is then executed. The µDMA controller alternates between using the
primary control structure to copy the next transfer instruction from the list, and then executing the new
transfer instruction. The end of the list is marked by programming the control word for the last entry to use
basic transfer mode. When the last transfer is performed using basic mode, the µDMA controller stops. A
completion interrupt is generated only after the last transfer. It is possible to loop the list by having the last
entry copy the primary control structure to point back to the beginning of the list (or to a new list). It is also
possible to trigger a set of other channels to perform a transfer; this can be done directly, by programming
a write to the software trigger for another channel, or indirectly, by causing a peripheral action that results
in a µDMA request.
By programming the µDMA controller using this method, a set of arbitrary transfers can be performed
based on a single µDMA request.
Figure 4-2 shows an example of operation in memory scatter-gather mode. This example shows a gather
operation, where data in three separate buffers in memory is copied together into one buffer. Figure 4-2
shows how the application sets up a µDMA task list in memory used by the controller to perform three
sets of copy operations from different locations in memory. The primary control structure for the channel
used for the operation is configured to copy from the task list to the alternate control structure.
Figure 4-2. Memory Scatter-Gather Mode
(1) Application must copy data items from three separate locations in memory into one combined buffer.
(2) Application sets up a µDMA task list in memory, which contains the pointers and control configuration for
three µDMA copy tasks.
(3) Application sets up the channel primary control structure to copy each task configuration, one at a time, to the
alternate control structure, where it is executed by the µDMA controller