0

I am using a XIAO ESP32 Seeeduino with an ILI9341 TFT display that is working great. The touch screen is also working well.

The problem is that I have to disconnect the MISO connection every time I power on the ESP32. When I power on the ESP32 the display is blank, but when I disconnect MISO and power back on the ESP32 I do get the image. Then I connect back MISO and it works as it should (the touch doesn't work leaving MISO disconnected). I don't know if it is a hardware or software issue.

Pin cinnections:

VCC -> 5 V
GND -> GND
CS  -> GPIO3
RST -> GPIO4
DC  -> GPIO5
MOSI -> GPIO10
SCK -> GPIO8
LED -> 5 V
MISO -> GPIO9
T_CLK -> TFT_SCK
T_CS -> GPIO21
T_DIN -> TFT_MOSI
T_DO -> TFT_MISO

Arduino setup:

#include <Adafruit_ILI9341.h>
#include <XPT2046_Touchscreen.h>

#include <SPI.h>

#define CS_PIN 21
#define TFT_CS 3      // TFT CS  pin is connected to esp pin 3
#define TFT_RST 4     // TFT RST pin is connected to esp pin 4
#define TFT_DC 5      // TFT DC pin is connected to esp pin 5
#define TFT_MISO 9

XPT2046_Touchscreen ts(CS_PIN);

Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC, TFT_RST);
ocrdu
  • 8,705
  • 21
  • 30
  • 42
  • you could try to connect your MISO via a 10k Ohm (Or something like that) to GND. Could fix potential signal issues during setup. Also make sure to "manually" toggle the RESET pin in your setup before the Librarys are initialized. This removes any "power on and signal issues" from your device. – ElectronicsStudent Mar 22 '23 at 16:38

3 Answers3

0

It reads in the ESP32 documentation.

GPIO9 defines if the ESP32 should boot from internal memory or from external SPI memory.

It can't be left at any arbitrary state during boot, it needs to be left alone so or be extenally set at the required level to boot properly from where you want.

There are also other strap pins, so do familiarize with documentation that is relevant to your specific ESP32 model.

Justme
  • 127,425
  • 3
  • 97
  • 261
0

I connected a 7.3 kΩ resistor from the ESP to the TFT MISO and it worked well. I tested it for a couple of days and it worked normally.

I noticed that adding a higher resistance value also worked, but slowed the touch functionality or made it not work, and adding a smaller resistor would still leave the screen blank.

ocrdu
  • 8,705
  • 21
  • 30
  • 42
0

I'm experiencing the same thing. I figured out the power up issue with a CD4066 analog switch with the enable tied to the TFT reset signal. Powers up and isolates the MISO line long enough for the XIAO to boot.

J M
  • 1