cancel
Showing results for 
Search instead for 
Did you mean: 

LTDC double layer and double buffering + SDRAM

Petr3
Associate III

Hello,

i have TFT with resolution 800x480 @ 24bpp connected to the STM32F767BIT6 with external SDRAM IS42S16400J-7TL.

The MCU is running on 216MHz, thus FMC on 108MHz, SDRAM as CAS latency = 2 and LTDC pixel clock 19,2MHz(able to run on 24MHz too) with DMA2D. FMC is configured for switch address from 0xC000_0000 to 0x6000_0000 for posibility of cashing.

LTDC is configured to 2layers ARGB8888. The SDRAM has 4 banks and 16bit data bus, so 1st layer is located on start addres of 1st bank, 2nd layer is located on start address of 2nd bank. On 3rd and 4th bank i would like to have inactive buffers for 1st and 2nd layer.

 

In my experiment i fill 1st and 2nd layer located in 1st and 2nd bank with some graphic.

The screen on TFT is stable without any graphical artefacts.

 

But when i do some writes (let say 3KB) into 3rd or 4th bank once per 1second, the screen starts during writes having some graphical artefacts.

 

I think there is issue with SDRAM/FMC bandwith or bottleneck on FMC.

Is it feasible to have 800x480 24bpp with 2 layers and 2 buffers via one shared SDRAM running on 108MHz???

Is there any tip for raise the performance? If not, i will try to remove one layer and reduce data from ARGB888 to RGB565.

6 REPLIES 6
MM..1
Chief II

For what you plan 2 layer mode? 

Petr3
Associate III

I would like have some background or static objects and redraw only 2nd layer by dynamic objects. I think that for this resolution i can't use dual layer and ARGB8888 with double buffering.

In worst case i hope, that will work with single layer and double buffer with RGB565. I think the ARGB1555 doesn't make sense in single layer configuration.

Static back layer is ok for show image from FLASH instead SDRAM . And front layer you can place in SDRAM .

Touchgfx dont handle ARGB8888 only RGB888 , then i mean your front layer work smooth and ok with double buffer.

For SDRAM and 4 buffer you need calculate 1 layer read second layer read and 3,4 write , that slow down your memory access to around 108/4 or 5 too 8888 format is 32bit and your SDRAM only 16 next /2 then real access is around 108/10 = 10MHz , but your LTDC request 19-24...

Petr3
Associate III

I don't want to use black layer, i would like put on back layer some image or static parts(scales) of some instruments and to front layer only indicator or other changing objects, the rest of pixels remains with zero alpha, so backbuffer should be visible. The back layer should be generated, because i want to have more menu screens. So it is not so good put it into Flash.

I dont use TouchGFX, i design own graphic(i need some spectrum watterfall etc.). I have the biggest LQFP208 package and i dont have any free pins for 32bit SDRAM (LTDC, ETH RMII, SDRAM, FPGA paralel bus, two SPIs, two I2S/SAI, SDMMC, three UARTs, two I2Cs, two USBs and some discrete I/Os and EXTIs).

So i will try use only one buffer with RGB565 which will be rendered on LTDC and changed in FW simultaneously. The fast access into SDRAM and relative slow pixel clock on LTDC approx. 20MHz should be good solution without observable graphic artefacts during screen change.

If it won't be good solution, i can try double buffering.

I write back not black and here sample for two layers one in flash

Re: TouchGFX L8 Color Encoding - STMicroelectronics Community

External flash can hold many backs... but i mean you create selfcomplication ... use one layer touchgfx or lvgl and you handle all you required.

 

Petr3
Associate III

Thank you for the post thread, that sounds interesting 🙂

Exactly, i have own graphic render compilation because i'm not familiar with TouchGFX or LVGL working together with STM32CubeIDE. I have to find some user guide for it.

 

The hardware i made contains external 32Mb SPI Flash that could be used for some backgrounds.