-
Notifications
You must be signed in to change notification settings - Fork 7.3k
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
SSD1306 128x32 display garbled (IDFGH-13950) #14784
Comments
This looks like a bug in the driver code, can you try adjusting this line to use width instead of height? |
With that change the noise looks slightly different, a bit more spread out, but otherwise identical. I have a hunch it's in the i2c layer itself, as even if I mimic the initialisation from the current (working) device-purpose SSD1306 driver, it shows exactly the same noise. See this code: https://github.com/skot/ESP-Miner/blob/35855358ada2af5710302cfdc06f4eb05fb1080f/main/oled.c#L40 A short clip to show what I mean, this is without your code change: It's as if there are random pixels missing whenever the buffer is sent over to the display. So part of the data is there, it's roughtly in the right spot, and it doesn't cover the whole screen. It's clear there is something scrolling from left to right, and the bottom 1/3rd is garbled noise going back and forth between two frames, which corresponds to the double buffering. I will test the example code as a clean project, to see if any other code in my codebase is interfering, but that will be tomorrow. |
That is very odd, I'd also wonder if it might be something in the LVGL side that is interfering somehow. I've not used LVGL on the SSD1306 but have used basic text output (and supporting SH1106 which is nearly identical code), you can read my init script here, it leverages the older I2C APIs to build a large I2C transfer to configure the display in a single shot. The height / width issue is still a bug though, from the references I've seen it should be width in that config field. |
To verify the i2c code, I made a direct call to esp_lcd_panel_draw_bitmap after the initialisation, and drew a buffer with increasing byte pattern: It also showed that horizontal addressing is supported by this display, the pattern is visibly different if I change it to vertical or paging. So it looks like it's somewhere in the LVGL part indeed. |
Addendum: running the i2c_oled_example code works on the target hardware, at least with LVGL 8! If I build the example project with LVGL 9.2 and fix the compiler warnings, it first triggers a WDT when calling If I move the set_rotation call into the LVGL lock in the main, the example runs but shows similar noisy garbage on the display. So something broke when going from LVGL 8 to 9.2. I can't test with 9.0 or 9.1, due to monochrome displays not being supported yet? https://forum.lvgl.io/t/how-to-configure-lvgl-9-for-monochrome-displays/16944 Not sure if the ticket is on the correct repo btw, as Furthermore, I tested my own project with LVGL 8.4, and that also works! |
Duplicate of espressif/esp-bsp#392 |
IDF version.
v5.3.1
Espressif SoC revision.
ESP32-S3
Operating System used.
Linux
How did you build your project?
VS Code
If you are using Windows, please specify command line type.
None
Development Kit.
ESP32-S3-WROOM-1
Power Supply used.
USB
What is the expected behavior?
Pixels shown on display
What is the actual behavior?
Garbled pixels on display
Steps to reproduce.
Add
lvgl
andlvg_esp_ports
dependency, followi2c_oled_example_main
as close as possible.Display does initialize, LVGL is initialized, but the pixels show up garbled.
Debug Logs.
No response
More Information.
Picture:
the pixels are actually moving, garbled from left to right, which I assume should be the scrolling label text. The bottom line is flickering on and off.
The screen used is a 0.91" SSD1306 OLED I2C Display Module
The text was updated successfully, but these errors were encountered: