-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Demo tested with esp32-3248S035C ? #43
Comments
The 3248S035 have no psram so this is probably tricky to get this running. |
I can confirm the unit works with the vanilla lvgl / tft_espi / gt911 packages under platformio, and this config in #define TFT_HOR_RES 320
#define TFT_VER_RES 480
#define DRAW_BUF_SIZE (TFT_HOR_RES * TFT_VER_RES / 10 * (LV_COLOR_DEPTH / 8))
uint32_t draw_buf[DRAW_BUF_SIZE / 4]; I think the only change was operating in portrait mode. I did a good deal of package/file housekeeping and to get it to compile I had to move around a few of their header files, so I'm betting it will just work when I retest es32-smartdisplay. |
Also identical are the pin defs in tft_espi's I recreated an almost empty app but I'm still seeing a hang at If platformio.ini contains just one of these lines, similar to the guide for esp-smarthome, logging won't be enabled:
But add these two lines before, and serial logging is fine:
So with logging now working ... it still stalls as before:
And #include <Arduino.h>
#include <esp32_smartdisplay.h>
void setup() {
smartdisplay_led_set_rgb( 96,96,96); // Make the RGB LED blip before it's reset during init()
log_i("Board: %s", BOARD_NAME);
log_i("CPU: %s rev%d, CPU Freq: %d Mhz, %d core(s)", ESP.getChipModel(), ESP.getChipRevision(), getCpuFrequencyMhz(), ESP.getChipCores());
log_i("Free heap: %d bytes", ESP.getFreeHeap());
log_i("Free PSRAM: %d bytes", ESP.getPsramSize());
log_i("SDK version: %s", ESP.getSdkVersion());
smartdisplay_init();
//auto display = lv_display_get_default();
log_i("setup() done...");
}
unsigned long lastTickMillis = 0;
void loop() {
// Again from https://www.youtube.com/watch?v=s4_fUwhw-dI; suggest a way to ensure no wrap?
unsigned int tickPeriod = millis() - lastTickMillis;
lv_tick_inc( tickPeriod );
lastTickMillis = millis();
lv_timer_handler(); /* let the GUI do its work */
delay(5); /* let this time pass */
} |
May have cracked it; if I divide the buffer size by 4 in
I get a white display (I'm not drawing anything yet), and I can get 500ms debug prints from loop(), so it is no longer hanging. I guessed that 115200 bytes of draw buffer was too large, seeing as the draw buffer in Edit: Yahtzee! - With that change to line 36, the demo works! |
Hi Noel, I was looking at this issue and saw that there was already some reduction in the buffersize present: In the file
This is probably too optimistic because of the limited memory. I propose to update the value in the
It also works? To test this you will have to delete the precompiled files in the .pio directory and rebuild the libraries... |
Ok, I did this:
...and it works just fine. Clicking on the 'rotate' button the redrawing is visible and smooth. For giggles I changed it again to /32 (!) and it STILL works. It might be the smallest amount slower to redraw, but it's hard to tell without maybe recording it with a camera and counting video frames. At /64 it still works and redrawing is still smooth - but it is slower... 1 second per screen?. So it must be efficient at shuffling those screen buffers around. Perhaps it might be more noticeable with a large-ish bitmap to redraw? I don't know how to turn on the FPS counter (yet). In any event I think we can safely say it's tested with this hardware, which was my original question... pretty amazing, actually! BTW, thanks for the effort on this lib; it's nice to have it consolidated like this! If there are more tests you'd like, let me know. I've just started tinkering with squareline, so it'll be a while before the hardware shuffles off to it's new home. It's a hobby project, so no hard deadlines. |
First off I have been battling the board I bought ( ESP32-3248S035C ) for weeks to get it running. Although most of that time was spent trying to get lv_micropython on it. Finding this repo has been a God send. I also had a lot of issue trying to get past the screen loading. I started over from scratch and only made the change you suggested by changing the board setting to |
While we are talking about this file I also noticed the SRAM is set to 320KB. According the AliExpress page you have linked in this file the SRAM is 520KB.
I made this change and so far it is working. |
I look at platformio for the boards definitions. I think they're a bit more reliable than AliExpress... https://registry.platformio.org/platforms/platformio/espressif32/boards |
Understood. I found a few other sites that also mentioned 520KB, so I reach out to the seller for the product sheet for that specific board (ESP32-3248S035R/C) and this is what it says in the description.
I also found a post that says maybe 520KB is the total but some of it is for IRAM?
Anyways I agree that it doesn't make sense that the board would be different then what the chip specifies that it has on it. I guess I will leave it as 320KB for now, I would just hate to miss out on memory that might be available. I don't know how to probe the board to know for sure. Thanks for responding. |
I had the same issue and can confirm that adjusting this line fixed it: |
I've edited the aforementioned line and it does show something on the screen, but it only lasts for a few seconds before rebooting. Any ideas? |
Still not working? Can you test with the latest version? |
Tested with current/latest version. Verified the line above is as recommended (/16). Seems like this might be a new issue (or just with my hardware) - but thought I'd chime in here first.
|
Does the esp32-3248S035C, with it's higher resolution, have sufficient memory to run the demo? Mine hangs at
lv_display_set_buffers
I'm not sure if this is a esp32-smartdisplay-demo, an lvgl thing, or if the board can't be used this way. When shipped it had the lvgl demo on it, and the display & cap touch worked fine so I don't think it's bum hardware.
But this demo hangs at
lv_display_set_buffers
; I added some extra log statements in lvgl to localize it:I also tried changing the
LV_MEM_SIZE
calculation inlv_conf.h
; same result:If it is supposed to work I can chase it down with lvgl.
--- edit ---
My issue is likely caused by the complexity of platformio. I can get the lvgl
lvgl_arduino
demo that printsHello Arduino, I'm LVGL!
to the center of TFT working, so I came back to this lib and started from scratch. At one point I caught sight of a notification that had something abouttoo many ???... pausing updates for 10 minutes
which might? be due to libraries being added to all the board defs? So I'm not sure what state the files are in. At any rate, it doesn't even turn on the backlight before hanging in the same place (lvgl_lcd_init).Interestingly I couldn't just turn on the 'use demo widgets' in the lvgl demo; 'out of memory'. So I'm back to wondering if it's the lack of psram + higher screen resolution on this model.
The text was updated successfully, but these errors were encountered: