www.geehy.com Page 72
to the initial value and continue DMA operation until the CIRMODE bit
is cleared and the system exits the circular mode
9.3.2.5
DMA request priority setting
Arbitrator
When multiple DMA channel requests occur, an arbiter is needed to manage the
response sequence. Management is divided into two stages: the first stage is
software stage, which is divided into the highest, high, medium and low priority;
the second stage is hardware stage, and under the condition of the same
software priority, the lower the channel number is, the higher the priority is.
9.3.2.6
Transmission direction
Support three directions: from memory to memory, from memory to peripheral,
and from peripheral to memory.
If the write operation (target address) is performed on the memory, the memory
includes external RAM supported by internal SRAM (such as external SRAM); if
the read operation (source address) is performed on the memory, the address
includes internal FLASH and internal SRAM.
Examples of "from memory to memory" configuration are as follows:
The M2MMODE bit of the configuration register DMA_CHCFGx is set
to put the memory to the memory mode
The DMA operation in this mode is performed under the condition of
no peripheral request. The CHEN bit of the configuration register
DMA_CHCFGx is set to 1, and after the channel is opened, the data
transmission will start and when the transmission quantity register
DMA_CHNDATAx becomes 0, the transmission is over
Interrupt
Each DMA channel has three types of interrupt events, which are half
transmission (HT), transmission completion (TC) and transmission error (TE).
(
1
)
The interrupt event flag bit for half transmission is HTFLG, and the
interrupt enable control bit is HTINTEN
(
2
)
The interrupt event flag bit for transmission completion is TCFLG, and
the interrupt enable control bit is TCINTEN
(
3
)
The interrupt event flag bit for transmission error is TERRFLG, and the
interrupt enable control bit is TERRINTEN
9.4
Register Address Mapping
Table 34 DMA Register Address Mapping
Register name
Description
Offset address
DMA_INTSTS
DMA interrupt state register
0x00
DMA_INTFCLR
DMA interrupt flag clear register
0x04
DMA_CHCFGx
DMA Channel x configuration register
0x08+ 20 x
DMA_CHNDATAx
DMA Channel x transmission quantity register
0x0C+ 20 x
DMA_CHPADDRx
DMA Channel x peripheral address register
0x10+ 20 x
DMA_CHMADDRx
DMA Channel x memory address register
0x14 + 20 x