
NUC126
Aug. 08, 2018
Page
381
of 943
Rev 1.03
NUC12
6 S
E
RI
E
S
T
E
CH
NI
CA
L R
E
F
E
RE
NCE
MA
NUA
L
Through Scatter-Gather mode, user can perform peripheral wrapper-around, multiple PDMA tasks or
can be used for data transfer between varied locations in system memory instead of a set of
contiguous locations.
The Ping-Pong audio buffer for I
2
S can be implemented by the wrapper-around two link list tables. The
audio buffer can be divide to two parts that assign to two link list tables for PDMA transfer, then PDMA
controller can loop around two buffer for transferring audio data to I
2
S TX buffer.
One PDMA task is controlled by one description link list table, so multiple description link list tables
can make PDMA controller to perform multiple transfer tasks which the source/destination address can
be different for each task, and it just uses one PDMA channel. Besides, the transfer block of multiple
PDMA tasks can be scatter blocks in system memory.
6.12.5.3 Transfer Type
The PDMA controller supports two transfer types: single transfer type and burst transfer type. They are
configured by setting TXTYPE (PDMA_DSCTn_CTL[2]) bit.
When PDMA controller operated in single transfer type, each transfer data needs one request signal
which is comes from peripheral for one transfer, after transferred data, and TXCNT
(PDMA_DSCTn_CTL[29:16]) bits will decrease 1. Transfer task will be finished after received TXCNT
request signals, then TXCNT (PDMA_DSCTn_CTL[29:16]) bits are decrease to 0. In this mode, the
BURSIZE (PDMA_DSCTn_CTL[6:4]) bits are not useful to control the transfer size, because of the
settings of BURSIZE bits will be ignored by hardware.
For the burst transfer type, PDMA controller transfers TXCNT (PDMA_DSCTn_CTL[29:16]) of data
and only need one request signal from software corresponding channel request SWREQn
(PDMA_SWREQ[4:0]). After transferred BURSIZE (PDMA_DSCTn_CTL[6:4]) of data, TXCNT
(PDMA_DSCTn_CTL[29:16]) will decrease BURSIZE number. Transfer task will done until the transfer
count TXCNT (PDMA_DSCTn_CTL[29:16]) decrease to 0. Note that burst transfer type can only be
used for PDMA controller to do burst transfer between memory and memory. User must use single
request type for memory-to-peripheral and peripheral-to-memory transfers.
Figure 6.12-6 shows an example about single and burst transfer type in basic mode. In this example,
channel 1 uses single transfer type and TXCNT (PDMA_DSCTn_CTL[29:16]) = 127,
TXWIDTH(PDMA_DSCTn_CTL[13:12]) = 0(1 byte). Channel 0 uses burst transfer type, BURSIZE
(PDMA_DSCTn_CTL[6:4]) = 0(128 transfers), TXCNT (PDMA_DSCTn_CTL[29:16]) = 255 and
TXWIDTH(PDMA_DSCTn_CTL[13:12]) = 2(1 word). The operation sequence is described below:
1. Channel 0 and channel 1 get the trigger signal at the same time.
2. Channel 1 has higher priority than channel 0 by default; the PDMA controller will load the
channel 1 descriptor table first and executing. But channel 1 is single transfer type and transfer
width is one byte, so PDMA controller will only transfer 1 byte data.
3. Then, PDMA controller turns to the channel 0 and loads channel 0
’s descriptor table. The
channel 0 is burst transfer type, the burst size selected to 128 and transfer width is one word.
Therefore, PDMA controller will transfer 128 words data.
4. When channel 0 transfers 128 words data, channel 1 gets another request signal, then after
channel 0 finishes 128 words transferred, the PDMA controller will turn to channel 1 and
transfer next 1 byte data.
5. After channel 1 transferred second 1 byte data, PDMA controller switches to low priority
channel 0 to continuous next 128 words data transfer. If no channel 1 request receives, PDMA
will start to transfer next 128 words data for channel 0.
6. PDMA controller will complete transfer when channel 0 finishes data transfer 256 words that
received one request, and channel 1 finishes transferring 128 bytes after received 128
requests.