...the world's most energy friendly microcontrollers
2016-04-28 - Giant Gecko Family - d0053_Rev1.20
69
www.silabs.com
set SRCSTRIDE in DMA_RECT0 to the outer rectangle width of the source, and DSTSTRIDE in
DMA_RECT0 to the outer rectangle width of the destination rectangle. Finally, the channel descriptor for
channel 0 has to be configured. The source and destination end pointers should be set to the last element
of the first line of the source data and destination data respectively. The number of elements to be
transferred, n_minus_1 should be set equal to WIDTH in DMA_LOOP0. The parameters are visualized
in Figure 8.9 (p. 69) .
Figure 8.9. 2D copy
Source buffer
Dest inat ion buffer
SRCSTRIDE
DSTSTRIDE
WIDTH
H
E
IG
H
T
WIDTH
H
E
IG
H
T
Source
end
point er
Dest inat ion
end point er
When doing a rectangle copy, the source and destination address of the channel descriptor will be
incremented line for line as the DMA works its way through the rectangle. The operation is done when
the number of lines specified by HEIGHT in DMA_RECT0 has been copied. The source and destination
addresses in the channel descriptor will then point at the last element of the source and destination
rectangles.
On completion, the DONE interrupt flag of channel 0 is set. Looping is not supported for rectangle copy.
In some cases, e.g. when performing graphics operations, it is desirable to create a list of copy operations
and have them executed automatically. This can be done using 2D copy together with the scatter gather
mode of the DMA controller. Set DESCRECT in DMA_CTRL to override SCRSTRIDE and HEIGHT
in DMA_RECT0 and WIDTH in DMA_LOOP0 by the values in the user part of the DMA descriptor as
shown in Table 8.12 (p. 69) . In this way every copy command in the list can specify these parameters
individually.
Table 8.12. User data assignments when DESCRECT is set
Bit
Field
Description
[30:20]
SRCSTRIDE
Stride in source buffer
[19:10]
HEIGHT
Height - 1 of data to be copied
[9:0]
WIDTH
Width - 1 of data to be copied
With regular 2D copy, the DMA descriptor will be updated as the copy operation proceeds. To be able to
reuse the 2D copy scatter gather list without rewriting source and destination end addresses, set PRDU
Summary of Contents for Giant Gecko EFM32GG
Page 842: ......