The world's largest supply platform for sources of shortages and hard-to-find parts

What are DMA

Published Time: 2022-11-14 14:31:57
DMA, the full name is Direct Memory Access, that is, direct memory access.

What are DMAs?

DMA, the full name is Direct Memory Access, that is, direct memory access. DMA transfers copy data from one address space to another, providing high-speed data transfers between peripherals and memory or between memory and memory.


The role of DMA is to realize the direct transmission of data, which removes the traditional data transmission that requires the participation of CPU registers. It mainly involves data transmission in four cases, but they are essentially the same, and they are all transferred from a certain area of the memory to the memory. Another area (the data register of the peripheral is essentially a storage unit of memory).


The data transfer for the four cases is as follows:

peripherals to memory

memory to peripheral

memory to memory

peripheral to peripheral


 DMA transfer parameters 

For data transmission, the core parameters required by DMA are these four:

1. The source address of the data

2. Destination address of data transfer location

3. How much data is transferred?

4. Transfer mode for how many transfers are made


When the user sets the parameters, mainly involving the source address, destination address, and the amount of data to be transferred, the DMA controller will start the data transfer. When the remaining amount of transferred data is 0, the end of the transfer is reached and the DMA transfer ends.


Of course, DMA also has a cyclic transfer mode. When the end of the transfer is reached, the DMA transfer is restarted. That is to say, as long as the amount of remaining data to be transferred is not 0 and the DMA is enabled, data transfer will occur.


 Main features of DMA 

1. On the same DMA module, the priority among multiple requests can be set by software programming (there are four levels in total: very high, high, medium and low), and when the priority settings are equal, it is determined by the hardware (request 0 has priority over request 1, and so on);

2. The transmission width (byte, half-word, full-word) of the independent data source and target data area, simulating the process of packing and unpacking. The source and destination addresses must be aligned by the data transfer width;

4. Support circular buffer management;

5. Each channel has 3 event flags (DMA half transfer, DMA transfer complete and DMA transfer error), these 3 event flags logically OR become a separate interrupt request;

5. Transmission between memory and memory, peripheral and memory, and transmission between memory and peripheral;

6. Flash memory, SRAM, SRAM of peripherals, APB1, APB2 and AHB peripherals can be used as the source and target of access;

7. Programmable data transmission number: the maximum is 65535.


 DMA transfer method 

Method 1: DMA_Mode_Normal, normal mode.

When a DMA data transfer is completed, the DMA transfer is stopped, that is, only one transfer is performed.


Method 2: DMA_Mode_Circular, cyclic transmission mode.

When the transmission is over, the hardware will automatically reload the transmission data volume register for the next round of data transmission. That is, multiple transfer mode.

More Products Hot Selling

MT29F4G08ABADAH4-IT:D
Memory IC
MT29F4G08ABADAH4-IT:D
4Gb, 8Gb, 16Gb: x8, x16 NAND Flash Memory Features MT29F4G08ABADAH4, MT29F4G08ABADAWP, MT29F4G08ABBDAH4, MT29F4G08ABBDAHC, MT29F4G16ABADAH4, MT29F4G16ABADAWP, MT29F4G16ABBDAH4, MT29F4G16ABBDAHC, MT29F8G08ADADAH4, MT29F8G08ADBDAH4, MT29F8G16ADADAH4, MT29F8G16ADBDAH4, MT29F16G08AJADAWP
MT29F2G08ABAEAWP:E
Memory IC
MT29F2G08ABAEAWP:E
2Gb: x8, x16 NAND Flash Memory Features
LDC1101DRCR
Data Acquisition - ADCs/DACs - Special Purpose
LDC1101DRCR
LDC1101 1.8V High Resolution, High Speed Inductance to Digital Converter
TCAN1042GVDRBRQ1
Interface - Drivers, Receivers, Transceivers
TCAN1042GVDRBRQ1
TCAN1042-Q1 Automotive Fault Protected CAN Transceiver with CAN FD CAN 5Mbps Normal/Standby 5V Automotive 8-Pin VSON EP T/R
MAX4651ESE-T
Interface - Analog Switches
MAX4651ESE-T
Analog Switch ICs Low-Voltage, 4 Ohm, Quad, SPST, CMOS Analog Switches,DC 22+
TMP114AIYMTR
Temperature Sensors - Analog and Digital Output
TMP114AIYMTR
TMP114 Ultra-Thin, 1.2-V to 1.8-V Supply, High Accuracy Digital Temperature Sensor with I2C Interface
LM74700QDBVRQ1
PMIC - OR Controllers, Ideal Diodes
LM74700QDBVRQ1
LM74700-Q1 Low IQ Reverse Battery Protection Ideal Diode Controller

Recommended Parts