cancel
Showing results for 
Search instead for 
Did you mean: 

Access to external memory during DMA transfer

HAENEL.Cyril
Associate II
Posted on January 09, 2012 at 10:44

Hi all, my question is in direct relation with the AN3241 application note (TFT-LCD direct drive using the STM32F10xx FSMC peripheral).

In the application note, two mode are possible (page 11, 2.4.1), ''slide show'' with two image (or more) displayed at fixed interval, and ''banner display mode'', where images in SRAM buffer are dynamically updated to show an animation. In this mode, SRAM is updated with new image after one complete frame refresh of the TFT.

For my use, I want to add a graphic library over the frame buffer (external static RAM), to print lines, pixels, fonts, icons, and so on. But it seems that during a DMA frame refresh of the TFT we cannot access the static ram to update framebuffer data ?

I think it's possible to use a double buffering principle, where a frame buffer is alway used for TFT refresh continuously, until we update the second frame buffer, and switch on it when it is ready. But is it possible to have the 2 frame buffer (thus 2 memory area) in the same static ram or it will be mandatory to use 2 static ram ? In other word, is it possible to access in a single static ram one framebuffer zone, with in the same time continuous DMA refresh of the TFT with the second framebuffer zone ?

As I said, my goal is to implement a complete graphic system over the frame buffer, and not just display static image.

Regards,

Cyril HAENEL

5 REPLIES 5
balmukund66
Associate II
Posted on January 09, 2012 at 12:12

Hello,

Yes,It is possible to use double buffer metthod.

You can use two(even more) Buffer area in same SRAM.Use One Buffer area as DMA frame refresh buffer & store the necessary data to be displayed next in 2nd Buffer area.

After completing storage just change the memory pointer.

There is no need to use two SRAM.

Regards,

Balmukund Prasad

HAENEL.Cyril
Associate II
Posted on January 09, 2012 at 12:37

Great ! Thank you for the confirmation. It mean we can access the sram content even during DMA transfer managed by a timer.

On Internet we can found a lot of project with graphic library based on TFT display with integrated driver (often 320x240 display), but I don't found project with graphic library based on a frame buffer in external SRAM and direct drive TFT. Am I alone to do this !? I need to build a user interface based on a 480x272 TFT display, like the PSP display.

Regards

Cyril HAENEL

Posted on January 09, 2012 at 15:42

But it seems that during a DMA frame refresh of the TFT we cannot access the static ram to update framebuffer data ?

 

Why? You might have a lot of contention, but that won't change if you have two buffers, or two memories.

Surely there are better solutions for displays that need 256KB frame buffers than an STM32 with a slow external memory interface. Wouldn't you be much better with something that could run a 100/133 MHz SDRAM, and an ARM9 at several hundred MHz.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
HAENEL.Cyril
Associate II
Posted on January 09, 2012 at 16:40

Why? You might have a lot of contention, but that won't change if you have two buffers, or two memories.

You are right, it's logical !

Surely there are better solutions for displays that need 256KB frame buffers than an STM32 with a slow external memory interface. Wouldn't you be much better with something that could run a 100/133 MHz SDRAM, and an ARM9 at several hundred MHz.

In my project the display is just for information purpose, it must be TFT to have beautiful display, but associed electronic price must be keep as low as possible. Display modification will occur every 1s maximum. With direct drive TFT the price stay low, just need an external SRAM and a STM32 with more pins and flash to store fonts and bitmaps.

Maybe I can simplify the design (no SRAM) if a found a TFT display with integrated driver/framebuffer, but it must be low price and 480x272 minimum, I have not found for now :(

balmukund66
Associate II
Posted on January 10, 2012 at 10:48

Hello

 I have tested graphic library based on a frame buffer in external SRAM(4 M bits) and direct drive TFT for 320x240 (working fine).SRAM size will change For 480x272 resolution.SRAM size should be sufficient enough to store two buffer area.

Regards

Balmukund Prasad