![Nations N32G43 Series Скачать руководство пользователя страница 161](http://html1.mh-extra.com/html/nations/n32g43-series/n32g43-series_user-manual_3408051161.webp)
Nations Technologies Inc.
Tel
:
+86-755-86309900
:
Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North.
Nanshan District, Shenzhen, 518057, P.R.China
138
/
631
3.
Configure channel priority, 0: lowest, 3: highest.
4.
Configure peripheral and memory address increment.
5.
Configure channel transfer block size.
6.
If necessary, configure circular mode.
7.
If it is memory to memory, configure MEM2MEM mode (Note: to configure DMA to work in M2M mode, user
needs to set corresponding channel select value to reserved value, e.g., 63).
8.
Repeat step 1~8 on channel 1~8 and finally.
9.
Enable corresponding channel.
If software is used to serve interrupt, software must enquire interrupt status register to check which interrupt occurred
(software needs to write 1 to interrupt flag clear bit to clear the corresponding interrupt). Before enable channel, all
interrupts corresponding to the channel should be cleared.
If the interrupt is transfer complete interrupt, software can configure the next transfer, or report to user this channel
transformation is done.
Flow control
Three major flow controls are supported:
Memory to memory
Memory to peripheral
Peripheral to memory
Flow control is controlled by two register bits in each DMA channel configuration register. Flow control is used to
control source/destination and direction of DMA channel.
Table 7-2 Flow control table
DMA_CHCFGx.MEM2MEM DMA_CHCFGx.DIR
Source
Destination
Transfer
1
x
Memory
Memory
AHB read to AHB write, can do back2back
transfer
0
1
Memory
AHB
Peripheral
AHB read to AHB write, single transfer
APB
Peripheral
AHB read to APB write, single transfer
0
0
AHB
Peripheral
Memory
AHB read to AHB write, single transfer