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

library not working with espressif32 esp32-s3 Arduino core > 2.0.14 #3329

Open
Jason2866 opened this issue May 16, 2024 · 14 comments
Open

library not working with espressif32 esp32-s3 Arduino core > 2.0.14 #3329

Jason2866 opened this issue May 16, 2024 · 14 comments

Comments

@Jason2866
Copy link

Device crashes at boot.
Open issue in Arduino repo espressif/arduino-esp32#9618 (comment)
and
Xinyuan-LilyGO/T-Dongle-S3#26

@Jason2866 Jason2866 changed the title library not working with espressif32 Arduino core > 2.0.14 library not working with espressif32 esp32-s3 Arduino core > 2.0.14 May 16, 2024
@thelastoutpostworkshop
Copy link

thelastoutpostworkshop commented May 18, 2024

I confirm, esp32-s3 reset under 2.0.16 (when init is called), when installing espressif arduino core 2.0.14 works fine

@jfseaman
Copy link

jfseaman commented May 20, 2024

I confirm, under 2.0.14 it works for ESP32-C3, ESP32-S3. I did not test ESP32 but same code.

Under 2.0.15 and 2.0.16. Software reset breaks. Actual code from TFT_eSPI_ESP32.h TFT_eSPI_ESP32_xx.h is:

#define SET_BUS_WRITE_MODE *_spi_user = SPI_USR_MOSI
and
#define SET_BUS_WRITE_MODE *_spi_user = SPI_USR_MOSI | SPI_CK_OUT_EDGE

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

@jfseaman
Copy link

The issue persists under 2.0.17.

@ats3788
Copy link

ats3788 commented May 24, 2024

I use PlatformIO
[env:my-esp32]
platform = espressif32 @ 6.7.0
For further exploration of configuration options for the espressif32 development platform, refer to the documentation.

Supported Frameworks
Arduino - v2.0.16 (based on IDF v4.4.7)
ESP-IDF - v5.1.2
I don't even connect the ILI9341 to the board and it reboots

Rebooting...
␀�ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0xc (RTC_SW_CPU_RST),boot:0xb (SPI_FAST_FLASH_BOOT)
Saved PC:0x4202934a
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3808,len:0x4bc
load:0x403c9700,len:0xbd8
load:0x403cc700,len:0x2a0c
entry 0x403c98d0
[ 112][V][esp32-hal-uart.c:330] uartBegin(): UART0 baud(115200) Mode(800001c) rxPin(44) txPin(43)
[ 121][V][esp32-hal-uart.c:416] uartBegin(): UART0 not installed. Starting installation
[ 129][V][esp32-hal-uart.c:463] uartBegin(): UART0 initialization done.
Guru Meditation Error: Core 1 panic'ed (StoreProhibited). Exception was unhandled.

@ats3788
Copy link

ats3788 commented May 24, 2024

#define TFT_ESPI_VERSION "2.5.43"
#define ILI9341_DRIVER // Generic driver for common displays

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

                // Typical board default pins - change to match your board

#define TFT_CS 10 // 10 or 34 (FSPI CS0)
#define TFT_MOSI 35 // 11 or 35 (FSPI D)
#define TFT_SCLK 36 // 12 or 36 (FSPI CLK)
#define TFT_MISO 37 // 13 or 37 (FSPI Q)

// Use pins in range 0-31
#define TFT_DC 7
#define TFT_RST 6

@cmachsocket
Copy link

i met the problem too.
I use 2.0.17 and esp32s3,and the program will reboot when it run tft.init()

@StuartsProjects
Copy link

Same here too;

https://github.com/Bodmer/TFT_eSPI/issues/3346#issuecomment-2143324416

A program to transmer images over LoRa and display on a TFT was working on core 2.0.11, but stopped when I updgraded the core.

By going backwards with the cores I found the last one that worked was 2.0.14. For later core versions the program would crash on start.

ESP32S3, Arduino IDE 1.8.19.

@youngsu999
Copy link

youngsu999 commented Jun 4, 2024

Hi there,

I'm suffering for same issue.

  • ESP32S3, Arduino 2.0.17

I found a clue on espressif32 Arduino fimeware.

the system reboots when call TFT_WRITE_BITS and i found out the macro uses the below defines

image

  #define _spi_cmd       (volatile uint32_t*)(SPI_CMD_REG(SPI_PORT))
  #define _spi_user      (volatile uint32_t*)(SPI_USER_REG(SPI_PORT))
  #define _spi_mosi_dlen (volatile uint32_t*)(SPI_MOSI_DLEN_REG(SPI_PORT))
  #define _spi_w         (volatile uint32_t*)(SPI_W0_REG(SPI_PORT))

the macros such as SPI_CMD_REG uses REG_SPI_BASE and the SPI ports are define as 0/1 (HSPI/VSPI)

#define SPI_CMD_REG(i)          (REG_SPI_BASE(i) + 0x0)

however, in the defintion on REG_SPI_BASE, it always returns Null address (because of (i) >=2 )

#define REG_SPI_BASE(i) (((i) >= 2) ? (DR_REG_SPI2_BASE + (i - 2) * 0x1000) : (0)) // GPSPI2 and GPSPI3

And i fix it as ->

#define REG_SPI_BASE(i) (((i) <= 2) ? (DR_REG_SPI2_BASE + (i - 2) * 0x1000) : (0)) // GPSPI2 and GPSPI3

Then it stops to reboot.

However, the macro was stuck in following lines.

image

Anyone can figure out why?


  1. espressif arduino firmware seems to have bugs.
  2. I have no idea why the macro stuck on while in the macro.

Thanks.

@gitboysimon
Copy link

I also have this issue, device re-starts continuously on tft.init()
Was previously using platform espressif32 6.5.0 and framework 2.0.14 on new pc I now have 6.7.0 and 2.0.16, I reverted to platform = espessif32@6.5.0 and and it's ok with 2.0.16

@Kolodieiev
Copy link

Temporary solution.

#define USE_HSPI_PORT

#define TFT_DC 15
#define TFT_CS 7
#define TFT_MOSI 17 // sda
#define TFT_SCLK 18 // dcl
#define TFT_RST -1 // TFT reset pin connect to RST

// Позбутися помилки: піни не визначенні для HSPI_PORT
#define TFT_MISO 8 

@SergePD
Copy link

SergePD commented Jun 9, 2024

#define USE_HSPI_PORT
Yes, It works for me (esp32S3)

@thelastoutpostworkshop
Copy link

#define USE_HSPI_PORT
Works for me also in the device setup header file.
thanks

@PhilG1300
Copy link

For my ESP32S3 adding #define USE_HSPI_PORT in the variants/esp32s3/pins_arduino.h file in ESP32 version 3.0.1 works too. Had to make other changes for the backlight control as ledc... functions have changed in version 3.
Thanks for the suggestion as I thought I was stuck on version 2.0.14

@jfseaman
Copy link

jfseaman commented Jun 9, 2024

#define USE_HSPI_PORT Yes, It works for me (esp32S3)
I am working from a Volos Projects GC9A01 example. I just like his clock face. His code uses a GFXglyph.

I tried defining HSPI and using the latest 3.01 from Espressif. The number of defines lost/forgotten renders code uncompilable. Basically every TFT_xxx define is lost. The GFXglyph typdef is lost.

I have common code that is running on ESP32S3DevKit1, Adafruit QT Py S3 and XAIO ESP32C3.

Board definitions after 2.0.14 just don't work. Compiler is broken so bad it is unusable.

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