Display MPI3501 + Ili9486 + XPT2046 [lvgl 7 + esp-idf] - Display not showing, but touch works

What MCU/Processor/Board and compiler are you using?

I’m using ESP32 V4 38 pins/esp-idf 4.2.4/lvgl 7/ RPI MPI3501 3.5”

What do you want to achieve?

I’m struggling to use the display MPI3501(has XPT2046) with ESP32, esp-idf lvgl 7.

What have you tried so far?

I tested with Bodmer TFT_eSPI library on Arduino IDE, and everything works.
Then I start using ESP-IDF
I tested with an example from maker fans (Sunton 2.8 but I edit for a 3.5”)with the proper drivers from the lvgl_esp32_drivers.

At first it worked, the display shows everything but the touch didn’t work, but I soon noticed that on the xpt2046.h the pins assignments were incorrect for my pin configuration. I change it to be the same than display SPI, and the problem started. The touch works because I can see the x y values on the monitor but the display do not shows nothing (sometimes garbage).

I’m using the same SPI Bus, both Half duplex. The display is RPI TOUCHSCREEN 3.5” MPI3501, with xpt2046 controller, using Ili9486, 20MHZ for SPI and 2.5Mhz.

I opted for the lvgl cause I want to build an interface with multiple tabs

Does anyone has an ideia of the cause of the problem?
And how to solve ?
Thanks In advance

Hi!
Sorry me please, but i whant to ask you some questions. Can i do it? If yes:

  1. Can you get me some examples? I can not found driver for Waveshare TFT Touch 4’ (ILI9486 and xpt2046) for ESP-IDF. For arduino it is TFT_eSPI. But what driver i must have for ESP-IDF?