stm32 DMA performance data

Publisher:nu23Latest update time:2015-11-10 Source: eefocusKeywords:stm32 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
In order to quickly transfer a block of data, the DMA transfer program (Mem to Mem 16bits) was used to measure the transfer time. 128 16b data took about 12us (72Mhz clock). In other words, the STM32 DMA performance is 10M/s


   I used memcpy to compare, and it took about 4us, so memcpy is obviously much faster.

   BTW, there is no description of DMA performance in the ST manual.

------------------------------- ----

DMA transfers data no faster than the CPU directly transfers data, because the total

 

The line frequency does not change.

When the CPU is also running and executing instructions, the speed of DMA transferring data will be slower than that of CPU directly transferring data. This is because DMA and CPU use the same bus in time-sharing.

------------------------------- ----

 

There is a manual dedicated to DMA performance, which you can find on the official website. It
describes DMA performance very clearly
AN2548 Using the STM32F101xx and STM32F103xx DMA controller

------------------------------- ----------

 

This statement is a bit problematic.
DMA data transfer is memory->memory.
Memcpy is memory->cpu_internal_register->memory.

Memcpy is fast probably because 1. memcpy uses ldm/stm instructions, which is very helpful to increase the speed. 2. Bus arbitration favors the CPU core.

-------------------------------------------

Well... the DMA controller is not in the memory? I think you mean MASTER DMA, like PCI. But even with legacy DMA, the DMA controller accessing memory through hardware should be faster than the CPU in general, because there is no need for the process of fetching/decoding/executing. However, the fact that the stm32 controller does not support bust mode does have a great impact on its speed, and the ldm/ stm instructions actually play the role of bust mode, which can operate multiple data in one fetch/decode/ execute process. If the controller supports burst, I believe it can surpass the speed of memcpy. At present, the speed of stm32 DMA is indeed not as fast as memcpy, and its biggest advantage is that the CPU does not need to participate in the process.

------------------------------- -----

I totally agree with byeyear's explanation. By the way, do other brands' M3's DMA also not support burst mode?

------------------------------- ------

 

DMA is not necessarily fast, it just improves the running efficiency of valid code.

Keywords:stm32 Reference address:stm32 DMA performance data

Previous article:STM32+FPGA motion controller
Next article:Comparison of stm32 pwm performance and fpga pulse performance

Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号