GD32F20x User Manual
234
Figure 12-2. Handshake mechanism
DMA
Acknowledge
Peripheral
request
Peripheral is ready to transmit
or receive data, and assert the
request signal to DMA
Peripheral request
Peripheral
request
DMA acknowledge
Wait the DMA bus idle and
other higher priority channels
to have been processed
The corresponding channel has
the highest priority and the DMA
controller sents an AHB command
to access the peripheral
Peripheral releases the
request signal when it receives
the acknowledge signal
The DMA controller deasserts
the acknowledge signal when
it receives low request signal
Peripheral launches
the next request
12.4.3.
Arbitration
When two or more requests are received at the same time, the arbiter determines which
request is served based on the priorities of channels. There are two-stage priorities, including
the software priority and the hardware priority. The arbiter determines which channel is
selected to respond according to the following priority rules:
–
Software priority: Four levels, including low, medium, high and ultra high by configuring
the PRIO bits in the DMA_CHxCTL register.
–
For channels with equal software priority level, priority is given to the channel with lower
channel number.
12.4.4.
Address generation
Two kinds of address generation algorithm are implemented independently for memory and
peripheral, including the fixed mode and the increased mode. The PNAGA and MNAGA bit
in the DMA_CHxCTL register are used to configure the next address generation algorithm of
peripheral and memory.
In the fixed mode, the next address is always equal to the base address configured in the
base address registers (DMA_CHxPADDR, DMA_CHxMADDR).
In the increasing mode, the next address is equal to the current address plus 1 or 2 or 4,
depending on the transfer data width.
12.4.5.
Circular mode
Circular mode is implemented to handle continue peripheral requests (for example, ADC scan
mode). The circular mode is enabled by setting the CMEN bit in the DMA_CHxCTL register.
In circular mode, the CNT bits are automatically reloaded with the pre-programmed value and
the full transfer finish flag is asserted at the end of every DMA transfer. DMA can always
responds the peripheral request until the CHEN bit in the DMA_CHxCTL register is cleared.
Summary of Contents for GD32F20 Series
Page 191: ...GD32F20x User Manual 191 Bits Fields Descriptions 31 0 TRNDATA 31 0 32 Bit Random data ...
Page 290: ...GD32F20x User Manual 290 conversion is ongoing ...
Page 325: ...GD32F20x User Manual 325 15 0 ALRM 15 0 RTC alarm value low ...
Page 385: ...GD32F20x User Manual 385 ...
Page 523: ...GD32F20x User Manual 523 clears AERR bit by writing 0 to it ...