TFT_eSPI icon indicating copy to clipboard operation
TFT_eSPI copied to clipboard

invertDisplay() - related timeout / crash

Open rsiemens77 opened this issue 1 month ago • 0 comments

I recently added an invertDisplay() call to my LCD display application. In fact, I'm using it as a flash effect, so I call tft.invertDisplay(1) and then 200ms later I call it again tft.invertDisplay(0). Sooner or later, this will crash my system. The call itself is either getting delayed or crashing, as it triggers a watchdog crash. I looked up the time for the ISR watchdog. It is set at 300ms. The relevant part of the stack trace is below. I looked it up, it's coming from a "tft_Write_8(c);' in the writeCommand(uint8_t c) function.

I've never got a crash with any other communications, only when I started using invertDisplay(), so something seems suspect here. Any thoughts on this?

The display runs fine for hours, it probably runs this flash implementation once every 20 seconds or so. It always crashes after some number of hours.

` 0x4011f316: task_wdt_isr at C:/xif/frameworks/esp-idf-v4.4.7/components/esp_system/task_wdt.c:183 (discriminator 3)

0x40083089: _xt_lowint1 at C:/xif/frameworks/esp-idf-v4.4.7/components/freertos/port/xtensa/xtensa_vectors.S:1118

0x40102416: TFT_eSPI::writecommand(unsigned char) at C:/xif/frameworks/esp-idf-v4.4.7/components/arduino/libraries/TFT_eSPI/TFT_eSPI.cpp:986 (discriminator 1)

0x4010365c: TFT_eSPI::invertDisplay(bool) at C:/xif/frameworks/esp-idf-v4.4.7/components/arduino/libraries/TFT_eSPI/TFT_eSPI.cpp:4839 (discriminator 4) `

  1. IDE (e.g. Arduino or PlatformIO)

ESP IDF4.4.7

  1. TFT_eSPI library version (try the latest, the problem may have been resolved!) from the Manage Libraries... menu

v2.5.33

  1. Board package version (e.g. 2.0.3) available from the Boards Manager... menu

arduino-esp32 v2.0.17

  1. Procesor, e.g RP2040, ESP32 S3 etc

ESP32E Devkit C

  1. TFT driver (e.g. ILI9341), a link to the vendors product web page is useful too.

ST7735_ROBOTLCD 1.77-in 128 x 160 display

  1. Interface type (SPI or parallel)

SPI

rsiemens77 avatar Jun 04 '24 09:06 rsiemens77