Hello all
I started a project using the waveshare ESP32-S3-Touch-LCD-7. While the communication with the serial monitor works just fine, I can’t get the screen to display anything.
First I tried to follow this guide: https://www.waveshare.com/wiki/ESP32-S3-Touch-LCD-7#Environment_Setup
As no example worked, I resorted to Gemini to get another attempt at it. But I never got more than a dimly lit backlight…
The board is connected to my PC via the UART-port and to be sure it has enough power, I connected the USB to a power supply.
I chose the ESP32S3 Dev Module in the Arduino IDE, the settings are currently as follows:
The last code I tried (by Gemini):
#include <Arduino_GFX_Library.h>
#include <Wire.h>
#define TFT_BL 2
#define I2C_SDA 10
#define I2C_SCL 11
// Using 10MHz (10000000L) - a perfect integer divider for S3 (160/16)
Arduino_ESP32RGBPanel *bus = new Arduino_ESP32RGBPanel(
GFX_NOT_DEFINED, GFX_NOT_DEFINED, GFX_NOT_DEFINED,
41 /* DE */, 40 /* VSYNC */, 39 /* HSYNC */, 42 /* PCLK */,
14 /* R0 */, 21 /* R1 */, 47 /* R2 */, 48 /* R3 */, 45 /* R4 */,
9 /* G0 */, 46 /* G1 */, 3 /* G2 */, 8 /* G3 */, 16 /* G4 */, 1 /* G5 */,
15 /* B0 */, 7 /* B1 */, 6 /* B2 */, 5 /* B3 */, 4 /* B4 */,
0, 8, 4, 8,
0, 8, 4, 8,
10000000L
);
Arduino_RGB_Display *gfx = new Arduino_RGB_Display(800, 480, bus, 0, true);
void setup() {
Serial.begin(115200);
delay(2000); // Wait for Serial
Serial.println("--- WAVESHARE S3 REV 1.2 RECOVERY ---");
// 1. Initialize I2C with lower frequency for stability
Wire.begin(I2C_SDA, I2C_SCL, 100000);
// 2. Scan I2C to find the Expander
Serial.println("Scanning I2C...");
byte error, address;
for(address = 1; address < 127; address++ ) {
Wire.beginTransmission(address);
error = Wire.endTransmission();
if (error == 0) {
Serial.printf("Found device at 0x%02X - Initializing...\n", address);
// Attempt to wake up the expander at whatever address we found
Wire.beginTransmission(address);
Wire.write(0x01);
Wire.write(0xFF);
Wire.endTransmission();
}
}
// 3. Enable Backlight
pinMode(TFT_BL, OUTPUT);
digitalWrite(TFT_BL, HIGH);
Serial.println("Backlight pin set HIGH");
// 4. Start Graphics
Serial.println("Starting LCD Bus...");
if (!gfx->begin()) {
Serial.println("GFX Begin Failed!");
while(1) delay(100);
}
gfx->fillScreen(0x07E0); // Bright Green
gfx->setCursor(100, 200);
gfx->setTextColor(0xFFFF);
gfx->setTextSize(5);
gfx->println("LINK ESTABLISHED");
Serial.println("Setup Complete.");
}
void loop() {
delay(1000);
}
In the serial monitor, this is printed:
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:0x3fce2820,len:0x116c
load:0x403c8700,len:0xc2c
load:0x403cb700,len:0x3108
entry 0x403c88b8
assert failed: lcd_ll_set_pixel_clock_prescale /IDF/components/hal/esp32s3/include/hal/lcd_ll.h:167 (prescale > 0 && prescale <= LCD_LL_PCLK_DIV_MAX)
Backtrace: 0x4037c2d9:0x3fcebc30 0x4037c2a1:0x3fcebc50 0x403830ba:0x3fcebc70 0x4201919d:0x3fcebdb0 0x4201505b:0x3fcebe00 0x420144c3:0x3fcebe40 0x420033bc:0x3fcebe70 0x42003496:0x3fcebf40 0x42002351:0x3fcebf60 0x4200810d:0x3fcebf80 0x4037d221:0x3fcebfa0
ELF file SHA256: 10d0bac60
Has anybody a sketch that should work and display something, so I can verify that the display is actually working? Or give other guidance here? I spent the last few hours with this problem, tried different libraries and so on and just can’t get anything displayed…
Thank you in advance!
