GD32A50x User Manual
233
11.3.
Block diagram
Figure 11-1. Block diagram of DMA
Arbiter
AHB
Master
Port
DMA
Configuration
C
o
n
tr
o
l
&
d
a
ta
M
U
X
Channel 0
Channel 1
Channel 2
Channel 6
Memory control
state & counter
management
Peripheral control
state & counter
management
AHB slave
interface
AHB master
interface
…
…
…
…
Transfer
request
dma_req
dma_ack
dma_req
dma_ack
dma_req
dma_ack
dma_req
dma_ack
Figure 11-1. Block diagram of DMA
, a DMA controller consists of four main
parts:
DMA configuration through AHB slave interface.
Data transmission through two AHB master interfaces for memory access and
peripheral access.
An arbiter inside to manage multiple peripheral requests coming at the same time.
Channel management to control address/data selection and data counting.
11.4.
Function overview
11.4.1.
DMA operation
Each DMA transfer consists of two operations, including the loading of data from the source
and the storage of the loaded data to the destination. The source and destination addresses
are computed by the DMA controller based on the programmed values in the
DMA_CHxPADDR, DMA_CHxMADDR, and DMA_CHxCTL registers. The DMA_CHxCNT
register controls how many transfers to be transmitted on the channel. The PWIDTH and
MWIDTH bits in the DMA_CHxCTL register determine how many bytes to be transmitted in a
transfer
.
Suppose DMA_CHxCNT is 4, and both PNAGA and MNAGA are set. The DMA transfer
operations for each combination of PWIDTH and MWIDTH are shown in the following