GD32W51x User Manual
324
Note:
when the switch-buffer mode is enabled by setting the SBMEN bit in the DMA_CHxCTL
register, the circular mode is enabled automatically by hardware, and the above rules must
also be respected.
FIFO
A four-word depth 32-bit FIFO is implemented as a data buffer for each DMA channel. Data
reading from the source address is stored in the FIFO temporarily and transmitted to the
destination through the destination port. Two data processing modes are supported depend
on the FIFO configuration, including single-data mode and multi-data mode. When the
transfer mode is memory-to-memory, only multi-data mode is supported to implement the
DMA data processing.
Multi-data mode
The multi-data mode is selected by configuring the MDMEN bit in the DMA_CHxFCTL register
to ‘1’.
In this mode, the DMA responds the source request when there is enough FIFO space for a
source transfer, pushing the data reading from the source address into the FIFO. If the
destination is a peripheral, the DMA responds the peripheral request when there is enough
FIFO data for a peripheral burst transfer. If the memory is configured as the destination, the
FIFO counter critical value configured in the FCCV bits of the DMA_CHxFCTL register
controls the memory data processing. Only when the FIFO counter is reached the critical
value, the data in the FIFO are entirely poped and written into the memory address.
To gurantee a good DMA behavior, the FIFO counter critical value (FCCV bits in the
DMA_CHxFCTL register) must be an integer multiple of a memory burst transfer to ensure
there is enough data for memory burst transfers. The configuration rules of the FIFO counter
critical value depending on memory transfer width and memory burst types are listed in
12-5. FIFO counter critical value configuration rules
.
Table 12-5. FIFO counter critical value configuration rules
MWIDTH MBURST
FIFO counter critical value
1-w ord
2-w ord
3-w ord
4-w ord
8-bit
single
4 single
transactions
8 single
transactions
12 single
transactions
16 single
transactions
INCR4
1 burst transaction
2 burst
transactions
3 burst transactions 4 burst transactions
INCR8
ERROR
1 burst transaction
ERROR
2 burst transactions
INCR16
ERROR
ERROR
ERROR
1 burst transaction
16-bit
single
2 single
transactions
4 single
transactions
6 single
transactions
8 single
transactions
INCR4
ERROR
1 burst transaction
ERROR
2 burst transactions
INCR8
ERROR
ERROR
ERROR
1 burst transaction
INCR16
ERROR
ERROR
ERROR
ERROR