cancel
Showing results for 
Search instead for 
Did you mean: 

do I need an SDRAM?

AGeis.4
Associate III

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?

11 REPLIES 11

Hello @AGeis.4​,

When setting the Memory-mapped mode, the external memory is seen by the system as if it was an internal memory. This mode allows all AHB masters to access an external memory device as if it was an internal memory. The CPU can execute code from the external memory as well.

Regards,

Chahinez.

t.decker
Senior II

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.