ESP32 strange issue with using SPI device

gparvind
Posts: 2
Joined: Mon Jul 27, 2020 7:48 am

ESP32 strange issue with using SPI device

Postby gparvind » Wed Jul 29, 2020 2:24 am

I am using ESP-WROOM-32 on a breakout board and not any development board https://image.made-in-china.com/202f0j0 ... Module.jpg.

I connected it to ILI9341 SPI device (TFT display) as slave on VSPI pins. When I power it up, the screen is always white even on multiple resets. At random, some movement happens on screen but then back to white screen.
However, when I connect the serial cable from ESP32 to my PC, on reset, the SPI device works fine. What's strange is, it works with even a single wire (say GND) connected to the USB cable.

I am guessing this is to do with SPI noise or power issues but not sure. I am using 3.3v regulated output from separate power sources for both ESP32 and the SPI slave device and not using power from USB. I also tried reducing the SPI frequency but it's the same behavior.
I have tested the behavior with Adafruit_ILI9341 and TFT_eSPI both libraries.
Same SPI device works fine with Arduino Due.

Any suggestions on what could be wrong?

Paul-K.
Posts: 3
Joined: Tue Jul 28, 2020 8:31 am

Re: ESP32 strange issue with using SPI device

Postby Paul-K. » Wed Jul 29, 2020 7:55 am

can you post your code and a wiring diagram?

lbernstone
Posts: 120
Joined: Mon Jul 22, 2019 3:20 pm

Re: ESP32 strange issue with using SPI device

Postby lbernstone » Wed Jul 29, 2020 3:37 pm

You say your esp and spi have separate power sources. They must have common grounds. Honestly, having multiple 3v3 domains in a project like this is just asking for a small fire.

gparvind
Posts: 2
Joined: Mon Jul 27, 2020 7:48 am

Re: ESP32 strange issue with using SPI device

Postby gparvind » Sat Sep 19, 2020 12:18 pm

lbernstone wrote:
Wed Jul 29, 2020 3:37 pm
You say your esp and spi have separate power sources. They must have common grounds. Honestly, having multiple 3v3 domains in a project like this is just asking for a small fire.
Thanks. Yes I do have common grounds.
Ok it turned out to be faulty connection. Changed the wires and it works fine now. SD, display and touch from the touch screen module share the SPI bus (MOSI, MISO and SCLK) on ESP32 (VSPI) and CS pins are separate. SD, display and touch all functions are working.
I can share the connection diagram if anyone is interested.

Who is online

Users browsing this forum: No registered users and 25 guests