SPI to drive TFT LCD not working - bootloader problem?

techwelf
Posts: 2
Joined: Mon Jun 01, 2020 9:41 pm

SPI to drive TFT LCD not working - bootloader problem?

Postby techwelf » Mon Jun 01, 2020 9:49 pm

Hi:

I appreciate any help for this problem. I have an ESP32-SOLO DevKitC V4, with a TFT LCD Module (ST7735) connected by SPI to the pins:
CS - GPIO17
RST - GPIO2
A0/DC - GPIO0
CLK - GPIO27
MOSI/SDA - GPIO4

Operating perfectly well.

In my customized PCB board, I am using the same chip (ESP-SOLO) with the same TFT display of the module (only the display welded directly on the PCB), with the same pins to connect the ESP32 to the TFT and, the same test program, deployed into both ESP32 from the same Arduino IDE. But, besides the backlight, nothing else happens in the TFT.

Connecting the TFT display of the PCB board to the ESP32-SOLO Devkit (using the same pins), it is possible to see that the TFT is working.

But using the ESP32 of the PCB board to drive the TFT Module, this one does not work.

The pins used to connect the ESP32 to the TFT on the PCB board were also individually tested with the blink program and all were working perfectly.

I also have done lots of connectivity and short circuit tests and everything is apparently normal.

The board has other components, like an external RTC, several buttons and LEDS, all of them working perfectly.

I am not sure if is relevant, but i am using the ESP32 Devkit to upload the firmware to the ESP32 of the PCB board.

I think that the problem is someway related with the frequency used to drive the TFT - unfortunately i have not an oscilloscope with me to test it. But the program is the same, inclusively i am using the same compiled code. The unique thing i remember that might be different is the bootloader ... Is it possible that the problem is on some parameter of the bootloader? How can i test it? Or am i missing something?

Thanks,

Paulo Matos


techwelf
Posts: 2
Joined: Mon Jun 01, 2020 9:41 pm

Re: SPI to drive TFT LCD not working - bootloader problem?

Postby techwelf » Tue Jun 02, 2020 1:43 pm

Dear Chegewara:

Thanks very much for your support.

After several days attempting to solve the problem, finally we got it. It is related with the GPIO0, that by some reason can not be used to control the A0/DC pin of the TFT.

As a GPIO pin, it works perfectly well (we tested it using the blink project), but by some not very clear reason, it can not be "directly" used to control this TFT pin.

One big difference among the PCB board and the ESP32 Devkit is certainly the physical solution used to load the firmware into the boards. On the PCB we are using this solution:

Image


So, we think that the problem with the GPIO0 results of this. What we do not know is if we can configure this pin to behave "normally".

One more thing, using other pins to control the A0/DC of the TFT works perfectly.

Thanks,

chegewara
Posts: 2364
Joined: Wed Jun 14, 2017 9:00 pm

Re: SPI to drive TFT LCD not working - bootloader problem?

Postby chegewara » Tue Jun 02, 2020 5:16 pm

Its simple, that TFT DC pin is pulling down pin0. You can switch pins or try to add weak pullup resistor.
I suspected rather GPIO2, but seeing 2 bootstrap pins it was good clue.

Who is online

Users browsing this forum: No registered users and 90 guests