ESP32_C3: TFT_eSPI init() is crashing
Posted: Mon Jan 01, 2024 8:42 pm
On my custom ESP32_C3 Super Mini board I am trying to connect a TFT display ST7789 with SPI interface.
As soon I am calling tft.init() the ESP32_C3 seem to crash and starting again. The following is the output shown in the TERMINAL from Platformio-development environment:
I spent hours to search I-Net for getting a solution - w/o result.
I am also using standard ESP32 (WEMOS D1 Mini) with the same display ST7789 - here tft.init() and all the functionality I am using from the TFT_eSPI library is working as expected.
Has anyone an idea what the problem is - I am lost and have no clue anymore what I could do to fix this problem.
Thanks much for all ideas how to identify the root for this issue.
Best, Bernd
As soon I am calling tft.init() the ESP32_C3 seem to crash and starting again. The following is the output shown in the TERMINAL from Platformio-development environment:
I simplified the code down to just a few lines where the problem clearly shows tft.init() is crashing. For reference I am adding the code here:* Executing task in folder ESP32C3 Super Mini: C:\Users\Bernd\.platformio\penv\Scripts\platformio.exe device monitor
--- Terminal on COM4 | 115200 8-N-1
--- Available filters and text transformations: colorize, debug, default, direct, esp32_exception_decoder, hexlify, log2file, nocontrol, printable, send_on_enter, time
--- More details at https://bit.ly/pio-monitor-filters
--- Quit: Ctrl+C | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H
Entering setup()
.....................................................
setup(): Led set to Output
.....................................................
ESP-ROM:esp32c3-api1-20210207
Build:Feb 7 2021
rst:0x8 (TG1WDT_SYS_RST),boot:0xd (SPI_FAST_FLASH_BOOT)
Saved PC:0x40380082
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fcd6100,len:0x438
load:0x403ce000,len:0x918
load:0x403d0000,len:0x24e4
SHA-256 comparison failed:
Calculated: 080c5cb68a075ced55f248b97bca965e3e5bd5da80a64e34e6a1638f89d6f64e
Expected: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
Attempting to boot anyway...
entry 0x403ce000
Entering setup()
.....................................................
setup(): Led set to Output
.....................................................
ESP-ROM:esp32c3-api1-20210207
Build:Feb 7 2021
Code: Select all
#include "debug.h" // Define PRINT_LN() for debug output, you can also use Serial.println()
#include "SPI.h"
#include "TFT_eSPI.h"
TFT_eSPI tft = TFT_eSPI();
#define LED 8 // LED_BUILTIN for ESP32C Super Mini
void setup() {
DEBUG_INIT
PRINT_LN("Entering setup()");
PRINT_LN(".....................................................");
// Set pin mode
pinMode(LED,OUTPUT);
PRINT_LN("setup(): Led set to Output");
PRINT_LN(".....................................................");
delay(3000); // wait a bit before going to crash :(
tft.init();
PRINT_LN("came back after tft-init()");
PRINT_LN(".....................................................");
}
I am also using standard ESP32 (WEMOS D1 Mini) with the same display ST7789 - here tft.init() and all the functionality I am using from the TFT_eSPI library is working as expected.
Has anyone an idea what the problem is - I am lost and have no clue anymore what I could do to fix this problem.
Thanks much for all ideas how to identify the root for this issue.
Best, Bernd