ADuCM320 Hardware Reference Manual
UG-498
Rev. C | Page 61 of 196
DMA CONTROLLER
DMA FEATURES
•
14 dedicated and independent DMA channels.
•
Two programmable priority levels for each DMA channel.
o
Each priority level arbitrates using a fixed priority that is determined by the DMA channel number.
o
Channels with lower numbers have higher priority. For example, SPI0 transmit has the highest priority, and the next highest is
the SPI0 receive.
•
Each DMA channel can access a primary and/or alternate channel control structure.
•
Supports multiple DMA transfer types.
o
Memory to memory
o
Memory to peripheral
o
Peripheral to memory
DMA OVERVIEW
Direct memory access (DMA) is used to provide high speed data transfer between peripherals and memory. Data can be moved quickly
by DMA without any processor actions. This keeps processor resources free for other operations.
The DMA controller has 14 channels in total. The 14 channels used are dedicated to managing DMA requests from specific peripherals.
Channels are assigned as shown in Table 71.
Table 71. DMA Channel Assignment
Channel
Peripheral
0
SPI0 Tx
1
SPI0 Rx
2
SPI1 Tx
3
SPI1 Rx
4
UART Tx
5
UART Rx
6
I2C0 slave Tx
7
I2C0 slave Rx
8
I2C0 master
9
I2C1 slave Tx
10
I2C1 slave Rx
11
I2C1 master
12
ADC
13
Flash
The channels are connected to dedicated hardware DMA requests; a software trigger is also supported on each channel. This
configuration is done by software. Each DMA channel has a programmable priority level: default or high. Within a priority level,
arbitration is performed using a fixed priority that is determined by the DMA channel number. Channels with lower numbers have
higher priority. For example, SPI0 transmit has the highest priority, and the next highest is the SPI0 receive.
The DMA controller supports multiple DMA transfer data widths—independent source and destination transfer size (byte, half word, and
word). Source/destination addresses must be aligned on the data size.
The DMA controller supports peripheral-to-memory, memory-to-peripheral, and memory-to-memory transfers and access to flash or
SRAM as source and destination.
DMA OPERATION
The DMA controller performs direct memory transfer by sharing the system bus with the Cortex-M3 processor. The DMA request may
stall the processor access to the system bus for some bus cycles when the processor and DMA are targeting the same destination (memory
or peripheral).
DMA INTERRUPTS
An interrupt can be produced for each DMA channel when a transfer is complete. Separate interrupt enable bits are available in the NVIC
for each of the DMA channels.