cancel
Showing results for 
Search instead for 
Did you mean: 

TFT LCD with FSMC and External RAM

joembiye
Associate II
Posted on June 14, 2012 at 10:00

Hi all,

I'm working on a project with a dumb TFT LCD (320 x 240). I'm trying to display static images (no double buffer). I've been able to display images (in 565 format) that I load on the flash memory and refresh it on the display using DMA and FSMC. I'm now trying to refresh the same images from external RAM using DMA again but I don't seem to get it right. What I'm doing is copying the images from the flash to the external RAM using DMA and then refresh from the external RAM.

I thought maybe I wasn't writing to external RAM, I tried to view what's inside the external RAM after writing and I was able to see the same data that is on flash.

I based my approach on the AN3241.

Can you guys please help me to see what I'm doing wrong.

Thank you

#fsmc-dma-external-sram-psram #fsmc-dma-external-ram-tft-lcd
10 REPLIES 10
alok472
Associate II
Posted on June 14, 2012 at 15:15

Did you check your DMA settings from external-RAM ?

''...again but I don't seem to get it right''

 

Does it mean there is a flicker on the TFT ? What is the frame rate you are able to achieve ?

joembiye
Associate II
Posted on June 15, 2012 at 07:56

Hi alokm,

I'm sorry I don't quite understand what you mean by DMA settings. There is a flicker but nothing is being displayed on the screen. I'm just displaying a filled rectangle in black. Like I said, it works when I refresh from the FLASH but not from the external RAM. 

I was able to achieve a refresh rate of 31 Hz without flickering.

balmukund66
Associate II
Posted on June 18, 2012 at 06:30

For 320x240 (5-6-5), You can achieve frame rate of 60-70 also(STM32F2xx).I suggest increase it to 50-60.As you are able to display image from flash, Please check  FSMC_Init setting.Please check for(FSMC_BANK,Adddress accordingly).In DMA Please check  for source & Destination address.

alok472
Associate II
Posted on June 18, 2012 at 15:44

'' I don't quite understand what you mean by DMA settings''

 

if the dumping of image is done using DMA, then you need to change the source address in DMA settings to the RAM source address.(instead of flash address)

joembiye
Associate II
Posted on June 19, 2012 at 16:05

Yes that's what I did, but I couldn't get it to work

I will look into again and analyze my code to see what I'm doing wrong.

Thanks
jdcowpland
Associate II
Posted on September 09, 2013 at 16:02

Hi,

Did you ever get this working? I'm trying to develop a similar project and am experiencing some similar issues

warcatz
Associate II
Posted on September 09, 2013 at 20:00

Here i try to do it too ;)

What i have see is when i try to use external memory + LCD  with DMA the external memory stop to work correctly and i get nothing on screen or nothing i wanted.

Master Clive must probably know if it is possible to write to external sram/psram is

possible when in same time the DMA read for the psram and shoot the data to the LCD.

Posted on September 09, 2013 at 22:13

You'd likely want to look at some of the STM32 EVAL series boards, and screens used there.

The current STM32 parts aren't designed to work with totally dumb LCD panel (ie signalling sync, and pushing pixels). They can however send a stream of bytes from a frame buffer, repetitively, via DMA to a semi-smart panel with it's own controller.

Your pixel count and colour depth should be indicative of whether the STM32 part chosen has enough RAM to support it.

For larger panels you'll need a smarter controller with it's own frame buffer to paint the screen.

Would generally suggest one looks at comparable devices on eBay, and see what screens and methods are being used. And the prospective price-points of each.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
warcatz
Associate II
Posted on September 10, 2013 at 19:16

Yes Clive , you true with smarter display.

It's why i personally use ILI9481 , but actually i cant use SRAM + LCD with DMA because

when i try it , something goes wrong with the SRAM.

I tried PSRAM too , same effect , i cant write to psram or sram if the DMA read and send to LCD at same time.( external ram data are corrupted).

I will look for this further the day we get stm32f429 board with SDRAM , it will probably not work the same way ;)

Now i use interrupt to actualize my screen (320 x 480 x 16bits) every 25mS , but it take allot CPU time,

it will be better  if DMA can do it ...

Cheers.

Darth.