Hi,
In LPCOpen example code, I didn't find example about LCD.In the website:https://www.embeddedartists.com/products/lpc1788-developers-kit/there is an example s_display_truly_lcd_32 in lpc1788_samples_150612 software resources.
In this example code,there is a code snippet description in sdram.h
#define SDRAM_SPEED SDRAM_SPEED_60
#define SDRAM_CONFIG_32BIT
#define SDRAM_SIZE 0x2000000
#define SDRAM_BASE 0xA0000000 /*CS0*/
Chapter 2: LPC178x/7x Memory map, 0xA000 0000 - 0xAFFF FFFF is Dynamic memory chip select 0 (up to 256MB).
We use RGB888 color depth and put framebuffer in external SDRAM。In the main.c , there is a code snippet description about framebuffer:
#define DISPLAY_WIDTH 240
#define DISPLAY_HEIGHT 320
...
int32_t framebuf = (int32_t)(SDRAM_BASE+0x10000);
sdram_init();
memset((void*)(framebuf), 0x00, 240*320*2);
/*dev_lcd = */truly_lcd_open(framebuf);
fblog = (COLOR_T*)framebuf;
Combined with other example code related LCD , the framebuffer was always setted equal to SDRAM_BASE plus 0x10000 no mater what the resolution of LCD is, such as 240x320, 480 x 272. My confusion is why not use SDRAM_BASE as the beginning address of frambuffer? In this scenario, the offset 0x10000 is a fixed value or a random value?