TFT Display on during ESP32 deep sleep?

expressive
Posts: 3
Joined: Fri Feb 15, 2019 3:16 pm

TFT Display on during ESP32 deep sleep?

Postby expressive » Fri Feb 15, 2019 3:25 pm

I am using M5Stack where a TFT display is connected to ESP32 via SPI interface. Currently, going into deep sleep (esp_deep_sleep_start()) or even light sleep (esp_light_sleep_start()) powers off the display. I was wondering how we can get the ESP to go in deep sleep without powering off the LCD.

Say I want to display something and then keep it on for a minute, during which I don't need any CPU/WiFi/BT/etc. functionality, so those can be powered down. After a minute the CPU should boot the sketch again as if it was rebooted/awaken.

This behavior was possible with the ESP8266 and I believe it should be possible with the ESP32, but why does my display switch off if I only want to make the ESP sleep?

boarchuz
Posts: 559
Joined: Tue Aug 21, 2018 5:28 am

Re: TFT Display on during ESP32 deep sleep?

Postby boarchuz » Tue Feb 19, 2019 4:02 am

I'm guessing the LCD reset and/or backlight pins are your issue. They probably need to be held high in sleep. Fortunately they're both rtc_gpios so this is fairly easy - 32 & 33 according to the schematic I pulled up.

I'm away from my PC now but the function is something like rtc_hold_en(pin); Do that before sleep for whichever pins need to maintain their state in sleep.

You might need to rtc_hold_dis(pin) on wakeup.

expressive
Posts: 3
Joined: Fri Feb 15, 2019 3:16 pm

Re: TFT Display on during ESP32 deep sleep?

Postby expressive » Tue Feb 19, 2019 2:15 pm

Hey boarchuz, thanks a lot for the tip! At a first glance that might actually work!

BTW, do you mean rtc_gpio_set_level(pin, 1)?

Also, could you point me to the schematic you pulled up?

boarchuz
Posts: 559
Joined: Tue Aug 21, 2018 5:28 am

Re: TFT Display on during ESP32 deep sleep?

Postby boarchuz » Wed Feb 20, 2019 1:21 am

I wouldn't bother with that one. Given that it's already in the state you want it to be in, you could probably just hold the pins at their current level, rather than specifically setting them.

Here are the two:

rtc_gpio_hold_en https://docs.espressif.com/projects/esp ... gpio_num_t
rtc_gpio_hold_dis https://docs.espressif.com/projects/esp ... gpio_num_t

Who is online

Users browsing this forum: No registered users and 64 guests