Questions tagged [dma]

Direct memory access (DMA) is a feature of computerized systems that allows certain hardware subsystems to access main system memory independently of the central processing unit (CPU).

Direct memory access, or DMA , is the advanced topic that completes our overview of memory issues. DMA is the hardware mechanism that allows peripheral components to transfer their I/O data directly to and from main memory without the need to involve the system processor. Use of this mechanism can greatly increase throughput to and from a device, because a great deal of computational overhead is eliminated.

241 questions
19
votes
7 answers

What's the point of DMA in embedded CPU's?

I was doing a project recently with the mbed (LPC1768), using the DAC to output various waves. I read parts of the datasheet, and it talked about how it had DMA for a lot of the peripherals. This seemed like it would be useful, but on further…
BeB00
  • 5,303
  • 2
  • 18
  • 34
19
votes
5 answers

Does a CPU completely freeze when using a DMA?

I have pretty straightforward question, but I couldn't find an answer to it anywhere. On a Von-Neumann system where code and data live in the same RAM, the CPU must fetch all its instructions from memory. Now, in order to move large amounts of data…
Mahkoe
  • 713
  • 6
  • 18
13
votes
6 answers

Why not always use DMA in favor of interrupts with UART on STM32?

I spend last month a lot of time getting UART (for MIDI) to work with an STM (STM32F103C8T6) using interrupts, without very much success. However, this evening using DMA it worked quite fast. Since as far as I read DMA is faster and relieves the…
Michel Keijzers
  • 13,867
  • 18
  • 69
  • 139
10
votes
1 answer

STM32 SRAM to DMA GPIO pins

I wish to transfer a large array of data to 8 output pins that are all on the same port. E.g. a 500 element 8bit array where each bit of each element represents the pin status. So 500 independent transfers to the port would be required. I have been…
gorge
  • 119
  • 1
  • 5
7
votes
3 answers

Memory To Memory DMA on STM32

According to STM32F407 reference manual page 313, memory to memory mode in DMA is a mode that doesn't need any triggering request from a peripheral and it will happen just after the stream enable bit is set. (also we know from the reference that…
Amin Rostami
  • 889
  • 3
  • 12
  • 29
7
votes
1 answer

What do these arrows on a pinout represent?

What do these arrows represent? Is there any way to memorize it easily?
Mark Henry
  • 73
  • 3
7
votes
4 answers

Method or function to determine if pointer is to address in flash or RAM?

I'm working with an ARM Cortex M4 microcontroller that has a DMA, or peripheral DMA controller. One requirement of the DMA is that it cannot access pointers to addresses that exist in flash, but only pointers to addresses that are in RAM. Is there a…
Pugz
  • 821
  • 2
  • 10
  • 22
6
votes
5 answers

STM32 ADC+DMA occurring only once

I'm trying to poll the value of the ADC and store it in a variable using DMA but the variable store the value of the ADC1->DR only once(when the program start). In the debug the value of ADC1->DR change but the variable stay the same. This is my…
Mourad
  • 355
  • 7
  • 18
6
votes
2 answers

STM32 DMA: continuous peripheral to memory (array) transfer

I am trying to use a DMA in circular mode to transfer data from an ADC to an array that will hold the data. I need to concurrently use the incoming data (in this case, I am using AT commands to send the data over Wi-Fi with the esp8266 module) I am…
Ace Mango
  • 63
  • 1
  • 1
  • 4
6
votes
2 answers

STM32: avoiding DMA & CPU collisions

Section 13.4 of the STM32 Reference Manual (for my STM32F303RE board) states: The DMA controller performs direct memory transfer by sharing the system bus with the Cortex-M4 ® F core. The DMA request may stop the CPU access to the system bus for…
Zuzu Corneliu
  • 316
  • 3
  • 13
5
votes
5 answers

Processing ADC conversion result: DMA vs Processor Registers

I have a periodic ADC conversion (every 50 micro-seconds) and I use the result to do some further calculations and update the PWM load registers. The ADC is triggered by the up-down counter of hardware PWM and has to be done exactly at that time. I…
5
votes
2 answers

Configuring the DMA request multiplexer on a STM32H7 MCU

I have recently switched to the newly-produced SM32H7 MCUs and I am currently in the process of migrating some of my old code to them (I want to see how they handle some applications that require a bit more speed). The H7s feature a DMA request…
K.R.
  • 591
  • 7
  • 15
5
votes
1 answer

STM32 HAL UART Transmit DMA problem

After setting up my project for a custom STM32F7 board which includes a FT2232H UART<->USB converter I got multiple problems when sending (and receiving data). The code I use is mostly generated by CubeMX and is at the end of the post. First of all…
JaneDoe
  • 53
  • 1
  • 5
5
votes
2 answers

STM32F4 How to stop triple interleaved mode?

I am using triple interleaved mode with DMA in STM32F429 and have problem stopping it. It should be stopped by HAL_ADCEx_MultiModeStop_DMA(&hadc1), but while debugging it gives HAL_DMA_ERROR_NO_XFER error during HAL_DMA_Abort function. I suspect it…
ScienceSamovar
  • 1,206
  • 3
  • 20
  • 39
5
votes
2 answers

DMA triggered by Timer using STM32F4-Discovery board

I am trying to trigger the DMA peripheral by the Timer using STM32F4-Discovery board, but it doesn't seem to work. I want to get the value of a port (Port C) every 5 ms and save the value in memory at certain address. When the timer (TIM5) overflows…
DragonflyN
  • 51
  • 1
  • 5
1
2 3
16 17