Blank ILI9341 screen using esp32 s3

The library is TFT_eSPI.
Before this config i was using esp32 c3 and st7789 and it was working fine. But now using ILI9341 2.2 240x320 tft screen and esp32 s3 (8mb flash and 2mb psram) it is showing black screen only. I checked and rechecked the wiring and it seems to be all fine.
To check the screen i am using default examples so it doesnt matter (commented fonts are not used i believe)
The code in user setup file is:

#define USER_SETUP_INFO "User_Setup"
#define ILI9341_DRIVER  
#define TFT_RGB_ORDER TFT_BGR
#define TFT_MISO  13 
#define TFT_MOSI  11
#define TFT_SCLK  12 
#define TFT_BL     9
#define TFT_CS    10  
#define TFT_DC    7   
#define TFT_RST   6
#define LOAD_GLCD 
#define LOAD_FONT2  
#define LOAD_FONT4
#define LOAD_GFXFF
#define SPI_FREQUENCY  4000000
#define SPI_READ_FREQUENCY  2500000

If you're going to supply Vcc with 3.3V, shouldn't you be closing J1 on the display to take the 3.3V regulator out of the equation?

which library are you using?
using a HiLegtgo display with a ESP32-S3-DevKitC-1 using the Adafruit_ILI9341 library i used the pin assignments

// ESP32_S3_DevKit_1 connections
/*#define TFT_CS    10  
#define TFT_DC    9
#define TFT_MOSI  11
#define TFT_CLK   12
#define TFT_RST   3
#define TFT_MISO  13*/

looks very similar to your pin usage

shouldnt affect since its a linear stabilizer. Plus, it is lighting up when you put 3.3v on led pin

Suit yourself. Good luck with your project.

Very good joke!
:rofl:

the library is TFT_eSPI and this layout did not change anything

just did it and no changes at all

you can explain if you wish to

try User_Setup.h file

// TFT_eSPI setup.h file for ESP32-S3-DevKitC-1
// HiLetgo 240X320 Resolution 2.8" SPI TFT LCD Display Touch Panel ILI9341 

#define USER_SETUP_INFO "User_Setup"

#define ILI9341_DRIVER

// For ST7735, ST7789 and ILI9341 ONLY, define the colour order IF the blue and red are swapped on your display
// Try ONE option at a time to find the correct colour order for your display
//  #define TFT_RGB_ORDER TFT_RGB  // Colour order Red-Green-Blue
//  #define TFT_RGB_ORDER TFT_BGR  // Colour order Blue-Green-Red

// For ST7789, ST7735, ILI9163 and GC9A01 ONLY, define the pixel width and height in portrait orientation
#define TFT_WIDTH  240 // ST7789 240 x 240 and 240 x 320
#define TFT_HEIGHT 320 // ST7789 240 x 320

// If colours are inverted (white shows as black) then uncomment one of the next
// 2 lines try both options, one of the options should correct the inversion.

// #define TFT_INVERSION_ON
// #define TFT_INVERSION_OFF

#define TFT_CS   10 
#define TFT_MOSI MOSI 
#define TFT_SCLK SCK 
#define TFT_MISO MISO 

#define TFT_DC   9
#define TFT_RST  3

#define LOAD_GLCD
#define LOAD_FONT2
#define LOAD_FONT4
#define LOAD_FONT6
#define LOAD_FONT7
#define LOAD_FONT8
#define LOAD_GFXFF

#define SMOOTH_FONT

#define SPI_FREQUENCY   10000000

#define SPI_TOUCH_FREQUENCY  2500000



Tried and nothing has changed i'm afraid. Also i see no definitions of MOSI, MISO and SCK - what do you mean by them and what numbers do they contain?

defaults are usually defined for each device - e.g. try running

/*
  Rui Santos
  Complete project details at https://RandomNerdTutorials.com/esp32-spi-communication-arduino/
  
  Permission is hereby granted, free of charge, to any person obtaining a copy
  of this software and associated documentation files.
  
  The above copyright notice and this permission notice shall be included in all
  copies or substantial portions of the Software.
*/

//Find the default SPI pins for your board
//Make sure you have the right board selected in Tools > Boards
void setup() {
  // put your setup code here, to run once:
  Serial.begin(115200);
  delay(3000);
  Serial.print("MOSI: ");
  Serial.println(MOSI);
  Serial.print("MISO: ");
  Serial.println(MISO);
  Serial.print("SCK: ");
  Serial.println(SCK);
  Serial.print("SS: ");
  Serial.println(SS);  
  Serial.print("SDA: ");
  Serial.println(SDA);  
  Serial.print("SCL: ");
  Serial.println(SCL);  
}

void loop() {
  // put your main code here, to run repeatedly:
}


for Tools>Board ESP32S3 Dev Module it prints

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

as i remember esp32 s3 can use almost any pin as spi, so as c3 so i dont think the problem is in wrong pins

it only prints this:

ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x1 (POWERON),boot:0x8 (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3818,len:0x109c
load:0x403c9700,len:0x4
load:0x403c9704,len:0xb50
load:0x403cc700,len:0x2fe4
entry 0x403c98ac

nevermind, it all shows now

Did you find some errors in Serial Monitor?

I found the following error with ESP32-S3 (XIAO) & ILI9341 (2.4") when I execute TFT_graphicstest_PDQ :

Rebooting...
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0xc (RTC_SW_CPU_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
Saved PC:0x40378c2a
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce2820,len:0x1188
load:0x403c8700,len:0x4
load:0x403c8704,len:0xbf0
load:0x403cb700,len:0x30e4
entry 0x403c88ac


Bodmer's TFT_eSPI library Test!
Guru Meditation Error: Core  1 panic'ed (StoreProhibited). Exception was unhandled.

Core  1 register dump:
PC      : 0x42003af8  PS      : 0x00060530  A0      : 0x82003b84  A1      : 0x3fca1840  
A2      : 0x3fc96490  A3      : 0x00000000  A4      : 0x00000008  A5      : 0x00000009  
A6      : 0x000000ff  A7      : 0x60004000  A8      : 0x00000010  A9      : 0x08000000  
A10     : 0x3fc9655c  A11     : 0x04c4b400  A12     : 0x00000001  A13     : 0x00000000  
A14     : 0x00000004  A15     : 0x04c4b400  SAR     : 0x00000002  EXCCAUSE: 0x0000001d  
EXCVADDR: 0x00000010  LBEG    : 0x42005cbc  LEND    : 0x42005cc9  LCOUNT  : 0x00000000  

I my case, I have the following enabled in User_Setup.h to solve my issue:

// 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

You can find some issues related to TFT_eSPI, ESP32-S3 and ESP32 Espressif board package 3.x. For example:

Hope this helps to solve your issue.

is the display working now?
if so what was the problem?

I apologize for the lack of explanation. All i wanted to say is that i forgot to turn off usb cdc on boot so serial monitor couldnt show anything. And the entire issue with screen was solved, thanks to this person:

It solved the issue, thankies for your reply and special thanks for explanation how you reached to this point

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.