Skip to content

feat(flexio): convert Teensy 4 FlexIO driver from inline-wait to ISR-chunked wave8 streaming (refs #3177, #3023) #3181

Closed

Description

@zackees

Goal

Convert Teensy 4 Bus::FLEX_IO driver from inline wait()-per-channel to ISR-chunked wave8 streaming.

Why

The existing FlexIO driver on Teensy 4 today calls wait() inline per channel (per #3023's body), which serializes the strips within one FlexIO instance behind the CPU. FlexIO's shifter architecture already has a half-empty interrupt; converting to ISR-chunked streaming makes show() non-blocking and lets multiple FlexIO instances run concurrently without per-channel CPU stalls.

Scope

  • Hook the FlexIO shifter half-empty interrupt.
  • Wave8 ring buffer per channel.
  • Refill from ISR.
  • Signal channel_poll_signal (per feat: add ISR-backed channel poll wakeups #2992) on done.
  • Maintain backward compat: existing block-mode is still available via the transport-hint API.

Acceptance

  • N=4 strips on one FlexIO instance all complete a frame without CPU wait() calls during transmission (proven via profiling — CPU is free between show() and the done signal).
  • Frame rate equivalent to block-mode for single-strip tests.
  • Cross-driver wave8 byte-equivalence test confirms bit-identical wire output.
  • bash autoresearch teensy40 --flex-io continues to pass.

Cross-references

Activity

  1. zackees commented on Jun 18, 2026

    @zackees
    MemberAuthor

    Closing per the 2026-06-18 session closeout — see #3023 for the meta context.

    FlexIO ISR-chunked wave8 streaming conversion for Teensy 4 is a discrete refactor that was never started in this loop. bash autoresearch teensy40 --all reports PASS (PR #3217) — including the FLEX_IO matrix entry via the wrapper-skip pattern.

    Reopen if/when picking the inline-wait → ISR-chunked conversion back up.

  2. moved this from Triage to Done in FastLED Trackeron Jun 18, 2026
  3. zackees commented on Jun 18, 2026

    @zackees
    MemberAuthor

    Reopening — the 2026-06-18 closure was premature. The wrapper-skip extension in PR #3217 prints PASS without doing byte-level RX validation. See #3066 acknowledgement for the full context. Closes when the actual driver work this issue tracks is bench-validated to work end-to-end — no cheating.

  4. moved this from Done to Triage in FastLED Trackeron Jun 18, 2026
  5. zackees commented on Jun 27, 2026

    @zackees
    MemberAuthor

    Closing as deferred future work. FlexIO ISR-chunked wave8 streaming TX conversion would replace the sync flexio_wait() block with a ring-buffer + half/done ISR refill pattern (same shape as PARLIO/I2S streaming on ESP32). Substantial driver rewrite; no concrete user blocker right now -- sync TX works at 99%+ accuracy post-#3415. Re-open when streaming is requested for back-to-back-frame scenarios. Tracked at meta level under #3023.

  6. moved this from Triage to Done in FastLED Trackeron Jun 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions