Bodmer / TFT_eSPI

Arduino and PlatformIO IDE compatible TFT library optimised for the Raspberry Pi Pico (RP2040), STM32, ESP8266 and ESP32 that supports different driver chips
Other
3.8k stars 1.09k forks source link

1.28inch_ESP32-2424S012 boot loop #3544

Open chung1608 opened 3 days ago

chung1608 commented 3 days ago

LCD works fine when I use ESP32 library ver2.0.2 but when I update ESP32 library to 3.0.5, ESP32 falls into boot loop

17:40:08.708 -> rst:0x3 (RTC_SW_SYS_RST),boot:0xc (SPI_FAST_FLASH_BOOT) 17:40:08.708 -> Saved PC:0x40048b82 17:40:08.708 -> SPIWP:0xee 17:40:08.708 -> mode:DIO, clock div:1 17:40:08.708 -> load:0x3fcd5820,len:0x458 17:40:08.708 -> load:0x403cc710,len:0x814 17:40:08.753 -> load:0x403ce710,len:0x2880 17:40:08.753 -> entry 0x403cc710

Basitadam commented 3 days ago

Can you send your setup? Pin defines file

JVRMTS commented 2 days ago

I have the same problem, with version 3.0.1 of esp32 on arduino it works correctly, with the latest version it goes into a reset loop.

I use a 3.5" SPI TFT the user_setup file is configured like this:

define TFT_MISO 19

define TFT_MOSI 23

define TFT_SCLK 18

define TFT_CS 15 // Chip select control pin

define TFT_DC 2 // Data Command control pin

define TFT_RST 4 // Reset pin (could connect to RST pin)

//#define TFT_RST -1 // Set TFT_RST to -1 if display RESET is connected to ESP32 board RST

// For ESP32 Dev board (only tested with GC9A01 display) // The hardware SPI can be mapped to any pins

//#define TFT_MOSI 15 // In some display driver board, it might be written as "SDA" and so on. //#define TFT_SCLK 14 //#define TFT_CS 5 // Chip select control pin //#define TFT_DC 27 // Data Command control pin //#define TFT_RST 33 // Reset pin (could connect to Arduino RESET pin) //#define TFT_BL 22 // LED back-light

define TOUCH_CS 21 // Chip select pin (T_CS) of touch screen

The serial monitor output is:

ets Jun 8 2016 00:22:57

rst:0x8 (TG1WDT_SYS_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) configsip: 0, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DIO, clock div:1 load:0x3fff0030,len:4832 load:0x40078000,len:16460 load:0x40080400,len:4 load:0x40080404,len:3504 entry 0x400805cc ets Jun 8 2016 00:22:57

Basitadam commented 2 days ago

Can you add this line and test:

#define USE_HSPI_PORT
chung1608 commented 2 days ago

Can you send your setup? Pin defines file this is HW fix pin I can't change

define TFT_MISO -1

define TFT_MOSI 7

define TFT_SCLK 6

define TFT_CS 10

define TFT_DC 2

define TFT_RST -1 // Reset pin (could connect to Arduino RESET pin)

define TFT_BL 3

JVRMTS commented 2 days ago

I have defined it in user_setup and it is still the same 2024-11-11

Basitadam commented 2 days ago

I have defined it in user_setup and it is still the same 2024-11-11

Sorry. Misread your MCU model. It works on ESP32-S3. Are you sure the reset is because of TFT_eSPI? if you put

while(1);

right after tft.init(); line still reboots?

chung1608 commented 1 day ago

reboot right after tft.init(); image

Basitadam commented 1 day ago

reboot right after tft.init(); image

Now I see. You have ESP32-C3 board. Can you test with this "TFT_eSPI_ESP32_C3.h" file from this link:

https://www.filemail.com/d/bsgocapqwmdpeyj

I had the same issue. Modified the .h file

BR, Tim

chung1608 commented 1 day ago

another isssue, do not exit init_tft image

Basitadam commented 22 hours ago

another isssue, do not exit init_tft image

Strange. Here is my setup, tested again now, works OK:

Win10 Arduino 2.3.3 TFT_eSPI 2.5.43 ESP32 3.0.5

user.select.h:

// Setup for the ESP32 C3 with ILI9341 display
// Note SPI DMA with ESP32 C3 is not currently supported

#define USER_SETUP_ID 70
// See SetupX_Template.h for all options available

#define ILI9341_DRIVER
//#define ST7796_DRIVER
//#define ILI9488_DRIVER

// Adafruit qtpy default
//TFT_CS 6
//TFT_MOSI 7
//TFT_MISO 8
//TFT_SCLK 10

// Lolin C3 mini default
//TFT_CS 5
//TFT_MOSI 4
//TFT_MISO 3
//TFT_SCLK 2

//ESP32 C3 generic default
//TFT_CS 7
//TFT_MOSI 6
//TFT_MISO 5
//TFT_SCLK 4

#define TFT_CS   7

#define TFT_MOSI 6
#define TFT_MISO 5
#define TFT_SCLK 4

#define TFT_DC    10
#define TFT_RST   9

//#define TOUCH_CS  1 // Optional for touch screen

#define LOAD_GLCD
#define LOAD_FONT2
#define LOAD_FONT4
#define LOAD_FONT6
#define LOAD_FONT7
#define LOAD_FONT8
#define LOAD_GFXFF

#define SMOOTH_FONT

//#define SPI_FREQUENCY  27000000
#define SPI_FREQUENCY  40000000   // Maximum for ILI9341

#define SPI_READ_FREQUENCY  6000000 // 6 MHz is the maximum SPI read speed

#define SPI_TOUCH_FREQUENCY 2500000

My board:

C3SuperMiniPins

Adruino board setup:

ModuleSetup

And output: Screenshot 2024-11-13 183637

SPI pins are different but you said your setup was working before

Basitadam commented 21 hours ago

Works well on ESP32 3.0.7, too