Hi.
Using the standard configuration with a buffer of 10 rows all works well.
static uint8_t buf_1_1[MY_DISP_HOR_RES * 10* BYTE_PER_PIXEL] ;
But it gets a lot of RAM and the screen is ridiculously slowy. This is not recommended for a real application.
So I have used a big buffer of 272 rows from the external SDRAM. The screen is very fast
static uint8_t buf_1_1[MY_DISP_HOR_RES * 272 * BYTE_PER_PIXEL] SDRAM_EXTERNAL;
But when I use the touch screen the screen is broken with a bar of unknown pixels.
It’s slow because your display flush function is writing one pixel at a time.
The SDRAM will not make it refresh any faster
What you really need to is to incorporate DMA transfer operations between the display buffer and the display controller, in order to transfer chunks or the full buffer at once, and at the same time start to render the next frame.
Using the DMA2D on the STM chips can speed things up a lot more.
Im not sure which STM board you are using (seems like an f746?), as you did not mention it, but with this example you might see better performance:
Hello Sir. I am using that board.
The refresh speed of the display is not done by the DMA use. If you use a short buffer with DMA the results are with no difference.
To get a fast refresh is necessary to have configured a big buffer. If you use a big buffer and DMA you can see the refresh of the screen like a smartphone.
For my use, I just with a big buffer can to get an acceptable refresh speed.
The point is that the screen is corrupted by a bar of pixels when I use the SDRAM (to set up a big buffer. See image).
All of the examples and videos on YouTube are limited to using the internal RAM and FLASH of the microcontroller in other words just hobby demos.
The documentation does not have good support for how to use the SDRAM and QSPI in LVGL library.
Sir, you complete lack info how bus use LCD how method transfer to LCD usw.
When your memory is corrupted somethink in your sw or hw writes here …
For original boards sw mistake have priority.
Madam.
As was describe before. I am using the native drives of ST to control the display.
The code works fine when I use the internal ram. But I need to use the SDRAM.
No examples well fone on the notes of LVGL. I can build my project myself. But no good information is in LVGL
The sample code for my board done by lvgl team is of a version obsolete.
My question is why is not a well documented tutorial using LVGL with SDRAM and QSPI FLASH.
All the demos are done to be used limited on the internal ram and flash on the microcontroller. But is not my case.
This is on purpose, as most embedded chips don’t have external RAM or they use slower PSRAM which is not adaqute for larger displays
I can tell you from my experience, it renders faster with smaller buffers (I have used both internal RAM and external SDRAM on an NXP iMXRT1062)
If you look at the flush_cb in the repo I linked to, you will see that while it uses small internal RAM buffers, it does use DMA to transfer them, which is what will speed up render time eventually.
If you wish to use SDRAM, you can modify the code in the 746 example and point the buffers into SDRAM base address, but you just need to make sure that SDRAM is first initialized on startup etc.
It almost looks like the update is the wrong size. Perhaps the display driver is assuming LVGL always sends full rows to the display? But usually LVGL will only send changed rectangles to the display, and the display driver may need to send rows.
Ex: when scrolling the month-picker, LVGL may be sending only the month-picker pixels, and the display driver is putting them at top-left of LCD.