...the world's most energy friendly microcontrollers
2014-07-02 - Tiny Gecko Family - d0034_Rev1.20
57
www.silabs.com
Bit
Field
Value
Description
[20:18]
src_prot_ctrl
-
Configures the state of
HPROT
when the controller reads the source data
[13:4]
n_minus_1
N
1
Configures the controller to perform N DMA transfers, where N is a multiple of four
[3]
next_useburst
-
When set to 1, the controller sets the chnl_useburst_set [C] bit to 1 after the
alternate transfer completes
1
Because the R_power field is set to four, you must set N to be a multiple of four. The value given by N/4 is the number of times
that you must configure the alternate data structure.
See Section 8.4.3.3 (p. 61) for more information.
Figure 8.5 (p. 57) shows a peripheral scatter-gather example.
Figure 8.5. Peripheral scatter-gather example
Copy from A in
m em ory, t o Alt ernat e
Request
Task A
Task B
Request
Copy from B in
m em ory, t o Alt ernat e
Request
Request
Copy from C in
m em ory, t o Alt ernat e
Task C
Copy from D in
m em ory, t o Alt ernat e
Task D
Peripheral scat t er- gat her t ransact ion:
For all prim ary t o alt ernat e t ransit ions,
t he cont roller does not ent er t he
arbit rat ion process and im m ediat ely
perform s t he DMA t ransfer t hat t he
alt ernat e channel cont rol dat a st ruct ure
specifies.
1. Configure prim ary t o enable t he copy A, B, C, and D operat ions: cycle_ct rl = b110, 2
R
= 4, N = 16.
Init ializat ion:
2. Writ e t he prim ary source dat a in m em ory, using t he st ruct ure shown in t he following t able.
cycle_ct rl = b111, 2
R
= 4, N = 3
cycle_ct rl = b111, 2
R
= 2, N = 8
cycle_ct rl = b111, 2
R
= 8, N = 5
cycle_ct rl = b001, 2
R
= 4, N = 4
src_dat a_end_pt r
dst _dat a_end_pt r
channel_cfg
Unused
0x 0A000000
0x 0AE00000
0x 0B000000
0x 0BE00000
0x 0C000000
0x 0CE00000
0x 0D000000
0x 0DE00000
0x XXXXXXXX
0x XXXXXXXX
0x XXXXXXXX
0x XXXXXXXX
Dat a for Task A
Dat a for Task B
Dat a for Task C
Dat a for Task D
Request
Request
Request
Primary
Alternate
dma_done[C]
N = 3, 2
R
= 4
N = 8, 2
R
= 2
N = 5, 2
R
= 8
N = 4, 2
R
= 4
In Figure 8.5 (p. 57) :
Initialization
1. The host processor configures the primary data structure to operate in peripheral
scatter-gather mode by setting cycle_ctrl to b110. Because a data structure for a
single channel consists of four words then you must set 2
R
to 4. In this example,
there are four tasks and therefore N is set to 16.
2. The host processor writes the data structure for tasks A, B, C, and D to the
memory locations that the primary src_data_end_ptr specifies.
3. The host processor enables the channel.
The peripheral scatter-gather transaction commences when the controller receives a request on
dma_req[ ]
. The transaction continues as follows:
Summary of Contents for EFM32TG
Page 543: ......