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

In version 3.0.2 the TFT_ESPI library is not used correctly and the module restarts repeatedly. LVGL 9.2 #10254

Open
1 task done
43823845 opened this issue Aug 28, 2024 · 6 comments
Labels
Status: Awaiting triage Issue is waiting for triage

Comments

@43823845
Copy link

Board

ESP32-C3

Device Description

Guru Meditation Error: Core 0 panic'ed (Store access fault). Exception was unhandled.

Core 0 register dump:
MEPC : 0x420507de RA : 0x420507d6 SP : 0x3fca6d00 GP : 0x3fc8c600
TP : 0x3fc89ce4 T0 : 0xffffffff T1 : 0xffc3ffff T2 : 0x00000001
S0/FP : 0x3fca2bd4 S1 : 0x00000000 A0 : 0x00000000 A1 : 0x00001001
A2 : 0x00000000 A3 : 0x00000001 A4 : 0x08000000 A5 : 0x00000010
A6 : 0x00000000 A7 : 0x04c4b400 S2 : 0x00000007 S3 : 0x00000001
S4 : 0x000000a0 S5 : 0x3fc8dd6c S6 : 0x00000a00 S7 : 0x00000000
S8 : 0x00000000 S9 : 0x00000000 S10 : 0x00000000 S11 : 0x00000000
T3 : 0x00000000 T4 : 0x0000000f T5 : 0x003c0000 T6 : 0x00000003
MSTATUS : 0x00001881 MTVEC : 0x40380001 MCAUSE : 0x00000007 MTVAL : 0x00000010
MHARTID : 0x00000000

If the annotation tft.begin returns to normal, along with the LVGL used it also fails to be referenced, the issue seems to only appear on ESP32-C3

Hardware Configuration

#define TFT_MOSI 6 // In some display driver board, it might be written as "SDA" and so on.
#define TFT_SCLK 7
#define TFT_CS -1 // Chip select control pin
#define TFT_DC 10 // Data Command control pin
#define TFT_RST 8 // Reset pin (could connect to Arduino RESET pin)

Version

latest master (checkout manually)

IDE Name

PlatformIO

Operating System

WINDOWS11

Flash frequency

40M

PSRAM enabled

no

Upload speed

300000

Description

Guru Meditation Error: Core 0 panic'ed (Store access fault). Exception was unhandled.

Core 0 register dump:
MEPC : 0x420507de RA : 0x420507d6 SP : 0x3fca6d00 GP : 0x3fc8c600
TP : 0x3fc89ce4 T0 : 0xffffffff T1 : 0xffc3ffff T2 : 0x00000001
S0/FP : 0x3fca2bd4 S1 : 0x00000000 A0 : 0x00000000 A1 : 0x00001001
A2 : 0x00000000 A3 : 0x00000001 A4 : 0x08000000 A5 : 0x00000010
A6 : 0x00000000 A7 : 0x04c4b400 S2 : 0x00000007 S3 : 0x00000001
S4 : 0x000000a0 S5 : 0x3fc8dd6c S6 : 0x00000a00 S7 : 0x00000000
S8 : 0x00000000 S9 : 0x00000000 S10 : 0x00000000 S11 : 0x00000000
T3 : 0x00000000 T4 : 0x0000000f T5 : 0x003c0000 T6 : 0x00000003
MSTATUS : 0x00001881 MTVEC : 0x40380001 MCAUSE : 0x00000007 MTVAL : 0x00000010
MHARTID : 0x00000000

