I had been working on a ESP32 breakout board and the esp32_ili9341 example project, so far so good. At work we just got a ESP-WROVER-KIT and i wanted to use the built in LCD on it, it’s controlled by the ILI9341 chip, the pinout is as follows:
LCD / U5
ESP32 Pin
LCD Signal
GPIO18
RESET
GPIO19
SCL
GPIO21
D/C
GPIO22
CS
GPIO23
SDA
GPIO25
SDO
GPIO5
Backlight
So i changed the definitions at disp_spi.h to: #define DISP_SPI_MOSI 23 #define DISP_SPI_CLK 19 #define DISP_SPI_CS 22
And in ili9341.h: #define ILI9341_DC 21 #define ILI9341_RST 18 #define ILI9341_BCKL 5
But i get nothing on the display, so before digging into it i wanted to know if somebody is already using lvgl on this kit, and if so, do you see anything wrong on my pin configuration?
In the display init function change the init backlight function to be called with (BACKLIGHT_PIN, 0), it should work, i had the same issue. If it still doesn’t work i will send you my project tomorrow.
Thanks for the reply @Erol, i forgot to run the make monitor command and now i see i’m getting an assertion, so the board it’s resetting itself, here’s the assert info:
E (402) spi_hal: spi_hal_get_clock_conf(69): When work in full-duplex mode at frequency > 26.7MHz, device cannot read correct data.
Try to use IOMUX pins to increase the frequency limit, or use the half duplex mode.
Please note the SPI master can only work at divisors of 80MHz, and the driver always tries to find the closest frequency to your configuration.
Specify SPI_DEVICE_NO_DUMMY to ignore this checking. Then you can output data at higher speed, or read data at your own risk.
E (442) spi_master: spi_bus_add_device(402): assigned clock speed not supported
assertion “ret==ESP_OK” failed: file “/home/d3bug/dev/esp32_ili9341/components/drv/disp_spi.c”, line 76, function: disp_spi_init
It seems to me the assigned pins are not suitable for a SCLK of 40MHz, so i changed the configuration of the spi_device_interface_config_t to:
spi_device_interface_config_t devcfg={
.clock_speed_hz=20*1000*1000, //Clock out at 20 MHz
.mode=0, //SPI mode 0
.spics_io_num=DISP_SPI_CS, //CS pin
.queue_size=1,
.pre_cb=NULL,
.post_cb=spi_ready,
};
I am also using ESP-WROVER-KIT v4.1 with the built-in display ili9341. So far I’ve been trying to run literally any example project but without success.
Running the default project will detect and initialize the ili9341 display, but nothing is getting displayed on it.
Any input on how to solve this is appreciated.
Edit: I’ve tried the tips described in the above replies.
I can only attach one image per post, but this is the command I am using to set the environment variables for the dev kit: . $HOME/esp/esp-idf/export.sh
This is the full monitor output I am receiving after running the default project lgvl-demo.
I went in the menuconfig and selected the correct predefined display configuration and it works like a charm. Also prior to this I made sure my ESP-IDF version wasn’t the culprit and updated to the latest.