Skip to content

Add original LilyGO T5 E-Paper S3 Pro (H752) board support#16

Closed
jrdntnnr wants to merge 1 commit into
clackups:mainfrom
jrdntnnr:h752-device
Closed

Add original LilyGO T5 E-Paper S3 Pro (H752) board support#16
jrdntnnr wants to merge 1 commit into
clackups:mainfrom
jrdntnnr:h752-device

Conversation

@jrdntnnr

Copy link
Copy Markdown
Contributor

What this adds

Support for the original LilyGO T5 E-Paper S3 Pro — the H752 / v1.0-240810 revision (4.7" ED047TC1, 960×540). This pre-"H752-01" board has no PCA9535/TPS65185, so it can't use epdiy's epd_board_v7 path and instead drives the panel with the vendored FastEPD library. Everything is behind a new model + display-backend Kconfig (DRAFTLING_MODEL_LILYGO_T5_EPD_S3_PRO_H752 / DRAFTLING_DISPLAY_H752_EPD), selected only by sdkconfig.h752 — existing boards are unaffected. Hardware-verified on the board (ink, partial refresh, touch, side-key menu, power-off).

  • FastEPD display backend (components/fastepd vendored + display_h752.cpp): full 960×540 1-bit plane, partialUpdate for flicker-free local refresh on typing/deletes, full refresh on demand / every N partials. Includes a fix for a FastEPD bbepPartialUpdate DMA ping-pong bug (clear both neutral row halves) that otherwise leaves full-height vertical streaks under edited text.
  • Touch — GT911 calibrated for this panel (reports 540×960 portrait; swap_xy + mirror_x). Front capacitive touch-key wired via a new touchscreen button-callback to act as Back/Esc. Cleanly coexists with Investigating Off button response issue #11's GT911 address-drift recovery.
  • Power/keys — GPIO48 side key = Menu (injects F1). GPIO48 isn't an RTC IO on the ESP32-S3, so standby uses light-sleep + gpio_wakeup + esp_restart instead of EXT0 deep sleep.
  • Backlight — H752 added to the ≤5% extra-dim front-light option.

Build-verified on ESP-IDF 6.1 with sdkconfig.h752 (FastEPD, unlike epdiy, builds on IDF 6.x). Rebased onto current main; the only conflicts were trivial "keep both" against #11's GT911/wake changes. Split out of #14 per maintainer request.

Known issue (separate, does not block display/input)

A BLE HID esp_hidh_dev_open watchdog → LoadProhibited crash after a connect timeout exists on this board path; tracked separately. #13's conn-param fix may help and is independent of this diff.

Adds the pre-"H752-01" revision of the LilyGO T5 E-Paper S3 Pro
(v1.0-240810, 4.7" ED047TC1, 960x540). It has no PCA9535/TPS65185, so
it can't use epdiy's epd_board_v7 path and instead drives the panel
with the vendored FastEPD library. All of it is behind a new model +
display-backend Kconfig (DRAFTLING_MODEL_LILYGO_T5_EPD_S3_PRO_H752 /
DRAFTLING_DISPLAY_H752_EPD), selected only by sdkconfig.h752, so the
existing boards are unaffected. Hardware-verified on the board.

- FastEPD display backend (components/fastepd vendored + display_h752.cpp):
  full 960x540 1-bit plane, partialUpdate for flicker-free local
  refresh on typing/deletes, full refresh on demand / every N partials.
  Includes a fix for a FastEPD bbepPartialUpdate DMA ping-pong bug
  (clear BOTH neutral row halves) that otherwise leaves full-height
  vertical streaks under edited text.
- Touch: GT911 calibrated for this panel (reports 540x960 portrait;
  swap_xy + mirror_x). Front capacitive touch-key wired via a new
  touchscreen button callback to act as Back/Esc. Coexists with the
  existing GT911 address-drift recovery.
- Power/keys: GPIO48 side key = Menu (injects F1). GPIO48 is not an
  RTC IO on the ESP32-S3, so standby uses light-sleep + gpio_wakeup +
  esp_restart instead of EXT0 deep sleep.
- Backlight: H752 added to the <=5% extra-dim front-light option.
- Battery indicator: on H752 only, drop the periodic 5 s battery-label
  timer (each rewrite drove a FastEPD refresh -> visible ghosting) in
  favour of a pull model that refreshes the label at natural redraw
  points and only when the value changed. Gated on the H752 model;
  every other board keeps the original timer unchanged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@clackups

Copy link
Copy Markdown
Owner

the two files sdkconfig.defaults.h752 and sdkconfig.h752 don't look necessary, as menuconfig does the job in selecting the board parameters. Can we delete these?

@clackups

Copy link
Copy Markdown
Owner

Also, README does not mention the H752 model

@clackups

Copy link
Copy Markdown
Owner

when compiloing for non-H752 Lilygo, this function should not be declared:

main/main.cpp:649:13: warning: 'void pre_sleep_h752_deinit()' defined but not used

@clackups

Copy link
Copy Markdown
Owner

Was it necessary to add FastEPD? Can't it be done with the existing EPDIY driver?

@clackups

Copy link
Copy Markdown
Owner

superceeded by #18

@clackups clackups closed this Jun 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants