GD32W51x User Manual
323
If the circular mode is disabled by clearing the CMEN bit in the DMA_CHxCTL register, the
rules to configure the CNT bits in the DMA_CHxCNT register based on the transfer width are
listed in the
The number of data bytes must be an integer multiple of the memory transfer width to
guarantee an integrated single memory transfer.
Note
: The number of data bytes does not need to be an interger multiple of the bytes number
of a memory burst transfer or a peripheral burst number if the PBURST or/and MBURST bits
are not equal to ‘00’. The remaining data not enough for a burst transfer are transferred can
be divided into single transaction automatically.
Table 12-4. CNT configuration
PWIDTH
MWIDTH
CNT
8-bit
16-bit
Multiple of 2
8-bit
32-bit
Multiple of 4
16-bit
32-bit
Multiple of 2
Others
Any value
1. If the circular mode is enabled by setting the CMEN bit in the DMA_CHxCTL register. The
number of data bytes must be an integer multiple of the byte number of a peripheral burst
transfer and a memory burst transfer to gurantee an integrated memory and peripheral
burst transfer:
a) CNT PBURST_beats
⁄
must be an integer.
b)
(CNT × PWIDTH_bytes)
(MBURST_beats × MWIDTH_bytes)
⁄
must be an integer.
①
PWIDTH_bytes is the byte number of the peripheral transfer width, 1 for 8-bit, 2 for 16-bit
and 4 for 32-bit.
②
PBURST_beats is the beat number of a peripheral burst transfer, 1 for single burst, 4 for
INCR4, 8 for INCR8 and 16 for INCR16.
③
MWIDTH_bytes is the byte number of the peripheral transfer width, 1 for 8-bit, 2 for 16-bit
and 4 for 32-bit.
④
MBURST_beats is the beat number of a peripheral burst transfer, 1 for single burst, 4 for
INCR4, 8 for INCR8 and 16 for INCR16.
For example:
1.
If PWIDTH is 16-bit, PBURST is INCR4, MWIDTH is 8-bit and MBURST is INCR16,
CNT 4
⁄
and
( CNT×2) (1×16)
⁄
must be an integer, so the CNT bits must be configured
to the multiple of 8.
2.
If the If PWIDTH is 8-bit, PBURST is INCR16, MWIDTH is 16-bit and MBURST is INCR4,
CNT 16
⁄
and
( CNT×1) (2×4)
⁄
must be an integer, so the CNT bits must be configured
to the multiple of 16.