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
19
votes
5answers
6k 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 ...
18
votes
7answers
11k 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 ...
9
votes
6answers
13k 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 ...
7
votes
1answer
7k 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 ...
6
votes
1answer
851 views

What do these arrows on a pinout represent?

What do these arrows represent? Is there any way to memorize it easily?
6
votes
2answers
15k 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
5answers
599 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
3answers
4k 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 ...
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
1k 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 ...
5
votes
0answers
262 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 ...
4
votes
1answer
5k 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
1answer
5k 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
2answers
15k 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
3answers
8k 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] ...
4
votes
1answer
683 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 ...
3
votes
1answer
5k 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
3answers
12k 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
155 views

Why does DMA send the first byte as soon as it is enabled?

I'm using DMA to send data to GPIOF which is configured as a parallel bus. DMA is being driven by update events on TIM8. TIM8 is configured in slave mode and starts on an output compare event from ...
3
votes
2answers
4k 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 ...
3
votes
2answers
2k 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
2answers
9k 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
1answer
2k 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
3answers
2k 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
2answers
6k 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
203 views

STM32 - 2 MegaByte DMA Transfer ADC To SDRAM

I want to transfer 2 MB of converted ADC data into SDRAM. I'm using STM32F429 Discovery board which is shipped with a 4-bank SDRAM (1 Meg Bits x 16 Bits x 4 Banks (64-MBIT)). I've configured the ADC ...
2
votes
1answer
228 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
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
958 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
2k views

TIM2 DMA configuration for stm32h7

My problem: I can't configure DMA to working properly on Input Capture event. Data doesn't transfered and error occurs. ...
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
2k 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
514 views

Why is DMA Continuous Requests not selectable as enable for STM32F446RE?

I have an Nucleo STM32F446RE and I'm used to enable DMA Continuous Requests with ADC. But in this case, I can only select disable. Why? If it's not possible to use DMA Continuous Requests with ADC. ...
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
454 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
39 views

How do CPU, IOMMU and DMA controller interact with each other?

While drawing an interaction diagram involving CPU, IOMMU and DMA controller, I failed to find any authentic document showing how they interact with each other. Is the DMA controller physically a ...
2
votes
1answer
308 views

STM32F303 ADC+DMA Averaging of measurements

What is the best method of taking multiple measurements using ADC+DMA interrupts and averaging them? Currently I have an STM32F303 with ADC2 initialized with channels 3 and 18 (Vrefint). My aim is to ...
2
votes
0answers
342 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
85 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
476 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
2k 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
346 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
619 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
2k 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
3k 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: ...