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

It is unclear how to set SPI mode if the default does not work. #3296

Open
JuneTheMistborn opened this issue Apr 23, 2024 · 1 comment
Open

Comments

@JuneTheMistborn
Copy link

  1. While using a ST7789 board that does not support SPI mode 3 (ie; Waveshare 2.8" Pico Restouch), the TFT will not display.
  2. Using PlatformIO
  3. TFT_eSPI version 2.5.43
  4. Board package version 3.7.2 (earlephilhower)
  5. RP2040
  6. ST7789 Product
  7. SPI

With the Pico Restouch, Waveshare distributes a special version of TFT_eSPI.h, the only change they make is to line 133 to change the declaration of TFT_SPI_MODE to SPI_MODE0 instead of SPI_MODE3. Running a program without this change leads to the backlight turning on, but nothing being displayed.
TFT_eSPI.h has an else statement defining the mode as 0, but the statement appears to be unreachable.

The user can define TFT_SPI_MODE in a user setup file, but there is no indication of this. It would be very helpful to add a line in the user setup template indicating that the SPI mode can be defined, and to try setting it to SPI_MODE0 if the backlight turns on but nothing is displayed while using an ST7789 board.

@klspstck
Copy link

klspstck commented May 4, 2024

I was just re-trying the TFT_eSPI library with the Pimoroni Display 2.0".
It is working with the Adafruit library but not with the standard user setup files.
Your hint saved may day, now it is working by just adding the "#define TFT_SPI_MODE SPI_MODE0".
Thank you.

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

2 participants