Closed viniciusro closed 3 days ago
I have identical problem. Lvgl example will not work if board is connected to wifi.
@viniciusro
As an experiment try replacing
lv_disp_draw_buf_init(&draw_buf, buf_1, buf_2, 48 1024 2); with lv_disp_draw_buf_init(&draw_buf, buf_1, NULL, 2 480 10);
I don't have this board so I'm speculating here.
nik
@viniciusro
As an experiment try replacing
lv_disp_draw_buf_init(&draw_buf, buf_1, buf_2, 48 1024 2); with lv_disp_draw_buf_init(&draw_buf, buf_1, NULL, 2 480 10);
I don't have this board so I'm speculating here.
nik
Hey nik,
Thanks for the idea, it works! Now I can sed UDP packages and display data on the screen.
I will investigate further the second buffer.
// lv_disp_draw_buf_init(&draw_buf, buf_1, buf_2, 48 * 1024 * 2);
lv_disp_draw_buf_init(&draw_buf, buf_1, NULL, 48 * 1024);
draw_buf -- pointer lv_disp_draw_buf_t variable to initialize
buf1 -- A buffer to be used by LVGL to draw the image. Always has to specified and can't be NULL. Can be an array allocated by the user. E.g. static lv_color_t disp_buf1[1024 * 10] Or a memory address e.g. in external SRAM
buf2 -- Optionally specify a second buffer to make image rendering and image flushing (sending to the display) parallel. In the disp_drv->flush you should use DMA or similar hardware to send the image to the display in the background. It lets LVGL to render next frame into the other buffer while previous is being sent. Set to NULL if unused.
size_in_px_cnt -- size of the buf1 and buf2 in pixel count.
@viniciusro Thanks for letting me know that it worked. I made conservative assumptions as I didn't know how you defined your buf_1 but if you sized it to contain 16 bit/px then you could further reduce the lv draw buffer to just:
lv_disp_draw_buf_init(&draw_buf, buf_1, NULL, 480 * 10); //single buffer, line px width, number of lines per write.
In my experience 10 to 40 lines per write is good use of resources for the 480x480 display and keeps things 'ticking' over nicely. I have personally not seen any advantage to using double buffering with st7701 / esp32-s3 (even when displaying gifs and other animations) but your mileage may vary.
Volos Projects released a video this morning using the T-Panel:
https://www.youtube.com/watch?v=6-7ZjbE4Qqc
nik
@viniciusro This seems to be a memory overflow error, and the cache space allocated to lvgl needs to be readjusted
@viniciusro The space for LVGL has been reallocated. You may test to see if adding WIFI works properly.
Closed due to lack of response for a long time.
IDE and version or firmware
framework = arduino, platform = espressif32, board = dfrobot_firebeetle2_esp32s3
Operating System
Windows 10
Description
Adding simple wifi connect to setup will make the example crash:
Sketch
Debug Message
Other steps to Reproduce
After initialization and connection the WIFI is not used in any other place. Same problem with "Lvgl_benchmark.ino" As reference, with T-Encoder Pro, using lvgl and WIFI will work with no problem.