So I have a TFT display with ILI9488 to display JPEG images in a slideshow. The images are loaded into the display via its built-in SD card module.
I've been getting the infamous white screen of death on my display but finally things are working fine for a couple of days. Until yesterday, I needed to disconnect the wires from my display and reconnect them back. Voila! The white grim reaper returns.
I've been troubleshooting by changing my wires (female headers on both ends) and nothing works. I tested each wire to ensure connectivity, and they are all fine.
Until finally it worked again. But then it just stopped working by itself without me touching it. I mean one image would appear and when second image is loading, the white screen emerges. Also, now I'm seeing small black dots on the images. Did not appear when it was working then.
Does this sound like a SPI issue or cable issue? Or something else? I'm still new to this btw. I don't have pull-up resistors on each connection between display and ESP32 GPIOs. The display is powered by 5V and display's RESET pin is hardwired to 3.3V.
is anything else powered by the ESP32? e.g. sensors, relays, etc
give links to the specific TFT display and SD card reader?
is the SD reader onboard the TFT display or separate?
if separate how do you power it?
which graphics library are you using?
I would second the suggestions by @vvb333007 - I tend to use VSPI for the display and HSPI for SD reader
also try lowering the TFT SPI clock rate?
if you are using high SPI clock rates just moving or touching wires can cause intermittent problems - one reason why after prototyping industrial applications move to PCBs
And I've soldered everything on perfboard so I can't separate to VSPI and HSPI at the moment.
I lowered clock to 400kHz and still no joy. The behavior is exactly the same like 1MHz or 4MHz. I even tried setting SD_CS LOW and HIGH before and after reading the JPG file.
The funny thing is that now I'm using the exactly same code, same images, same clock frequency, same wires and same hardware when it was working before I disconnected the cables from the display. So, can I assume the wires are the culprits?
So, I tried what you said - 400KHz and use HSPI for the display and VSPI for your SD card but the issue persists. It's more erratic now. Meaning it works at times and doesn't. Sometimes a bit of wiggling of the wires would bring up the white screen, sometimes it doesn't. I even tried sandpapering the male headers on the TFT.
I wonder if my 20cm cable is too long for this kinda job? I tried 10cm and got same error.
Given the length of you wires, can you please use GPIO#21 (or alike) instead of GPIO#5? It all looks as SPI conflict to me. Lets exclude CS wires from that by making them short and place away from each other.
20cm wires can make problems. Try to make shorter wires from MCU to TFT.
I found the culprit - a few bad solder joints. Apparently, they did buzz but just didn't buzz too well. After resoldering, the problem went away. Thanks to all who helped to troubleshoot.