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

Wrong SPI Mode when using ST7789 #226

Open
Volvox0815 opened this issue Sep 4, 2023 · 0 comments
Open

Wrong SPI Mode when using ST7789 #226

Volvox0815 opened this issue Sep 4, 2023 · 0 comments

Comments

@Volvox0815
Copy link

Hello,

the ST7789 driver has a valid signal on SDA the rising edge of the clock. (Datasheet page 34 of the ST7789 driver)

So in the lvgl_spi_conf.h there is an issue:

#if defined (CONFIG_LV_TFT_DISPLAY_CONTROLLER_ST7789)
#define SPI_TFT_SPI_MODE    (2)
#else
#define SPI_TFT_SPI_MODE    (0)

The SPI_TFT_SPI_MODE needs to be 3 according to the ESP driver definition

 uint8_t mode;                   /**< SPI mode, representing a pair of (CPOL, CPHA) configuration:
                                         - 0: (0, 0)
                                         - 1: (0, 1)
                                         - 2: (1, 0)
                                         - 3: (1, 1)

It took me hours to find out what is the issue, because under some reasons a few displays are working even though it is the wrong SPI mode.
Thanks for this great ESP port of the library!

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

No branches or pull requests

1 participant