GD32W51x User Manual
317
12.4.
Function overview
The DMA controller transfers data from one address to another without CPU intervention. It
supports multiple data sizes, burst types, address generation algorithm, priority levels and
several transfer modes to allow for flexible application by configuring the c orresponding bits
in DMA registers. All the DMA registers can be 32-bit configured through AHB slave interface.
Three transfer modes are supported, including peripheral-to-memory, memory-to-peripheral
and memory-to-memory, which is determined by the TM bits in the DMA_CHxCTL register,
as listed in
.
Table 12-1. Transfer mode
Transfer m ode
TM[1:0]
Source
Destination
Peripheral to memory
00
DMA_CHx PADDR
DMA_CHx M0ADD R/
DMA_CHx M1ADD R1
Memory to peripheral
01
DMA_CHx M0ADD R/
DMA_CHx M1ADD R
DMA_CHx PADDR
Memory to memory
10
DMA_CHx PADDR
DMA_CHx M0ADD R/
DMA_CHx M1ADD R
Note
:
1. The MBS bit in DMA_CHxCTL register determines which is selected as the memory buffer
address in DMA_CHxM0ADDR and DMA_CHxM1ADDR register. For more information, refer
to section
.
2. The TM bits in DMA_CHxCTL register are forbidden to configure to 0b11, or the channel
will be automatically disabled.
Figure 12-2. Data stream for three transfer modes
peripheral
DMA
FIFO
peripheral
port
memory
port
(DMA_CHxPADDR)
memory
(DMA_CHxM0ADDR/
DMA_CHxM1ADDR)
AHB master
interface
request
peripheral-to-memory
peripheral
DMA
FIFO
peripheral
port
memory
port
AHB master
interface
(DMA_CHxPADDR)
memory
(DMA_CHxM0ADDR/
DMA_CHxM1ADDR)
AHB master
interface
request
memory-to-peripheral
memory
DMA
FIFO
peripheral
port
memory
port
(DMA_CHxPADDR)
memory
(DMA_CHxM0ADDR/
DMA_CHxM1ADDR)
AHB master
interface
memory-to-memory
As shown in
Figure 12-2. Data stream for three transfer modes
, Two AHB master