Lvgl in ESP-WROVER-KIT v4.1

Hi,

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?

Regards

  • Carlos

Hello Carlos,

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,
};

And now the display is working :smiley:

1 Like

It works at 40MHz if i set the SPI_DEVICE_HALFDUPLEX flag like so:

spi_device_interface_config_t devcfg={
    .clock_speed_hz=40*1000*1000,           //Clock out at 40 MHz
    .mode=0,                                //SPI mode 0
    .spics_io_num=DISP_SPI_CS,              //CS pin
    .queue_size=1,
    .pre_cb=NULL,
    .post_cb=spi_ready,
    .flags = SPI_DEVICE_HALFDUPLEX
};

Hi,

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.
image

Any input on how to solve this is appreciated.

Edit: I’ve tried the tips described in the above replies.

Just cloned the repo and flashed it into my Wrover kit, it is working as expected, I’m getting this monitor output:

Yours isn’t enabling the backlight, maybe thats why you can’t see anything. No modifications needed to the source code.

What version of the ESP-IDF are you using?
What version (commit) of the lv_port_esp32 repo are you using?

Regards

Hi Carlos,

Sorry for the late reply.

I am using:

  • v4.1 - dev for ESP-IDF;
  • commit 1767b0e for lv_port_esp32.

Thanks.

Hi,

Please attach the monitor output and if possible an screenshot of how are you configuring the dev kit, I had no issues with it.

Thanks for the reply.

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’m getting this output

https://forum.lvgl.io/uploads/default/original/2X/b/b83b5d85ac994e09765fd89b3326c94453c1856c.png

What is the pinout you’re using?

I’ve finally found the problem.

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.

Thanks for the help.

1 Like

Hi,

Nice to know that you got it working, have fun :slight_smile: