TFT_eSPI icon indicating copy to clipboard operation
TFT_eSPI copied to clipboard

[ST7789] Ugly artifacts show up when first powering the display. Red square shows up right after uploading new program

Open zalexzperez opened this issue 11 months ago • 0 comments

Here's what happens when you first power up the display (at 80MHz), using example program "All_Free_Fonts_Demo":

https://github.com/Bodmer/TFT_eSPI/assets/38706594/310eed96-d571-421b-86b3-974bc8026fb6

Another video showing the red square now:

https://github.com/Bodmer/TFT_eSPI/assets/38706594/34d7f29d-4889-4ca4-b88d-9aa0e9665dc3

This is running the same code as before, while a new one is being uploaded. After upload finishes, a red square shows up. Then the ESP32 is reconnected to power and the same artifacts appear. Notice the slower screen update, that's because I reduced the SPI frequency to just 1MHz to make the artifacts easier to observe.

I discovered that using the library "Adafruit ST7735S and ST7789 Library" with just this code:

tft.init(172, 320);           
tft.setSPISpeed(80000000);
tft.fillScreen(ST77XX_BLUE);

tft.setTextColor(ST77XX_WHITE);
tft.setRotation(3);
tft.setTextSize(3);
tft.setCursor(20, 20);
tft.println("Adafruit library");

doesn't have the problem (80MHz):

https://github.com/Bodmer/TFT_eSPI/assets/38706594/b028eeb3-6920-41b6-8cea-fd5e67d18507

But when set to something lower like 20MHz, a white stripe with artifacts appears:

https://github.com/Bodmer/TFT_eSPI/assets/38706594/5e5c8275-4364-4d78-b868-9f2d49b2e17c

Specs:

Display: 172x320 ST7789 display

SPI frequency: 80MHz (all the example programs work well at this frequency). Tried at different frequencies with this library but it didn't make it go away.

Test board: ESP32 S3 using hardware SPI pins, TFT_CS (45) and TFT_DC (47).

My User_Setup file: User_Setup.zip

Thanks in advance.

zalexzperez avatar Mar 15 '24 22:03 zalexzperez