What is DMA? How fast is DMA?
Direct Memory Access (DMA): In computer architecture, DMA is a data transfer method that allows external devices to directly access the computer's memory without intervention from the central processing unit (CPU). This helps increase data transfer speeds and system efficiency.
So, how fast is DMA?
Practice makes perfect
As it happens, there is a multi-channel data acquisition project recently. Due to the large number of channels, high resolution, and limited system bandwidth, in order to make the best use of the limited bandwidth, we have to find a way to optimize the timing and leave time for data acquisition and transmission.
The optimization direction is DMA.
The hardware link is that the ADC sends data to the STM32 microcontroller through the SPI interface, and the microcontroller then sends the data to the host computer.
Our goal is to optimize the SPI side, let's first look at the normal acquisition mode.
The figure below shows the normal acquisition mode. After SPI transmits each byte, there is a period of idle time, which is wasted.
Let's take a look at the effect after turning on DMA. SPI can work continuously, the clock rate is stable at 20MHz, and it works efficiently.
This is the power of DMA!
The question is, why does the waveform in the above picture have such a large fluctuation?
The answer can be found in my original book "Hardware Design Guide"
If you have read this far, please like, bookmark and share!
Scan the QR code for free for a limited time to join the group and exchange more industry technologies