Closed DmytroKoval closed 8 months ago
@DmytroKoval Thanks for reporting! Looks like SSD13xx OLED LCD SPI mode is a little different from other LCD screens like ST7789, where the DC level will turn high when transmitting parameters.
We will consider to make that configurable in the esp_lcd_panel_io_spi_config_t
structure. e.g. by introducing a new flag dc_high_on_param
@DmytroKoval Thanks for reporting! Looks like SSD13xx OLED LCD SPI mode is a little different from other LCD screens like ST7789, where the DC level will turn high when transmitting parameters. We will consider to make that configurable in the esp_lcd_panel_io_spi_config_t structure. e.g. by introducing a new flag dc_high_on_param
That's smart, because SSD1322 and 1351 (for example, I didn't check all product line) require D/C high on parameter transmission.
Good luck with update!
Any chance this might be resolved before the 5.2 release? I can make the pull request if it would help
Thanks for the contribution. After the PR gets merged to the master branch, we will backport it to release/v5.2 for sure. @kscz
Answers checklist.
IDF version.
esp-idf-v5.0
Operating System used.
Windows
How did you build your project?
Command line with idf.py
If you are using Windows, please specify command line type.
PowerShell
Development Kit.
ESP-WROOM32
Power Supply used.
USB
What is the expected behavior?
I tried to use ESP-IDF 5.0 LED driver + LVGL with SSD1309 OLED connected via SPI. As a code base an I2C OLED example for SSD1306 display was taken. SSD1306 and SSD1309 are compatible at command level. I changed I2C bus/io config to SPI. Sample initialization code is shown below.
After 3 last lines of code display should have being initialized.
What is the actual behavior?
After 3 last lines of code shown above display is filled with noisy pixels with no other output.
Steps to reproduce.
Debug Logs.
No response
More Information.
After investigation I found function static esp_err_t panel_io_spi_tx_param(esp_lcd_panel_io_t io, int lcd_cmd, const void param, size_t param_size) at components/esp_lcd/src/esp_lcd_panel_io_spi.c which transmits data/commands via SPI. I noticed, that it inverts D/C line before command parameter transmission (this line). But according to SSD1309 datasheet D/C line should be held at low level (command mode) during transmission of command parameters, and it is stated in both SSD1306 and SSD1309 datasheets.