Public Version
www.ti.com
SDMA Functional Description
The
and
registers configure the source and destination start addresses.
The
register configures the source and destination addressing modes.
The DMA4_CSEi, DMA4_CSFi, DMA4_CDEi, and DMA4_CDFi registers configure the source EI, source
FI, destination EI, and destination FI, respectively.
The addressing profiles are expressed as equations as follows:
Equation 1.
Constant addressing:
A(n+1) = A(n)
Equation 2.
Post-increment addressing:
A(n+1) = A(n) + ES
Equation 3.
Single-indexed addressing:
A(n+1) = A(n) + ES + (EI – 1)
Equation 4.
Double-indexed addressing:
When not at the end of a frame or transfer (that is, when the element counter
≠
0):
A(n+1) = A(n) + ES + (EI – 1)
When at the end of a frame but not at the end of the transfer (that is, when the
element counter = 0 and the frame counter
≠
0):
A(n+1) = A(n) + ES + (FI – 1)
Calculate the element and frame index as follows:
Equation 5.
EIement index
EI = [(Stride EI – 1) * ES] + 1
Equation 6..
Frame index
FI = [(Stride FI – 1) * ES] + 1
where:
A(n): Byte address of the element n within the transfer.
ES is in bytes, ES
e
{1, 2, 4}.
EI is in bytes, specified in a configuration register, –32768
≤
EI
≤
32767.
Stride EI: The difference in the number of elements between the start of the current
element, n, to the start of next element, n+1.
Element counter: A counter that is (re)initiated with the number of elements per
frame or per transfer. Decreased by 1 for each element transferred. The initial value
is configured in the register DMA channel element number,
.
F is in bytes, specified in a configuration register, –2147483648
≤
FI
≤
2147483647.
Stride FI: The difference in the number of elements between the start of the last
element of the current frame and the beginning of the first element of the next frame.
Frame counter: A counter that is (re)initiated with the FN per transfer. Decreased by
1 for each frame transferred. The initial value is configured in the register DMA
channel frame number,
shows how a stride EI and FI are defined. When handling complex configurations, using
strides can make it easier to calculate EI and FI because you can calculate in elements instead of bytes.
(This approach is used in the 90Degrees clockwise image rotation example shown in
.) The
double-index addressing example shown in
has ES = 4, EN = 2, EI = 5, FI = 5, and FN = 2.
through
show examples of addressing mode configurations.
lists
parameter values for the examples.
2349
SWPU177N – December 2009 – Revised November 2010
SDMA
Copyright © 2009–2010, Texas Instruments Incorporated