ESP32_WROOM_30 + Waveshare 4inch Touch Shield

Hello everyone,
I have a problem getting the ESP32 WROOM 30 to work with the Waveshare 4" TFT Touch Shield display ( ILI9486).
I suppose the set is not compatible :unamused:.
My display configuration is as follows:

Vin 5Vdc 
CS -> D15
DC -> D02
RST -> D04
MOSI -> D23
MISO -> D19
SCLK -> D18
TOUCH CS -> D21

I tested many sketches, without reach results.
Do you have anything to suggest to me?
Thank you, Roberto

I count eight 4" TFT displays on the Waveshare website (some can be excluded).
Post a link to your display and state the libraries you tried. Also link to processor board.
Else you might never get a useful answer.

Hi,
for the display, I am referring to the Waveshare 4inch Touch LCD Shield for Arduino SK 13587 (https://www.waveshare.com/product/displays/lcd-oled/lcd-oled-2/4inch-tft-touch-shield.htm).
I also used the manufacturer's recommended libraries for ILI9486 and particularly the recommended Waveshare demo (https://www.waveshare.com/wiki/File:4inch_TFT_Touch_Shield_Code_V2.0.7z).
I also (naively and unsuccessfully) tried to utilise the ST7735 and SEPS525 controllers.

Thank you, Roberto

I am too lazy to go search for that board. Does it have UNO type of headers?

I am also too lazy to check if the Waveshare code can be used with ESP32.

I would recommend to use TFT_eSPI with ESP32.
Note that (at first sight) the display has a SPI to parallel convert circuit (kludge), known as RPi version by TFT_eSPI.

Added: I just found my Waveshare 3.5" TFT display.
It looks the same. It also works with my ILI9486_SPI library.

I loaded the example 'HelloWord.ino' from your library ILI9486_SPI. I modified the CS, DC and RST addresses, as I have shown above.

The compilation runs without errors, the sketch is loaded but the display remains empty.

In addition, I see an infinite loop on the serial monitor, as follows:

E (123) spi_flash: Detected size(4096k) smaller than the size in the binary image header(16384k). Probe failed.

 assert failed: do_core_init startup.c:298 (flash_ret == ESP_OK)

 Backtrace:0x400833d1:0x3ffe3aa00x40087cfd:0x3ffe3ac0 0x4008ca49:0x3ffe3ae0 0x400dbb22:0x3ffe3c10 0x40082aed:0x3ffe3c40 0x400792ca:0x3ffe3c90 |<-CORRUPTED

Bye, Roberto

Did you put the back trace info into the ESP32 exception decoder?

At this point.

Help us help you.

Please follow the advice given in the link below when posting code, in particular the section entitled 'Posting code and common code problems'

Use code tags (the </> icon above the compose window) to make it easier to read and copy for examination

Use the IDE autoformat tool (ctrl-t or Tools, Auto format) before posting code in code tags.

Please include the entire error message. It is easy to do. There is a button (lower right of the IDE window) called "copy error message". Copy the error and paste into a post in code tags. Paraphrasing the error message leaves out important information.

Please post a schematic.

Please post an image of your project.

Please describe the problem better then you just did.

I tend to shy away from using GPIO_NUM_2 on the ESP32 as it drives the built in LED and under particular thingies can cause issue. Use GPIO_NUM_0 instead.

For CS pins on the ESP32 I tend to use GPIO_NUM_5 first and GPIO_NUM_15 second.

Sketch uses 262685 bytes (20%) of program storage space. Maximum is 1310720 bytes.
Global variables use 16856 bytes (5%) of dynamic memory, leaving 310824 bytes for local variables. Maximum is 327680 bytes.

Much less than the claimed 16MB in your image header. Did you try at least twice?

But I will keep silent until I know your processor board and the board you select for compilation.

This is my schematic:

and my display:

and my bredboard :

I use an ESP32-WROOM 30pin :


but I can't find GPIO_NUM_0.

How can I identify it?

Roberto

Yes, I have tried to compile it at least four times, but the result is always the same...

Roberto

I was not very convinced about how the system worked.

I masked 'Serial.begin(115200)', proceeded with a new compilation, but the serial monitor of the IDE continued to run...

I tried setting "Serial.begin(9600)" , with a new compilation, but apart from the unreadability, nothing changed.

I changed the processor to a new one... to no results.

The system kept giving me (in a continuous loop) the following message:

Citation:
ELF file SHA256: 000000000000
->
-> Rebooting...
-> ets Jul 29 2019 12:21:46
->
-> rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
-> configsip:0, SPIWP:0xee
-> clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
-> mode:DIO, clock div:1
-> load:0x3fff0030,len:1344
-> load:0x40078000,len:13864
-> load:0x40080400,len:3608
-> entry 0x400805f0
-> E (118) spi_flash: Detected size(4096k) smaller than the size in the binary image header(16384k). Probe failed.
->
-> assert failed: do_core_init startup.c:298 (flash_ret == ESP_OK)
->
->
-> Backtrace:0x400832f5:0x3ffe3aa00x400871ad:0x3ffe3ac0 0x4008bcbd:0x3ffe3ae0 0x400dab1a:0x3ffe3c10 0x40082a11:0x3ffe3c40 0x400792ca:0x3ffe3c90 |<-CORRUPTED

I too am in a loop :woozy_face:

Roberto

Ok, I assume you compile for ESP32 Dev Module. But I expected to get this information!

Ok, I try to be kind and inform you that you most likely have selected Flash Size 16MB, but your board has 4MB.

Yes, I have an ESP32 Dev Module.
Compiling the sketch with te Flash Size to 4Mb, the the endless loop of the serial disappears and I see the benchmark.
The TFT screen continues to remain blank.
Thank you, Roberto

https://www.waveshare.com/wiki/4inch_TFT_Touch_Shield:

  • If the Arduino board does not have an ICSP interface, set the SPI Config switches on the display module to SCLK\D13, MISO\D12, MOSI\D11 respectively.

https://www.waveshare.com/w/upload/1/17/4inch_TFT_Touch_Shield_Schematic.pdf

Most likely my last response.

I guess the maker of your ESP32 module did not include GPIO_NUM_0. Actually, they failed to include several other ESP32 pins.

If you disconnect 'everything' does the endless loop go away?

Yes, it disappears, especially if I use the Flash Size 4MB.
I will soon be modifying my prototype with an ESP32-WROOM-32 Pinout, to avoid all possible problems.
Thank you, Roberto

I have modified my prototype board with an ESP32-WROOM-DEVKIT-32 pin and connected it as shown in the attached diagram, but I still cannot get it to run....

I am running out of time and patience
After many attempts I have no more ideas... :anguished:

I tried everything the Web and GitHub showed for the combination of ESP32 and Waveshare 4 "TFT, without having any results. :anguished:

Thank you all those who came to help me and I'm going to change TFT ...

Thanks, Roberto

Did you check the setting of the SPI switches on your display board? See post #13.

Yes, sir.
I tried every possible combination of the TFT board.
Unfortunately to no effect...
Thank you, Roberto

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