![Geehy SEMICONDUCTOR APM32F030x4x6x8xC Скачать руководство пользователя страница 67](http://html1.mh-extra.com/html/geehy-semiconductor/apm32f030x4x6x8xc/apm32f030x4x6x8xc_user-manual_573629067.webp)
www.geehy.com Page 66
9
Direct Memory Access (DMA)
9.1
Introduction
DMA (Direct Memory Access) can realize direct data transmission between
peripheral devices and memory or between memory and memory without CPU
intervention, thus saving CPU resources for other operations.
DMA has a controller, which has five channels. Each channel can manage
multiple DMA requests, but each channel can only start one DMA request at the
same time. Each channel can set priority, and the arbiter can coordinate the
priority of corresponding DMA requests of each DMA channel according to the
priority of the channels.
9.2
Main Characteristics
(
1
)
DMA has five channels
(
2
)
There are three data transmission modes: peripheral to memory,
memory to peripheral, memory to memory
(
3
)
Each channel has a special hardware DMA request for connection
(
4
)
Support software priority and hardware priority when multiple requests
occur at the same time
(
5
)
Each channel has three event flags and independent interrupts
(
6
)
Support circular transmission mode
(
7
)
The number of data transmission is programmable, up to 65535
9.3
Functional Description
DMA Request
If the peripheral or memory needs to use DMA to transmit data, it is required to
first send DMA request and wait for DMA approval before data transmission.
DMA has five channels. Each channel is connected with different peripherals,
and each channel has three event flags (DMA half transmission, DMA
transmission completion and DMA transmission error). The logic of the three
event flags may become a separate interrupt request, and they all support
software triggering.
When multiple peripherals request the same channel, it is required to configure
the corresponding register to turn on or off the request of each peripheral, so as
to ensure that only one peripheral request can be turned on in a channel.
Table 32 DMA Request Mapping Table 1
Peripheral
Channel 1
Channel 2
Channel 3
Channel 4
Channel 5
TMR1
-
TMR1_CH1
TMR1_CH2
TMR1_CH4
TMR1_TRIG
TMR1_COM
TMR1_CH3
TMR1_UP
TMR3
-
TMR3_CH3
TMR3_CH4
TMR3_UP
TMR3_CH1
TMR3_TRIG
-