ESP32-S3 DevKitC-1 SPI configuration?

Trying to use a pre v1.1 DevKit with TFT_eSpi graphics library. The FSPI
pin configuration in the technical manual doesn't seem to work ( I've tried it with two different boards ). Anyone had success in using SPI with this library?

I have lost my powers of xray vision and mind reading, so if you could post a hand drawn wiring diagram and code that has been formatted by the IDE (Tools/Autoformat) then ^^^ placed between code tags maybe something will happen.

2 Likes

Thank you for your response.
The SPI connection to ILI9341 is so: ( I think this is the default )

FSPICS0-GPIO10 -> CS ( ILI9341 )
FSPICLK-GPIO12 -> CLK
FSPIID -GPIO11 -> MOSI
FSPIQ -GPIO13 -> MISO
GPIO8 -> RST
GPIO9 -> DC
These are the values I used in the USER_SETUPS folder for ILI9341.
Then run any of the TFT_eSPI 320x240 examples. I've also tried using arbitrary pin assignments but that hasn't worked. ( Not sure arbitrary pin assignments are possible but what the heck )

Compiles and uploads with no problem but no display. Display power and backlight running from separate supply. Lovyan library works but not when using above pins. So I know the display and leads are ok.
Just trying to find out if anyone has made this SPI display work with this library and what pin configuration they used.

and the separate power supply shares a common ground with the ESP32?

Yes, all grounds tied together.

I used the Adafruit_ILI9341 library with a ESP32-S3 Devkit 1 and a ILI9341 display
File>Examples>Adafruit_ILI9341>graphicstest worked OK

post your code?

No problems with the TFT_eSPI, ILI9341 and ESP32S3 Dev kit board here.

Did you make the appropriate changes to the libraries User_Setup.h file ?

I'm using User_Setups/Setup70b_ESP32_S3_ILI9342.h configured
with GPIOs 10 (CS), 11 (MOSI), 12 (SCK), 13 (MISO)
GPIO3 (RST) GPIO9 (DC)
Seems like this should be a valid SPI setup. No arbitrary pin setup
works. No other library ( Adafruit_GFX, Lovyan ) will work with the
10, 11,12,13 setup. They will work if I just use an arbitrary pin setup.
So what version of the DevKit do you have? What pinout are you using?
Thanks a bunch, this is kinda puzzling.

Hey horace, Yep I've tested with this library using the full pinout
constructor. Works fine as long as I don't use the pins
specified as SPI in the technical manual. No code to post, just set constructor, compile. upload. I'd like to use TFT_eSPI but I can't get it
working.

which technical manual?
if I run esp32-spi-default_pins on a ESP32-S3 DevkitC-1 I get

default pins
MOSI: 11
MISO: 13
SCK: 12
SS: 10
SDA: 8
SCL: 9

the pinout I use is

MOSI 11
SCK 12
MISO 13

#define ILI9341_DRIVER 
#define TFT_CS    40
#define TFT_DC    42
#define TFT_RST   41
#define TFT_SPI_MODE 0

I found out I'm getting this error. I don't have any idea what to do about it .

Guru Meditation Error: Core 1 panic'ed (StoreProhibited). Exception was unhandled.

Core 1 register dump:
PC : 0x42002c57 PS : 0x00060230 A0 : 0x82002d2c A1 : 0x3fcebfd0
A2 : 0x00000010 A3 : 0x00000000 A4 : 0x60004000 A5 : 0x0000000b
A6 : 0x000000ff A7 : 0x00000000 A8 : 0x08000000 A9 : 0x3fcebfa0
A10 : 0x3fc95868 A11 : 0x00000001 A12 : 0x02625a00 A13 : 0xffffffff
A14 : 0x00000031 A15 : 0x00000000 SAR : 0x00000009 EXCCAUSE: 0x0000001d
EXCVADDR: 0x00000010 LBEG : 0x420066c8 LEND : 0x4200670f LCOUNT : 0x00000003

Backtrace: 0x42002c54:0x3fcebfd0 0x42002d29:0x3fcec000 0x42001d01:0x3fcec020 0x4200728a:0x3fcec040 0x4037dc52:0x3fcec060

I faced the same issue and did the following as a temporally workaround. Please give it a try.

Temporal solution

Define USE_HSPI_PORT or USE_FSPI_PORT in User_Setup.h.

// The ESP32 has 2 free SPI ports i.e. VSPI and HSPI, the VSPI is the default.
// If the VSPI port is in use and pins are not accessible (e.g. TTGO T-Beam)
// then uncomment the following line:
#define USE_HSPI_PORT // or USE_FSPI_PORT

Related issues on TFT_eSPI repository

I think that this is because different SPI definitions in ESP-IDF are used for each variant of the ESP32, but I'm currently investigating the details.

Edit: My test bench:

  • Arduino IDE 2.3.2
  • Seeed Studio XIAO ESP32S3
    • ESP32 board package: espressif/arduino-esp32 3.0.4
    • PSRAM: Disable
  • Display: ST7789
    • Interface: SPI
    • SPI Frequency: 80MHz
  • Tested on: September 12, 2024

Espressif do seem to make regular and significant changes to their core for the Arduino IDE, which does seem to break already published libraries.

I have gone back to Version 2.0.14 to achieve some stability.