![GigaDevice Semiconductor GD32E23 Series Скачать руководство пользователя страница 142](http://html.mh-extra.com/html/gigadevice-semiconductor/gd32e23-series/gd32e23-series_user-manual_2225794142.webp)
GD32E23x User Manual
142
8.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.
8.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.
8.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.
8.4.6.
Memory to memory mode
The memory to memory mode is enabled by setting the M2M bit in the DMA_CHxCTL
register. In this mode, the DMA channel can also work without being triggered by a request
from a peripheral. The DMA channel starts transferring as soon as it is enabled by setting the
CHEN bit in the DMA_CHxCTL register, and completed when the DMA_CHxCNT register
reaches zero.