Skip to content

ED2208: end the BUSY wait at the first high - #357

Merged
lovyan03 merged 1 commit into
m5stack:developfrom
ainyan03:ed2208_busy_wait
Oct 15, 2026
Merged

lovyan03 merged 1 commit into
m5stack:developfrom
ainyan03:ed2208_busy_wait

Conversation

@ainyan03

Copy link
Copy Markdown
Contributor

Panel_ED2208::_wait_busy() treated BUSY as released only after it stayed high for 200 ms, assuming a short high between the steps of the AUTO sequence; right after a refresh started it required the 200 ms even when BUSY was already high. The wait now ends at the first high (displayBusy() turns false), which also covers boards without a BUSY pin.

Measurements (PaperColor, room temperature)

BUSY and CS edges were recorded with GPIO interrupts (µs timestamps):

  • BUSY goes low while the last byte of AUTO is being received (4-5 µs before CS rises) and stays low for the whole sequence, with no short high, for black/white, 6-color and dithered images (14.7 s each).
  • First refresh after power-on, alternating the old and new code 5 times each from a cold start: all refreshes started and completed, no brownout resets.
  • Without a reset pin (AUTO 0xA5), three consecutive refreshes with the next one sent within about 1 ms of BUSY going high: all accepted and completed, each image confirmed visually.
  • display() takes about 1.12 s instead of 1.33 s (the 200 ms is no longer added to the wait for the previous refresh).

Testing

  • Local build matrix of the versions used by this repository's CI: all passed. CI on the fork: passed.

_wait_busy() treated BUSY as released only after it stayed high for
200 ms, assuming a short high between the steps of the AUTO sequence,
and right after a refresh started it required the 200 ms even when BUSY
was already high. Recording BUSY and CS edges with GPIO interrupts on a
PaperColor showed BUSY goes low while the last byte of AUTO is being
received and stays low for the whole sequence (POWER_ON, DISPLAY_REFRESH,
POWER_OFF) with no short high, also on the first refresh after power-on
and with 6-color and dithered images. The confirmation only delayed
every wait by 200 ms (display() took about 1.33 s instead of 1.12 s).

The wait now ends when displayBusy() turns false, which also covers
boards without a BUSY pin. Without a reset pin the next refresh is
started within about 1 ms of BUSY going high; three consecutive
refreshes completed that way.
@lovyan03
lovyan03 merged commit d4cf6cb into m5stack:develop Oct 15, 2026
25 checks passed
@ainyan03
ainyan03 deleted the ed2208_busy_wait branch October 15, 2026 09:51
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