
AT32F435/437
Series Reference Manual
2022.11.11
Page 676
Rev 2.03
29.3 Functional overview
29.3.1 Flow configuration
1.
Set the peripheral address in the DMA_CxPADD register
The initial peripheral address for data transfer remains unchanged during transmission.
2.
Set the memory address in the DMA_CxMADDR register
The initial memory address for data transfer remains unchanged during transmission.
3.
Configure the amount of data to be transferred in the DMA_CxDTCNT register
Programmable data transfer size is up to 65535. This value is decremented after each data transfer.
4.
Configure the channel setting in the DMA_CxCTRL register
Including channel priority, data transfer direction/width, address incremented mode, circular mode
and interrupt mode
Channel select (CHSEL)
Each of the streams can be selected up to 8 possible channel requests
Channel priority (SPL)
There are four levels, including very high priority, high priority, medium priority and low priority.
If two channels have the same priority level, the channel with lower number will get priority over the
one with higher number. For example, stream 1 has priority over stream 2.
Data transfer direction (DTD)
Memory-to-peripheral (M2P), peripheral-to-memory (P2M) or memory-to-memory (M2M)
In M2M mode, circular mode, dual memory mode and direct mode cannot be used.
Address incremented mode (PINCM/MINCM)
In incrementing mode, the subsequent transfer address is the previous address plus transfer width
(PWIDTH/MWIDTH).
Data transfer mode (PBURST/MBURST)
Single transfer or burst transfer.
In non-incrementing mode, burst transfers of 4, 8 or 16 beats are translated into 4, 8 or 16 single
transfers.
In direct mode, PBURST and MBURST bits are forced to 0 (single transfer mode)
Peripheral flow control (PFCTRL)
If PFCTRL = 1 (peripheral flow control is used), the value of the DMA_SxDTCNT register is forced to
0xFFFF. The dma_ch_lt signal of the peripherals indicates the completion of data transfer. The M2M
mode and circular mode cannot be used in Peripheral Flow Control.
Circular mode (LM)
In circular mode, the contents in the DMA_CxDTCNT register is automatically reloaded with the
initially programmed value after the completion of the last transfer.
Dual memory mode (DMM)
When the flow is configured in dual memory mode, the hardware will automatically enable circular
mode. Two memory pointers (DMA_SxM0ADR/ DMA_SxM1ADR) are available in dual memory flow.
The CM bit indicates which one of the memory pointers is being used. The software is allowed to
process another memory while the DMA is filling up or using the second memory.
5.
FIFO settings through the DMA_SxFCTRL register
This includes FIFO threshold value select, direct mode disable and FIFO error interrupt enable bit.
FIFO threshold select (FTHSEL)
1/4, 2/4, 3/4 and full FIFO threshold values are available for selection. This bit is applicable to the non-
direct mode only.
FIFO mode (FEN)
Direct mode (FEN = 0) can be used only in P2M or M2P mode, and the transfer width of peripherals and
memories must be equal (MWIDTH = PWIDTH), and single transfer mode is enabled (PBURST =
MBURST = 0). This bit (FEN) will be forced to 1 in M2M mode.