Stack memory:
3fca6d00: 0x00000007 0x3fc8f504 0x02625a00 0x00000001 0x00000007 0x3fca0000 0x3fca2bd4 0x42050d44
3fca6d20: 0x00001800 0x00000110 0x00000000 0x00000000 0x00000000 0x3fc8f504 0x00000110 0x00000050
3fca6d40: 0x3fca2bd4 0x3fc8f504 0x3fc8f514 0x4200d156 0x00000000 0x00000000 0x00000000 0x00000000
3fca6d60: 0x00000000 0x3fca0000 0x42031000 0x42000710 0x00000000 0x00000000 0x00000000 0x420344c4
3fca6d80: 0x00000000 0x00000000 0x00000000 0x40387df4 0x00000000 0x00000000 0x00000000 0x00000000
3fca6da0: 0x00000000 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5
3fca6dc0: 0xbaad5678 0x00000160 0xabba1234 0x00000154 0x3fca6bb0 0x000003ed 0x3fc9f4cc 0x3fc9f4cc
3fca6de0: 0x3fca6dd0 0x3fc9f4c4 0x00000018 0x3fca7a60 0x3fca7a60 0x3fca6dd0 0x00000000 0x00000001
3fca6e00: 0x3fca4dc0 0x706f6f6c 0x6b736154 0x2a6e3400 0x0039c4a2 0x00000000 0x3fca6db0 0x00000001
3fca6e20: 0x00000001 0x00000000 0x00000000 0x00000000 0x3fca0b44 0x3fca0bac 0x3fca0c14 0x00000000
3fca6e40: 0x00000000 0x00000001 0x00000000 0x00000000 0x00000000 0x42054724 0x00000000 0x00000000
3fca6e60: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3fca6e80: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3fca6ea0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3fca6ec0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3fca6ee0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3fca6f00: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3fca6f20: 0xbf000000 0xbaad5678 0x00000060 0xabba1234 0x00000054 0x00000000 0x3fca6f34 0x00000000
3fca6f40: 0x00000000 0x00000000 0x3fca6f4c 0xffffffff 0x3fca6f4c 0x3fca6f4c 0x00000000 0x3fca6f60
3fca6f60: 0xffffffff 0x3fca6f60 0x3fca6f60 0x00000001 0x00000001 0x00000000 0x4400ffff 0x00000000
3fca6f80: 0xb33fffff 0x00000000 0xbaad5678 0x00000100 0xabba1234 0x000000f4 0x00000000 0x00000014
3fca6fa0: 0x3fca7628 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3fca6fc0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3fca6fe0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3fca7000: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3fca7020: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000101 0x00000000
3fca7040: 0x00000000 0x0000000a 0x3fca75f0 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3fca7060: 0x00000000 0x00000000 0x00000000 0x3fca709c 0x3fca71f0 0x00000000 0x3fca7460 0x3fca73fc
3fca7080: 0x3fca758c 0x3fca7528 0x3fca74c4 0xbaad5678 0x00000150 0xabba1234 0x00000144 0x3fca70f0
3fca70a0: 0x3fca70f0 0x3fca71e0 0x3fca71d4 0x00000000 0x3fca70b4 0xffffffff 0x3fca70b4 0x3fca70b4
3fca70c0: 0x00000000 0x3fca70c8 0xffffffff 0x3fca70c8 0x3fca70c8 0x00000000 0x00000014 0x0000000c
3fca70e0: 0xb400ffff 0x00000000 0xb33fffff 0x00000000 0x4c119aa8 0x3589dff2 0xd90ee067 0x161ee435

Sketch

lv_init();

  lv_tick_set_cb(millis);

  lv_display_t *disp;
  disp = lv_tft_espi_create(TFT_HOR_RES, TFT_VER_RES, draw_buf, sizeof(draw_buf));
  lv_display_set_rotation(disp, TFT_ROTATION);

Debug Message

Rebooting...
ESP-ROM:esp32c3-api1-20210207
Build:Feb  7 2021
rst:0x3 (RTC_SW_SYS_RST),boot:0xd (SPI_FAST_FLASH_BOOT)
Saved PC:0x4038230c
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fcd5810,len:0x438
load:0x403cc710,len:0x90c
load:0x403ce710,len:0x2624
entry 0x403cc710

Guru Meditation Error: Core  0 panic'ed (Store access fault). Exception was unhandled.

Core  0 register dump:
MEPC    : 0x420507de  RA      : 0x420507d6  SP      : 0x3fca6d00  GP      : 0x3fc8c600  
TP      : 0x3fc89ce4  T0      : 0xffffffff  T1      : 0xffc3ffff  T2      : 0x00000001
S0/FP   : 0x3fca2bd4  S1      : 0x00000000  A0      : 0x00000000  A1      : 0x00001001
A2      : 0x00000000  A3      : 0x00000001  A4      : 0x08000000  A5      : 0x00000010  
A6      : 0x00000000  A7      : 0x04c4b400  S2      : 0x00000007  S3      : 0x00000001  
S4      : 0x000000a0  S5      : 0x3fc8dd6c  S6      : 0x00000a00  S7      : 0x00000000
S8      : 0x00000000  S9      : 0x00000000  S10     : 0x00000000  S11     : 0x00000000  
T3      : 0x00000000  T4      : 0x0000000f  T5      : 0x003c0000  T6      : 0x00000003
MSTATUS : 0x00001881  MTVEC   : 0x40380001  MCAUSE  : 0x00000007  MTVAL   : 0x00000010  
MHARTID : 0x00000000

