TFT_eSPI icon indicating copy to clipboard operation
TFT_eSPI copied to clipboard

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

Open JuneTheMistborn opened this issue 2 months ago • 1 comments

  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.

JuneTheMistborn avatar Apr 23 '24 02:04 JuneTheMistborn

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.

klspstck avatar May 04 '24 16:05 klspstck