fix(Inkplate6COLOR): yield during EPD busy-wait loops#305
Merged
JosipKuci merged 2 commits intoMay 21, 2026
Merged
Conversation
The display() and clean() routines busy-wait on EPAPER_BUSY_PIN with empty loop bodies. Each panel refresh takes 15-30 seconds, during which the calling task monopolises its CPU core. On FreeRTOS multitasking apps this starves IDLE0, the ESP-IDF task watchdog (default 5 s) fires, and the device panic-resets. Single-task Arduino sketches — the pattern used by the library's own examples — are unaffected because arduino-esp32 auto-feeds the loopTask watchdog after each loop() iteration. Add delay(1) to each busy-wait loop so the scheduler can run IDLE and other tasks between polls. Loss of polling resolution is negligible (~1 ms on a 20 s operation, well below normal hardware response variance). This brings Inkplate6COLOR in line with the existing — and correct — pattern already used by Inkplate13SPECTRA's waitForBusy() at src/boards/Inkplate13SPECTRA/Inkplate13SPECTRADriver.cpp:735, which has been doing the right thing all along.
I think the usage of the delay function is understandable in this scenario, no need to justify it.
JosipKuci
approved these changes
May 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The display() and clean() routines busy-wait on EPAPER_BUSY_PIN with empty loop bodies. Each panel refresh takes 15-30 seconds, during which the calling task monopolises its CPU core. On FreeRTOS multitasking apps this starves IDLE0, the ESP-IDF task watchdog (default 5 s) fires, and the device panic-resets.
Single-task Arduino sketches — the pattern used by the library's own examples — are unaffected because arduino-esp32 auto-feeds the loopTask watchdog after each loop() iteration.
Add delay(1) to each busy-wait loop so the scheduler can run IDLE and other tasks between polls. Loss of polling resolution is negligible (~1 ms on a 20 s operation, well below normal hardware response variance).
This brings Inkplate6COLOR in line with the existing (and correct) pattern already used by Inkplate13SPECTRA's waitForBusy() at src/boards/Inkplate13SPECTRA/Inkplate13SPECTRADriver.cpp:735