Skip to content
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

i2c_oled_example with SSD1306 128x32 display garbled with LVGL 9.2 (BSP-576) #426

Closed
mutatrum opened this issue Oct 29, 2024 · 7 comments
Closed
Labels

Comments

@mutatrum
Copy link

mutatrum commented Oct 29, 2024

Board

ESP32-S3-WROOM-1

Hardware Description

0.91" OLED 128x32 display

IDE Name

vscode

Operating System

Linux

Description

Garbled pixels when running the example after fixing some compiler errors for LVGL 9.2. It works fine with LVGL 8.4. I initially opened espressif/esp-idf#14784 but I think it belongs in this repo. A lot of details including screenshots are there.

Sketch

idf.py create-project-from-example "espressif/esp_lvgl_port^2.3.2:i2c_oled"

Applied the following settings:

CONFIG_IDF_TARGET="esp32s3"
CONFIG_EXAMPLE_SSD1306_HEIGHT_32=y
CONFIG_LV_COLOR_DEPTH_1=y
CONFIG_LV_MEM_SIZE_KILOBYTES=32
CONFIG_LV_TXT_BREAK_CHARS=" ,.;:-_"
CONFIG_LV_USE_OBSERVER=y
CONFIG_LV_USE_SNAPSHOT=y

Changes I made to get it to compile:

Hardcoded lv_obj_set_width in lvgl_demo_ui.c to 128, as the compiler complained about incomplete lv_display_t interface.

Changes I made to get it to run:

Move lv_disp_set_rotation inside of the lvgl_port_lock as it triggers WDT.

@mutatrum mutatrum added Status: Awaiting triage Type: Bug Something isn't working labels Oct 29, 2024
@github-actions github-actions bot changed the title i2c_oled_example garbled display with LVGL 9.2 i2c_oled_example garbled display with LVGL 9.2 (BSP-576) Oct 29, 2024
@mutatrum mutatrum changed the title i2c_oled_example garbled display with LVGL 9.2 (BSP-576) i2c_oled_example with SSD1306 128x32 display garbled with LVGL 9.2 (BSP-576) Oct 29, 2024
@espzav
Copy link
Collaborator

espzav commented Oct 29, 2024

@mutatrum Please, could you check this: #398 (comment) ?

@mutatrum
Copy link
Author

mutatrum commented Oct 29, 2024

Unfortunately, that doesn't fix it. Most of the screen is now white, with a distinct double buffer flickering. There is some hint of things moving from left to right, so it has the correct color_map location, but it seems the format is still off.

I reverified with LVGL 8.4, there it works.

@mutatrum
Copy link
Author

mutatrum commented Nov 1, 2024

I don't seem to get it working. I tried a lot of different things, but it always looks like the incoming data in _lvgl_port_transform_monochrome.color_map is already garbled. I'm on an ESP32S3 and a 132.x32 display, maybe that triggers some different behaviour upstream?

@espzav
Copy link
Collaborator

espzav commented Nov 1, 2024

When I tried it, I had to fullclean (remove build folder, sdkconfig, managed_components and dependencies.lock) then I removed sdkconfig.defaults (it is for LVGL8). And build it with LVGL 9. Then it was working.
We are working on update LVGL port with support LV_COLOR_FORMAT_I1 .

@mutatrum
Copy link
Author

mutatrum commented Nov 1, 2024

Even with a full clean I can't get it working. Looking forward to I1 support again, that would hopefully make it easier to get working again.

@mutatrum
Copy link
Author

mutatrum commented Nov 1, 2024

Ah I misread your comment, I didn't clear out the sdkconfig.defaults. With that removed and only setting the display height to 32 in menuconfig it works, with the patch from #398.

My guess is CONFIG_LV_COLOR_DEPTH_1=y messes up things and has LVGL set to a half working 1 bit mode, or at least in an incompatible fashion for the ssd1306 support. I don't know if esp_port should panic when that is set, or if it can override that setting before init?

@mutatrum
Copy link
Author

Duplicate of #398

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants