Xinyuan-LilyGO / TTGO-T-Display

MIT License
1.02k stars 335 forks source link

Display backlight turns off when powered from LiPo battery #103

Closed bgarnott closed 1 year ago

bgarnott commented 1 year ago

Hi,

I am having an issue with my Lilygo T Display s3 when running on battery. Here is a summary:

  1. I can render content to the display when I am powering the T display S3 over USB.
  2. I have connected a LiPo battery to the JST connector and the battery charges (as indicated by the orange charge LED) fine.
  3. When I have the battery connected and USB connected and I remove the USB connection, the backlight to the display turns off. The display still renders correctly, but I need to shine a light at the display to see what it is displaying.
  4. If I reconnect the board to USB, the backlight turns back on and I can again see content on the display.

I have tried adding a ledcWrite(0, 255); call in my main loop to ensure that the backlight pin is being set repeatedly, but this does not help.

Any thoughts what is happening? Is the T Display going into a low power state when running on the battery?

I am using TFT_eSPI to drive the display.

Any help would be greatly appreciated.

Thanks, Brian.

bgarnott commented 1 year ago

Hi All,

I have found a solution to this problem: The PWR_EN pin (GPIO_15) needs to be set high to enable the backlight when running on battery. Adding the following lines to my initiatlization function fixed things:

pinMode(15, OUTPUT); digitalWrite(15, HIGH);

Hope this helps out some others.

Brian.