Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.28inch_ESP32-2424S012 boot loop #3544

Open
chung1608 opened this issue Nov 10, 2024 · 19 comments
Open

1.28inch_ESP32-2424S012 boot loop #3544

chung1608 opened this issue Nov 10, 2024 · 19 comments

Comments

@chung1608
Copy link

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
Copy link

Can you send your setup? Pin defines file

@JVRMTS
Copy link

JVRMTS commented Nov 11, 2024

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
Copy link

Can you add this line and test:

#define USE_HSPI_PORT

@chung1608
Copy link
Author

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
Copy link

JVRMTS commented Nov 11, 2024

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

@Basitadam
Copy link

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
Copy link
Author

reboot right after tft.init();
image

@Basitadam
Copy link

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
Copy link
Author

another isssue, do not exit init_tft
image

@Basitadam
Copy link

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
Copy link

Works well on ESP32 3.0.7, too

@chung1608
Copy link
Author

no luck with me, I'm use this LCD
image
ESP32-2424S012-V1 0

@Basitadam
Copy link

Can you send your user.select.h file. I want to test with it

@chung1608
Copy link
Author

Can you send your user.select.h file. I want to test with it

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

@Basitadam
Copy link

Basitadam commented Nov 14, 2024

Can you send your user.select.h file. I want to test with it

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

Thank you.

WhatsApp.Video.2024-11-14.at.20.35.18.mp4

OK. It stuck after tft.init like yours. Something with the User_Setup.h file.
I created a new one. I am sending it with the link below. There is an Arduino test sketch and the new setup file

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

Save the setup file (Setup70tk_ESP32_C3_GC9A01.h) to your "....\Arduino\libraries\TFT_eSPI\User_Setups" folder,
Add this line

#include <User_Setups/Setup70tk_ESP32_C3_GC9A01.h>    // Setup file for ESP32 C3 with SPI GC9A01

to your User_Setup_Select.h file,
Comment the line #include <User_Setup.h> in the User_Setup_Select.h file.
Upload the Arduino sketch "TFT_eSPI_SimpleTest.ino" and enjoy

Hope this will solve your issue.

@chung1608
Copy link
Author

working, thank you ^^

@Basitadam
Copy link

working, thank you ^^

HappyFace();

@SideshowAlex
Copy link

@Basitadam The content of the link has expired. Can you repost your header file inline or in a gist?

@Basitadam
Copy link

@Basitadam The content of the link has expired. Can you repost your header file inline or in a gist?

Sure:

// Setup for the ESP32 C3 with GC90A1 display
// 2024.11.14 by Timucin KANATLI

#define USER_SETUP_ID 70
#define GC9A01_DRIVER


#define TFT_CS   10
#define TFT_MOSI 7
#define TFT_MISO 5
#define TFT_SCLK 6

#define TFT_DC    2
#define TFT_RST   -1


#define TFT_BL   3             // LED back-light control pin
#define TFT_BACKLIGHT_ON HIGH  // Level to turn ON back-light (HIGH or LOW)

#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  40000000   
#define SPI_READ_FREQUENCY  6000000 


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants