English
Language : 

EFM32WG Datasheet, PDF (69/834 Pages) List of Unclassifed Manufacturers – The EFM32WG Wonder Gecko is the ideal choice for demanding 8-, 16-, and 32-bit energy sensitive applications.
...the world's most energy friendly microcontrollers
0x5E7
10
0x14
0x5D3
DMA transfers
0x5E7
0x5E7
9
0x12
8
0x10
0x5D5
0x5D7
0x5E7
7
0xE
0x5D9
0x5E7
6
0xC
0x5DB
0x5E7
5
0xA
0x5DD
0x5E7
4
0x8
Values of channel_cfg after 2R DMA transfers
0x5DF
src_size = b00, dst_inc = b01, n_minus_1 = b011, cycle_ctrl = 1, R_power = b11
End Pointer
Count Difference
Address
0x5E7
3
0x6
0x5E1
0x5E7
2
0x4
0x5E3
DMA transfers
0x5E7
0x5E7
1
0x2
0
0x0
0x5E5
0x5E7
Final values of channel_cfg, after the DMA cycle
src_size = b00, dst_inc = b01, n_minus_1 = 0, cycle_ctrl = 0 2, R_power = b11
1This value is the result of count being shifted left by the value of dst_inc.
2After the controller completes the DMA cycle it invalidates the channel_cfg memory location by clearing the cycle_ctrl field.
8.4.4 Looped Transfers
A regular DMA channel is done when it has performed the number of transfers given by the channel
descriptor. If an application wants a continuous flow of data, one option is to use ping-pong mode,
alternating between two descriptors and having software update one descriptor while the other is being
used. Another way is to use looped transfers.
For DMA channels 0 and 1, looping can be enabled by setting EN in DMA_LOOP0 and DMA_LOOP1
respectively. A looping DMA channel will on completion set the respective DONE interrupt flag, but then
reload n_minus_1 in the channel descriptor with the loop width defined by WIDTH in DMA_LOOPx and
continue transmitting data.
The total length of the transfer is given by the original value of n_minus_1 in the channel descriptor and
WIDTH in DMA_LOOPx times the number of loops taken. The loop feature can for instance be used to
implement a ring buffer, contiguously overwriting old data when new data is available. To end the loop
clear EN in DMA_LOOPx. The channel will then complete the last loop before stopping.
8.4.5 2D Copy
In addition to looped transfers, DMA channel 0 has the ability to do rectangle transfers, or 2D copy. For
an application working with graphics, this would mean the ability to copy a rectangle of a given width and
height from one picture to another. The DMA also has the ability to copy from linear data to a rectangle,
and from a rectangle to linear data.
To set up rectangle copy for DMA channel 0, configure WIDTH in DMA_LOOP0 to one less than
the rectangle width, and HEIGHT in DMA_RECT0 to one less than the rectangle height. Then
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. 70) .
2013-05-08 - Wonder Gecko Family - d0233_Rev0.50
69
www.energymicro.com