Xiao ESP32S3 and ILI9341 hardware SPI

I’m trying to connect a TFT touchscreen to the Xiao ESP32S3 using the Arduino IDE.
I succeeded to use it with the Adafruit_ILI9341 library and the software SPI implementation using the example Adafruit_ILI9341/graphictest (The wiring and pin definitions seems OK)

The problem is when I try to use the hardware (faster) SPI with the Adafruit library or the TFT_eSPI library. I can only get a blank screen.

With Adafruit_ILI9341 I commented the line to make the sketch work:

Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC);

and uncommented the line:
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC, TFT_MOSI, TFT_SCLK, TFT_RST, TFT_MISO);

I use these pin definitions

#define TFT_MOSI D10
#define TFT_SCLK D8
#define TFT_MISO D9

#define TFT_CS    D1
#define TFT_DC    D3
#define TFT_RST   D4

I’ve read that there are some problems with the new ESP32 board library and the TFT_eSPI library and I’ve downgraded to ESP32 2.0.14 version.

Can someone guide me to find the problem?

Thanks in advance.

Hi There,

So the BSP definitely will factor into the success or fail.
On the ESP32’s some board support packages don’t work with TFT_eSPI.lib
Open the examples and run the userSetup.ino it will tell/show you what the configuration is or what it thinks it is, almost always the correct edits need to be made to work with certain displays.
Check out the S3 on the ROUND display example I posted with code, and compiler output have a look and setup the same (choose your display)
Also helps if you specify the pins you will use specifically in the #defines.

HTH
GL :slight_smile: PJ :v: