
M0A21/M0A23 Series
May 06, 2022
Page
261
of 746
Rev 1.02
M0
A21
/M
0
A
2
3
SE
RIES
TEC
H
NICAL
RE
FEREN
C
E
M
ANUAL
0
4
Channel4, Round-Robin Priority
---
0
3
Channel3, Round-Robin Priority
---
---
---
---
---
0
0
Channel0, Round-Robin Priority
Lowest
Table 6.6-1 Channel Priority Table
6.6.5.2
PDMA Operation Mode
The PDMA controller supports two operation modes including Basic mode and Scatter-Gather mode.
Basic Mode
Basic mode is used to perform one descriptor table transfer mode. This mode can be used to transfer
data between memory and memory, peripherals and memory or peripherals and peripherals, but if user
want to transfer data between peripherals and peripherals, one thing must be sured is that the request
from peripherals knows that the data is ready for transfer or not. PDMA controller operation mode can
be set from OPMODE (PDMA_DSCTn_CTL[1:0], n denotes PDMA channel), the default setting is in
idle state (OPMODE (PDMA_DSCTn_CTL[1:0]) = 0x0) and recommend user configure the descriptor
table in idle state. If operation mode is not in idle state, user re-configure channel setting may make
some operation error.
User must fill the transfer count TXCNT (PDMA_DSCTn_CTL[31:16]) register and select transfer width
TXWIDTH
(PDMA_DSCTn_CTL[13:12]),
destination
address
increment
size
DAINC
(PDMA_DSCTn_CTL[11:10]), source address increment size SAINC (PDMA_DSCTn_CTL[9:8]), burst
size BURSIZE (PDMA_DSCTn_CTL[6:4]) and transfer type TXTYPE (PDMA_DSCTn_CTL[2]), then the
PDMA controller will perform transfer operation in transfer state after receiving request signal. Finishing
this task will generate an interrupt to CPU if corresponding PDMA interrupt bit INTENn
(PDMA_INTEN[4:0]) is enabled and the operation mode will be updated to idle state as shown in Figure
6.6-3. If software configures the operation mode to idle state, the PDMA controller will not perform any
transfer and then clear this operation request. Finishing this task will also generate an interrupt to CPU
if corresponding PDMA interrupt bit is enabled.
Idle State
Transfer State
OPMODE (PDMA_DSCTn_CTL[1:0]) = 0x1
OPMODE (PDMA_DSCTn_CTL[1:0]) = 0x0
Transfer done
Next Request
Figure 6.6-3 Basic Mode Finite State Machine
Scatter-Gather Mode
Scatter-Gather mode is a complex mode and can perform sophisticated transfer through the use of the
description link list table as shown in Figure 6.6-4. Through operation mode user can perform peripheral
wrapper-around, and multiple PDMA task can be used for data transfer between varied locations in
system memory instead of a set of contiguous locations. Scatter-gather mode only needs a request to
finish all table entries task till the last task with OPMODE (PDMA_DSCTn_CTL[1:0]) is idle state without
ack. It also means scatter-gather mode can be used to transfer data between memory to memory without
handshaking.
In Scatter-Gather mode, the table is just used for jumping to the next table entry. The first task will not