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).

Filter by
Sorted by
Tagged with
17
votes
7answers
10k views

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 ...
17
votes
5answers
5k views

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 ...
10
votes
6answers
9k views

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

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 ...
7
votes
4answers
1k views

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 ...
6
votes
1answer
836 views

What do these arrows on a pinout represent?

What do these arrows represent? Is there any way to memorize it easily?
6
votes
1answer
5k views

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 ...
5
votes
5answers
484 views

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 ...
5
votes
2answers
12k views

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 ...
5
votes
2answers
2k views

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 ...
5
votes
1answer
921 views

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 ...
4
votes
1answer
4k views

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 ...
4
votes
1answer
3k views

Axi DMA correct parameters

I'm making my design with Vivado HLs and Vivado and I'm doing some somewhat big transfers between DDR and my custom IP block and vice-versa. Each transfer from DDR to custom IP is of 256x256x4=262144 ...
4
votes
3answers
3k views

STM32 DMA Transfer bridge between 2 uart ports

I am using a stm32f103 and I'm trying to simply transmit all data received on 1 uart to another uart and vice versa. When using 2 terminal programs it works great, everything I type gets transmitted ...
4
votes
2answers
14k views

STM32 USART with DMA — which interrupts to use?

I'm working on firmware for an STM32F103 which is communicating over RS232 at 115200 baud with a motor controller. The motor controller (a Copley Xenus XTL) operates on a "speak when spoken to" ...
4
votes
1answer
4k views

HAL + DMA + UART = STM32 crash

I'm currently working on a project which involves communication between a STM32F303RE (Nucleo board) and a classic GSM/GPS SIM808 module plus other peripherals. I want to use the DMA + UART of the ...
4
votes
1answer
613 views

SPI loopback with DMA

I am using STM32F4 discovery board and I am attempting to get SPI loopback with DMA. I have successfully got an "SPI-only" loopback running, but now I want use DMA in addition with the SPI, here are ...
4
votes
0answers
238 views

Setting up T2080 to FPGA PCie DMA

I'm doing an FPGA design using a T2080 MPC interfacing to an Altera Cyclone V FPGA. The goal is to use my FPGA to pump 2 other FPGAs on the same board. I need to create a scheme that allows the ...
3
votes
3answers
9k views

STM32 HAL UART transmission

I'm trying to send data by STM32f103 to an Arduino board using UART. Data isn't received properly. The code is generated using STM32CUBEMX and here is the part I added: STM32 code (Transmit): ...
3
votes
1answer
4k views

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 ...
3
votes
2answers
8k views

STM32F3 Circular DMA

I'm having some trouble getting my memory to GPIO DMA circular settings right. The initialization code pasted below has some issues. I'm trying moving data from a uint16_t array to the GPIO->ODR ...
3
votes
2answers
1k views

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 ...
3
votes
3answers
7k views

STM32 SPI half duplex (1-wire Bidirectional) problem

Update: see my answer for fix. I'm trying to read 4 byte from a SPI-compatible slave (MAX31855) in 1-wire bidirectonal SPI half-duplex. Here is my code [SW Controlled SS] [SO->MOSI] ...
3
votes
2answers
543 views

How to configure DMA to receive variable length USART messages?

I am trying to receive USART messages on a microcontroller originating from PC which will command it to execute certain tests. I am using STM32F4, I chose to use DMA as messages on the same USART ...
2
votes
2answers
5k views

STM32 SPI slave: Reset DMA state on high NSS

I'm trying to setup a STM32F303RE SPI2 slave that must continuously and repeatedly send contents of a 2-byte buffer using DMA. More specifically, if my buffer is: ...
2
votes
1answer
100 views

Why is DMA running continuously?

I'm facing a strange behaviour of DMA which I cannot explain myself. I just want DMA to send a data block (i.e. one 32bit word) to the SAI peripherie and quit then and give a "transfer complete ...
2
votes
2answers
1k views

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). ...
2
votes
1answer
1k views

ADC DMA on STM32, Nucleo F334R8 stops main while loop from executing

I am am reading ADC via DMA on the STM32 Nucleo F334R8. However, after I start the DMA using the code below, the main while loop fails to execute ...
2
votes
1answer
6k views

DMA between GPIO and SRAM on STM32

Here I am trying to move the data at the SRAM location 0x20000010 into the ODR register of ...
2
votes
1answer
330 views

STM32 cant get DMA on PWM

I wish to drive a set of NEOPIXELS (ws2812b) using the STM32F4 discovery board, so far i managed to get a 800 kHz PWM signal using the CubeMX. And And the following code: ...
2
votes
1answer
1k views

Generating video with ZYNQ, using IP block design?

I am trying to implement a video streamer on Digilent ZYBO board that has Xilinx ZYNQ 7010. By the way, reason of this thing is to test the quality of an encoder board. What I want is to: Generate a ...
2
votes
2answers
1k views

WS2812B 16 Channel Drive with STM32 problem

I am working with this library. This library uses DMA1 channel 2,5,7 but these channels are required by USART. So I have changed the channels and corresponding to timers ( totimer2 and to timer4). ...
2
votes
1answer
1k views

STM32 SPI DMA timings between data frames and multiple DMA profiles

I'm trying to setup the STM32L432 MCU for SPI communication (24 MHz, 16 bit data size, master transmit only), using DMA. The slave device is a 32 channel amplifier chip. I need to send a specific ...
2
votes
1answer
437 views

Zedboard 512x512 matrices, % utilization problem

My objective is to read seven 512X512 float matrices from the SD card to the DDR memory (step accomplished already with each matrix occupying around 1Mb), then pass them from DDR to my custom IP block ...
2
votes
0answers
76 views

STM32f7 ADC DMA transfer not populating the buffer

I'm trying to compute the FFT of a 100 kHz signal from the STM32f746G discovery board using the HAL and CMSIS DSP libraries and I've run into a few issues. My first issue was trying to trigger the ...
2
votes
1answer
64 views

Multi-tasking on an 8bit AVR -

I'm using an ATTINY816 (the new series AVRs) to manage a system that includes the following tasks: Simple audio "effect processing" (delay, pitch up, pitch down...) using internal ADC + DAC Storage ...
2
votes
1answer
364 views

Microchip PIC24's DMA doesn't work as expected

I am trying to configure the DMA in Microchip's PIC24FJ1024, DMA channel will transfer Data, from Source to Destination, every time the program trigger the DMA Channel. One Shot Mode SRC increments ...
2
votes
0answers
1k views

How to properly send stop condition when using DMA with I2C?

I'm using DMA transfer to get 1024 bytes from master (STM32F407VG) to slave OLED screen (SSD1306). The library I'm using does this: ...
1
vote
2answers
221 views

Where is the location of display buffer on a computer board? [closed]

On an OS development text by Nick Blundel, at chapter 4.1 titled Adapting to Life Without BIOS, it is explained that while graphics hardware is in text-mode, we can write ASCII characters on screen by ...
1
vote
1answer
3k views

Restart Rx USART + DMA in STM32L1

I am using an STM32L1 on a Nucleo-L152RE board. I have to devices I control through serial running at rather high baudrates, so I am trying to enable DMA on the USART. With the code below I can launch ...
1
vote
1answer
520 views

What's the difference between dual-address and implicit DMA?

For detached DMA's there are two addressing approaches. One is dual-address and one is implicit. What the difference between the two and why does dual-address take twice as many bus cycles?
1
vote
2answers
1k views

STM32F4 - counting DMA wraps

I am using DMA on an STM32F4 Discovery board to push values from an array into a peripheral. This needs to be done repeatedly, so I am using the circular DMA mode: ...
1
vote
2answers
7k views

Full duplex SPI Master using DMA - STM32F105

I'm trying to write a SPI driver for an STM32F105 using DMA functionality. I'm using ST's Standard Peripheral Library. I'm not using interrupts. I can talk to the destination device if I use standard ...
1
vote
1answer
2k views

DMA completion interrupt not working for slave STM32 SPI

I am using stm32f103 to transmit some data over SPI while stm32 acts as slave. I need to use DMA for sending data to the SPI but the corresponding interrupt handler is never called. The ...
1
vote
1answer
5k views

Why does last data of I2C DMA transfer break?

I used DMA to transfer I2C data, but I always lose the last data. hardware configuration is shown below: ...
1
vote
2answers
157 views

SPI using STM32's DMA sends one word too much

On an STM32F103 I configure SPI in 16bit wide mode and set up a DMA transfer to transmit one byte: ...
1
vote
1answer
2k views

Is the STM32 DMA destination address restricted?

I'm using a stm32f446 and would like to use the TIM4_CH2 request with the DMA1 in ...
1
vote
1answer
2k views

STM32 HAL Using ADC with DMA affects UART transmission

I am using STM32 Nucleo F334R8 board. I transmit some data using UART in asynchronous mode to my PC using: ...
1
vote
1answer
636 views

16bit DMA UART w/ STM32F4

How do I transmit 16 bits of data with UART to a 16 bit array? I've got two elements in my array, my UART is set up as 8N1 and my DMA is set to circular. I'm using some HAL stuff, and here's my ...
1
vote
2answers
52 views

PIC32MZ, MPLAB Harmony with I2S hangs after adding extra function

I have referred http://microchipdeveloper.com/harmony:i2s-tutorial and am able to configure the I2S and read continuous data from a microphone. I am facing issue with the microphone data, and have ...
1
vote
2answers
221 views

STM32F103ZET6 USART with DMA behaves differently in debug versus reset run

I am using the STM32F103ZET6 MCU and am having a weird problem where if I program and debug or program and reset my MCU the USART3 used to communicate with a slave device does not work. In debug there ...