Skip to main content
AGeis.4
Associate II
February 14, 2023
Solved

do I need an SDRAM?

  • February 14, 2023
  • 11 replies
  • 3219 views

Hello,

I am in the process of making my own circuit board and using an f767 with 144 pins. I have integrated a QSPI and a 40-pin FPC for an 800x480px display. The LTDC is in RGB565. Unfortunately, I don't have any pins left for the SDRAM. So the question is, do I need the SDRAM? Can the QSPI replace it?

This topic has been closed for replies.
Best answer by MM..1

If your f767 have ram for dynamic part on your screen , then you not require SDRAM.

Full dynamic in 565 = 2x800x480 bytes = 750kB plus heap and stack for your code.

Full dynamic in L8 is half of this.

And you can dont use full dynamic screen. Define window for example 640x400 for dynamic.

Background can fill full static screen from QSPI in LTDC second layer. Here you can use for example RGB888 ...

example

0693W00000AMRWmQAP.jpg

11 replies

MM..1
MM..1Best answer
Super User
February 14, 2023

If your f767 have ram for dynamic part on your screen , then you not require SDRAM.

Full dynamic in 565 = 2x800x480 bytes = 750kB plus heap and stack for your code.

Full dynamic in L8 is half of this.

And you can dont use full dynamic screen. Define window for example 640x400 for dynamic.

Background can fill full static screen from QSPI in LTDC second layer. Here you can use for example RGB888 ...

example

0693W00000AMRWmQAP.jpg

AGeis.4
AGeis.4Author
Associate II
February 15, 2023

So the 767 has a 512kb RAM which is already too small for the 800x460 display. And if I only use static applications, they can be stored on the QSPI. Does a gauge count as an animation?

MM..1
Super User
February 15, 2023
Try start with L8 framebuffer ARGB2222 fit your ram
too check if your LCD don’t have own memory ... partial framebuffer FMC mode ...
LCE
Principal II
February 15, 2023

Be careful, the F7 does not support QSPI RAM in memory-mapped mode.

AGeis.4
AGeis.4Author
Associate II
February 15, 2023

What is the memory-mapped mode?

MM..1
Super User
February 15, 2023
You write about QSPI, but don’t define is FLASH or RAM. (I mean flash)
MM mode is read only direct access into FLASH type QSPI.
AGeis.4
AGeis.4Author
Associate II
February 15, 2023

I'd rather play it safe and include both an SDRAM and a QSPI by using the 208-pin option. SDRAM: AS4C4M16SB-6TIN.

AGeis.4
AGeis.4Author
Associate II
February 15, 2023
AGeis.4
AGeis.4Author
Associate II
February 15, 2023

So, the F767 has an internal 512kb RAM. That means it's not enough for the large display. And the external RAM has 64 Mbit. Should that be enough? Do I need to split the SDRAM or would I need a second SDRAM for the animations?

Senior II
March 16, 2023

I also have a 800x480 LCD connected to a F767. I use 8MByte of external DRAM for the framebuffers. For performance reasons I put each of the 3 framebuffers in a separate RAM-bank (2MByte). But I think this would also work with the framebuffers aligned contiguous.

STM32F767BITX_FLASH.ld:

.sdram_bank0 0xC0000000 (NOLOAD) : /* MPU configured to Normal, Write through, no write allocate, shareable */
{
 *(.tgfx_framebuffer0)
 . = ALIGN(32);
 *(.sdram_bank0)
} >EXT_SDRAM
 
.sdram_bank1 0xC0200000(NOLOAD) : /* MPU configured to Normal, Write through, no write allocate, shareable */
{
 *(.tgfx_framebuffer1)
 . = ALIGN(32);
 *(.sdram_bank1)
} >EXT_SDRAM
 
.sdram_bank2 0xC0400000 (NOLOAD) : /* MPU configured to Normal, Write through, no write allocate, shareable */
{
 *(.tgfx_framebuffer2)
 . = ALIGN(32);
 *(.sdram_bank2)
} >EXT_SDRAM

TouchGFXHAL.cpp:

uint8_t framebuffer0[2][DISP_FRAMEBUF_HEIGHT][DISP_FRAMEBUF_WIDTH_PITCH] __attribute__((section(".tgfx_framebuffer0"))) __attribute__((aligned (1024)));
uint8_t framebuffer1[2][DISP_FRAMEBUF_HEIGHT][DISP_FRAMEBUF_WIDTH_PITCH] __attribute__((section(".tgfx_framebuffer1"))) __attribute__((aligned (1024)));
uint8_t framebuffer2[2][DISP_FRAMEBUF_HEIGHT][DISP_FRAMEBUF_WIDTH_PITCH] __attribute__((section(".tgfx_framebuffer2"))) __attribute__((aligned (1024)));
 
 
void TouchGFXHAL::initialize()
{
	[...]
	//TouchGFXGeneratedHAL::initialize();
	setFrameBufferStartAddresses((void*)framebuffer0, (void*)framebuffer1, (void*)framebuffer2);
	setFrameBufferSize(DISP_FRAMEBUF_WIDTH_PITCH, DISP_FRAMEBUF_HEIGHT);
	[...]
}

When this account seems to be inactive, try @tdecker2 - ST can't change mail addresses, so I had to create a new account.