Skip to content

Fixed display corruption in smoothUpdate on M5Paper S3#26

Open
mikaryyn wants to merge 1 commit intobitbank2:mainfrom
mikaryyn:smooth-update-fix
Open

Fixed display corruption in smoothUpdate on M5Paper S3#26
mikaryyn wants to merge 1 commit intobitbank2:mainfrom
mikaryyn:smooth-update-fix

Conversation

@mikaryyn
Copy link

@mikaryyn mikaryyn commented Feb 25, 2026

Using smoothUpdate on M5Paper S3 causes display corruption. It is easy to see in the photos I have attached; first is before the fix and second is after. The changes are very small, but I cannot say if this will work also on other panels.

Line 1759 is simple, there is an error in the comparison. Other two changes are a bit more difficult for me to explain. It changes ordering between DMA transfers and row-advance (ROW_STEP). Apparently the old ordering could interfere with the previous DMA transfer which is still ongoing and corrupt the display. First change is for the 1bpp path and second is for the 4bpp.

smoothUpdate-broken
smoothUpdate-working

@mikaryyn
Copy link
Author

I used this simple test program:

extern "C" void app_main(void)
{
    epd.initPanel(BB_PANEL_M5PAPERS3);
    epd.setMode(BB_MODE_4BPP);
    epd.clearWhite();
    epd.fillScreen(epd.getMode() == BB_MODE_4BPP ? 0xF : (epd.getMode() == BB_MODE_2BPP ? 3 : BBEP_WHITE));
    epd.drawLine(0, 0, epd.width() - 1, epd.height() - 1, BBEP_BLACK);
    epd.drawLine(epd.width() - 1, 0, 0, epd.height() - 1, BBEP_BLACK);
    epd.smoothUpdate(true, BBEP_WHITE);
    while (true) { vTaskDelay(pdMS_TO_TICKS(1000)); }
}

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.

1 participant