Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

DMA ----> Double Buffer Mode

Status
Not open for further replies.

abolfazlk873

Junior Member level 3
Joined
Dec 2, 2012
Messages
25
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,488
Hi everyone
in stm32f429 micro-controller, DMA module has a Double Buffer mode. I want to know usage of this mode. Where applicable?

Any help is appreciated.:grin:
 

Double buffering is a technique that is not processor specific.
basically what it means is that you need to define 2 buffers. While one is being processed by the DMA you can work on the other one.
Of course you need to make sure that you can process your buffer before the DMA transfer of the other one completes because the DMA controller will switch to the other buffer when it has completed the first.
Normally there are interrupts and/or flags that will tell you when the DMA controller has completed a buffer and is about to switch to the other.
It can be used anywhere that requires a continuous transfer of data that is bigger than one buffer. For example, you might be using a DMA channel to send audio data to a DAC or other peripheral after reading the data from a bulk storage device. The data needs to be sent in a steady stream to the DAC but can be read in bursts from the bulk storage device.
In short it can be considered a technique to either smooth out the transfer of values (as in the example above) or to bulk up a continuous stream of values (e.g. saving the data from an ADC).
Susan
 
Ok,
I am using stm32f429 discovery board for capturing image from camera and displaying that on the tft LCD.
for capture i am using dma to storing images on the external RAM and as well for displaying image on the LCD i am using the another stream of dma, but in both i don't use double buffering mode.

In your opinion, Whether Double buffering mode can help me?
 

Like all good answers this one begins "it depends....".
If you are storing a single image from the camera and have enough time to process it before either you trigger the next capture or the next frame comes through then perhaps not. It would not hurt as you would not lose anything.
However if you don't have the time to process one image before the next one comes through then double buffering is a must. In this case you have 2 options: you can alter the DMA settings to point to another buffer yourself and then trigger the next DMA or you can set up the DMA controller to automatically switch between the buffers which means you have a little less to do on the CPU.
A similar argument applies to the display part of your question.
Susan
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top