Stack memory:
3fca6d00: 0x00000007 0x3fc8f504 0x02625a00 0x00000001 0x00000007 0x3fca0000 0x3fca2bd4 0x42050d44
3fca6d20: 0x00001800 0x00000110 0x00000000 0x00000000 0x00000000 0x3fc8f504 0x00000110 0x00000050
3fca6d40: 0x3fca2bd4 0x3fc8f504 0x3fc8f514 0x4200d156 0x00000000 0x00000000 0x00000000 0x00000000
3fca6d60: 0x00000000 0x3fca0000 0x42031000 0x42000710 0x00000000 0x00000000 0x00000000 0x420344c4
3fca6d80: 0x00000000 0x00000000 0x00000000 0x40387df4 0x00000000 0x00000000 0x00000000 0x00000000
3fca6da0: 0x00000000 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5
3fca6dc0: 0xbaad5678 0x00000160 0xabba1234 0x00000154 0x3fca6bb0 0x000003ed 0x3fc9f4cc 0x3fc9f4cc
3fca6de0: 0x3fca6dd0 0x3fc9f4c4 0x00000018 0x3fca7a60 0x3fca7a60 0x3fca6dd0 0x00000000 0x00000001
3fca6e00: 0x3fca4dc0 0x706f6f6c 0x6b736154 0x2a6e3400 0x0039c4a2 0x00000000 0x3fca6db0 0x00000001
3fca6e20: 0x00000001 0x00000000 0x00000000 0x00000000 0x3fca0b44 0x3fca0bac 0x3fca0c14 0x00000000
3fca6e40: 0x00000000 0x00000001 0x00000000 0x00000000 0x00000000 0x42054724 0x00000000 0x00000000
3fca6e60: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3fca6e80: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3fca6dc0: 0xbaad5678 0x00000160 0xabba1234 0x00000154 0x3fca6bb0 0x000003ed 0x3fc9f4cc 0x3fc9f4cc
3fca6de0: 0x3fca6dd0 0x3fc9f4c4 0x00000018 0x3fca7a60 0x3fca7a60 0x3fca6dd0 0x00000000 0x00000001
3fca6e00: 0x3fca4dc0 0x706f6f6c 0x6b736154 0x2a6e3400 0x0039c4a2 0x00000000 0x3fca6db0 0x00000001
3fca6e20: 0x00000001 0x00000000 0x00000000 0x00000000 0x3fca0b44 0x3fca0bac 0x3fca0c14 0x00000000
3fca6e40: 0x00000000 0x00000001 0x00000000 0x00000000 0x00000000 0x42054724 0x00000000 0x00000000
3fca6e60: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3fca6e80: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3fca6ea0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3fca6de0: 0x3fca6dd0 0x3fc9f4c4 0x00000018 0x3fca7a60 0x3fca7a60 0x3fca6dd0 0x00000000 0x00000001
3fca6e00: 0x3fca4dc0 0x706f6f6c 0x6b736154 0x2a6e3400 0x0039c4a2 0x00000000 0x3fca6db0 0x00000001
3fca6e20: 0x00000001 0x00000000 0x00000000 0x00000000 0x3fca0b44 0x3fca0bac 0x3fca0c14 0x00000000
3fca6e40: 0x00000000 0x00000001 0x00000000 0x00000000 0x00000000 0x42054724 0x00000000 0x00000000
3fca6e60: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3fca6e80: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3fca6e20: 0x00000001 0x00000000 0x00000000 0x00000000 0x3fca0b44 0x3fca0bac 0x3fca0c14 0x00000000
3fca6e40: 0x00000000 0x00000001 0x00000000 0x00000000 0x00000000 0x42054724 0x00000000 0x00000000
3fca6e60: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3fca6e80: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3fca6ea0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3fca6ec0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3fca6ee0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3fca6f00: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3fca6f20: 0xbf000000 0xbaad5678 0x00000060 0xabba1234 0x00000054 0x00000000 0x3fca6f34 0x00000000
3fca6f40: 0x00000000 0x00000000 0x3fca6f4c 0xffffffff 0x3fca6f4c 0x3fca6f4c 0x00000000 0x3fca6f60
3fca6f60: 0xffffffff 0x3fca6f60 0x3fca6f60 0x00000001 0x00000001 0x00000000 0x4400ffff 0x00000000
3fca6f80: 0xb33fffff 0x00000000 0xbaad5678 0x00000100 0xabba1234 0x000000f4 0x00000000 0x00000014
3fca6ea0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3fca6ec0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3fca6ee0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3fca6f00: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3fca6f20: 0xbf000000 0xbaad5678 0x00000060 0xabba1234 0x00000054 0x00000000 0x3fca6f34 0x00000000
3fca6f40: 0x00000000 0x00000000 0x3fca6f4c 0xffffffff 0x3fca6f4c 0x3fca6f4c 0x00000000 0x3fca6f60
3fca6f60: 0xffffffff 0x3fca6f60 0x3fca6f60 0x00000001 0x00000001 0x00000000 0x4400ffff 0x00000000
3fca6f80: 0xb33fffff 0x00000000 0xbaad5678 0x00000100 0xabba1234 0x000000f4 0x00000000 0x00000014
3fca6fa0: 0x3fca7628 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3fca6fc0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3fca6fe0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3fca7000: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3fca6fa0: 0x3fca7628 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3fca6fc0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3fca6fe0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3fca7000: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3fca7020: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000101 0x00000000
3fca7040: 0x00000000 0x0000000a 0x3fca75f0 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3fca7020: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000101 0x00000000
3fca7040: 0x00000000 0x0000000a 0x3fca75f0 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3fca7060: 0x00000000 0x00000000 0x00000000 0x3fca709c 0x3fca71f0 0x00000000 0x3fca7460 0x3fca73fc
3fca7080: 0x3fca758c 0x3fca7528 0x3fca74c4 0xbaad5678 0x00000150 0xabba1234 0x00000144 0x3fca70f0
3fca7060: 0x00000000 0x00000000 0x00000000 0x3fca709c 0x3fca71f0 0x00000000 0x3fca7460 0x3fca73fc
3fca7080: 0x3fca758c 0x3fca7528 0x3fca74c4 0xbaad5678 0x00000150 0xabba1234 0x00000144 0x3fca70f0
3fca70a0: 0x3fca70f0 0x3fca71e0 0x3fca71d4 0x00000000 0x3fca70b4 0xffffffff 0x3fca70b4 0x3fca70b4
3fca70c0: 0x00000000 0x3fca70c8 0xffffffff 0x3fca70c8 0x3fca70c8 0x00000000 0x00000014 0x0000000c
3fca70a0: 0x3fca70f0 0x3fca71e0 0x3fca71d4 0x00000000 0x3fca70b4 0xffffffff 0x3fca70b4 0x3fca70b4
3fca70c0: 0x00000000 0x3fca70c8 0xffffffff 0x3fca70c8 0x3fca70c8 0x00000000 0x00000014 0x0000000c
3fca70e0: 0xb400ffff 0x00000000 0xb33fffff 0x00000000 0x4c119aa8 0x3589dff2 0xd90ee067 0x161ee435

3fca70e0: 0xb400ffff 0x00000000 0xb33fffff 0x00000000 0x4c119aa8 0x3589dff2 0xd90ee067 0x161ee435



ELF file SHA256: 755a621bb1a53a86

Other Steps to Reproduce

No response

I have checked existing issues, online documentation and the Troubleshooting Guide

  • I confirm I have checked existing issues, online documentation and Troubleshooting guide.
@43823845 43823845 added the Status: Awaiting triage Issue is waiting for triage label Aug 28, 2024
@me-no-dev
Copy link
Member

That library is known to not work with recent versions of ESP-IDF because of change in enumerating the SPI ports for S3 ad C3 (and probably more). We had the same issue and have it fixed locally, so the library will probably need to do the same.

@espressif espressif deleted a comment Aug 28, 2024
@espressif espressif deleted a comment Aug 28, 2024
@43823845
Copy link
Author

That library is known to not work with recent versions of ESP-IDF because of change in enumerating the SPI ports for S3 ad C3 (and probably more). We had the same issue and have it fixed locally, so the library will probably need to do the same.

Thanks for your reply, I am following the downgrade to 2.0.4 , this version works fine!

@ZnMnCr
Copy link

ZnMnCr commented Aug 28, 2024

I have another question, I can change the version of the board in ARDUINOIDE, what should I do in platformIO and where should I go to change the version?

@Jason2866
Copy link
Collaborator

Jason2866 commented Aug 28, 2024

@ZnMnCr Not the place to ask general questions about Platformi. Anyways see https://github.com/platformio/platform-espressif32/releases/tag/v6.6.0

@lbernstone
Copy link
Contributor

That library is known to not work with recent versions of ESP-IDF because of change in enumerating the SPI ports for S3 ad C3 (and probably more). We had the same issue and have it fixed locally, so the library will probably need to do the same.

Can you point me to that PR or code? I'll see if I can make a PR for TFT_eSPI.

@me-no-dev
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Awaiting triage Issue is waiting for triage
Projects
None yet
Development

No branches or pull requests

6 participants
@me-no-dev @lbernstone @Jason2866 @43823845 @ZnMnCr and others