espressif / arduino-esp32

Arduino core for the ESP32
GNU Lesser General Public License v2.1
13.3k stars 7.35k forks source link

Guru Meditation Error: Core 1 panic'ed with Espressif board package > 2.0.14 #10115

Open Patsjemoe opened 1 month ago

Patsjemoe commented 1 month ago

Board

ESP32S3 DEVKitC-1

Device Description

none

Hardware Configuration

ILI9486 3.5" TFT

Version

v3.0.4

IDE Name

Arduino 2.3.2

Operating System

windows10

Flash frequency

QIO80mhz

PSRAM enabled

no

Upload speed

115200

Description

Guru Meditation Error: Core 1 panic'ed, problem happening on Esp32S3, not on esp32wroom32 problem is pointing to SPI write command(in TFT_eSPI::writecommand(unsigned char)) with board package >2.0.14......downgrading to 2.0.14 solved the problem, so my question is to correct the later /latest version 3.0.4

Sketch

irrelevant, problem is board package related, when selecting esp32s3

Debug Message

ESP Exception Decoder
Sketch: ui FQBN: esp32:esp32:esp32s3

PC : 0x420267fa PS : 0x00060430 A0 : 0x820269d8 A1 : 0x3fcebd20
A2 : 0x3fc969a8 A3 : 0x00000000 A4 : 0x60004000 A5 : 0x00000010
A6 : 0x000000ff A7 : 0xff000000 A8 : 0x08000000 A9 : 0x3fcebcf0
A10 : 0x3fcaa72c A11 : 0x00000001 A12 : 0x02625a00 A13 : 0xffffffff
A14 : 0x00000031 A15 : 0x00000000 SAR : 0x00000006 EXCCAUSE: 0x0000001d
EXCVADDR: 0x00000010 LBEG : 0x4202ae24 LEND : 0x4202ae6b LCOUNT : 0x00000003

Backtrace: 0x420267f7:0x3fcebd20 0x420269d5:0x3fcebd50 0x42026bf4:0x3fcebd80 0x420020bb:0x3fcebda0 0x4202be06:0x3fcebe10 0x4037ed22:0x3fcebe30

PC: 0x420267fa: is in TFT_eSPI::writecommand(unsigned char) (i:\arduino\hardware\espressif\esp32\sketches\S035\SjotterS035\libraries\TFT_eSPI\TFT_eSPI.cpp:81).
EXCVADDR: 0x00000010

Decoding stack results
0x420267f7: is in TFT_eSPI::writecommand(unsigned char) (i:\arduino\hardware\espressif\esp32\sketches\S035\SjotterS035\libraries\TFT_eSPI\TFT_eSPI.cpp:81).
0x420269d5: is in TFT_eSPI::init(unsigned char) (i:\arduino\hardware\espressif\esp32\sketches\S035\SjotterS035\libraries\TFT_eSPI\TFT_eSPI.cpp:692).
0x42026bf4: is in TFT_eSPI::begin(unsigned char) (i:\arduino\hardware\espressif\esp32\sketches\S035\SjotterS035\libraries\TFT_eSPI\TFT_eSPI.cpp:603).
0x420020bb: setup() at I:\arduino\hardware\espressif\esp32\sketches\S035\SjotterS035\ui\ui.ino:82
0x4202be06: loopTask(void*) at C:\Users\ludok\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.3\cores\esp32\main.cpp:59
0x4037ed22: vPortTaskWrapper at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa\port.c:162

Other Steps to Reproduce

No response

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

VojtechBartoska commented 1 month ago

@lucasssvaz can you please check and help triage this issue? Thanks

me-no-dev commented 1 month ago

Issue is in the TFT_eSPI library that is not yet compatible with Arduino v3. Please @Patsjemoe go file an issue there (or chime in one already opened by someone else)

Patsjemoe commented 1 month ago

Hi, In the datasheet, I found a change in SPI_MOSI_DLEN_REG to SPI_MS_DLEN_REG, but this change was already implemented in the TFT_eSPI. Arduino V3 must have made more changes, specifically related to the SPI command section. Can you confirm what changes have been made, so a search for the problem will be easier . thanks in advance best regards Ludo

On Mon, 5 Aug 2024 at 16:20, Me No Dev @.***> wrote:

Issue is in the TFT_eSPI library that is not yet compatible with Arduino v3. Please @Patsjemoe https://github.com/Patsjemoe go file an issue there (or chime in one already opened by someone else)

— Reply to this email directly, view it on GitHub https://github.com/espressif/arduino-esp32/issues/10115#issuecomment-2269198660, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMMBAJVKCGR3HMZF6ZT63CLZP6C4PAVCNFSM6AAAAABL7ZMCAOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENRZGE4TQNRWGA . You are receiving this because you were mentioned.Message ID: @.***>

Patsjemoe commented 1 month ago

Hi, I also tried V2.017 which shows the same error, and read in some links that V2.015 and 2.016 also have the problem. Can you confirm where I can find details on the changes made from V2.014 to V2.015 specifically related to SPI. thanks regards Ludo

JimDrewGH commented 1 month ago

This has been a long standing issue - since v2.0.15 was released. Perhaps this hack will help to understand the issue:

https://github.com/Bodmer/TFT_eSPI/issues/3384#issuecomment-2211470238

There was apparently a change made to how the SPI ports are assigned in v2.0.15 and later core versions.

Patsjemoe commented 1 month ago

Hi Jim, I think I found a solution to the problem, and posted this in TFT_eSPI. But since it is started with 2.0.15, something in that board library must have changed. In ESP32 technical reference manual, you can find FSPI, VSPI, HSPI, but these terms do not show up in the ESP32-S3 version, there it is SPI1, SPI2, SPI3, so I suspect that in the setup, changes related to these terms must have occured. regards Ludo

On Wed, 7 Aug 2024 at 09:42, Jim Drew @.***> wrote:

This has been a long standing issue - since v2.0.15 was released. Perhaps this hack will help to understand the issue:

Bodmer/TFT_eSPI#3384 (comment) https://github.com/Bodmer/TFT_eSPI/issues/3384#issuecomment-2211470238

— Reply to this email directly, view it on GitHub https://github.com/espressif/arduino-esp32/issues/10115#issuecomment-2272828653, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMMBAJTTFSPS4ULUADHSF3LZQHFW5AVCNFSM6AAAAABL7ZMCAOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENZSHAZDQNRVGM . You are receiving this because you were mentioned.Message ID: @.***>

Jason2866 commented 1 month ago

The issue is in IDF code. The Macros for REG_SPI_BASE are wrong there. Every lib using this info fails. The mentioned working core 2.0.14 is based on an other older IDF version, where this info was completely missing. Many 3rd party libs defined this value themselves. This approach is not working anymore.

To solve the issue without hacky workarounds, IDF wrong definition needs to be corrected. It is the same issue as in https://github.com/espressif/arduino-esp32/issues/9618

JimDrewGH commented 1 month ago

It might be handy if someone can just post exactly what changes are needed to the IDF files so we can manually fix this issue, and also let the Espressif team know.

Jason2866 commented 1 month ago

@JimDrewGH Did you follow the link mentioned the post before yours? Everything mentioned there what's wrong and needs to be changed in IDF

lucasssvaz commented 2 weeks ago

Related to https://github.com/espressif/arduino-esp32/issues/10254