Skip to content

Question: expected setup for LilyGo T5 S3 EPD path #2

Description

@chenshaolang

Hi,

I have been testing FreeInk on the LilyGo T5 S3 4.7" e-paper board.

The board uses an ED047TC1-style raw parallel EPD panel. I tried to use the existing LilyGo / LovyanGFX EPD path, and the firmware built successfully, but the screen stayed blank on my device.

To make sure it was not a hardware or PlatformIO problem, I compared it with two known-working LilyGo/M5GFX based projects. I also made a small smoke test in the same PlatformIO project using M5.begin() and M5.Display.display(). That smoke test displayed correctly.

My current test result is:

  • The hardware seems OK.
  • The M5GFX / M5Unified path works on this board.
  • My current FreeInk LilyGo setup builds, but the screen stays blank with the direct LovyanGFX EPD path.

I also saw that touch did not report events through my initial FreeInk InputManager setup, but touch worked when I used M5.Touch.getDetail() after M5.begin().

While testing the UI, I found one font rendering issue too: the bitmap font data appears to be bit-packed continuously per glyph, not row-byte-padded. Reading it as row-padded caused glyphs to look corrupted. Changing the glyph decoder to use a continuous bit offset fixed the rendering on my test project.

As an experiment, I added a LilyGo backend that reuses the M5Unified/M5GFX initialization path.

The experimental backend does roughly this:

  1. Powers up the LilyGo EPD rails through the PCA9555 expander.
  2. Calls M5.begin().
  3. Uses M5.Display as the underlying display backend.
  4. Exposes the panel as 540x960 portrait coordinates, matching the M5Unified touch/display orientation.
  5. Converts FreeInk's 1bpp framebuffer into an RGB565 scanline buffer and sends it with pushImage().

The first version used drawPixel() for every pixel, which worked but was slow:

540 x 960 = 518,400 drawPixel() calls
blit time: about 990-1070 ms

After changing it to a scanline buffer + pushImage(), the same full-screen update became much faster:

blit time: about 203-204 ms

Example log from the working version:

[main] Swipe detected (dx=-166) - switching page
[main] Rendering Overview page
[main] displayBuffer(FAST_REFRESH)
[M5LilyGoDriver] display() FAST turnOff=0

Since the LilyGo target is commented out in platformio.sample.ini, I may have missed the expected setup or some required board-specific configuration.

Could you please check whether I am using the LilyGo T5 S3 target correctly?

I also made an experimental branch that uses the M5Unified/M5GFX initialization path, because that is the path I could verify on my hardware:

https://github.com/chenshaolang/freeink-sdk/tree/lilygo-m5-backend

This branch is mainly for reference and debugging. I would appreciate any guidance on whether the direct LovyanGFX path should already work, or whether additional LilyGo-specific setup is still needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions