Skip to content

docs(flexio-rx): document iMXRT FlexIO architectural mismatch (#3066 iter 9) - #3214

Merged
zackees merged 2 commits into
masterfrom
docs/3066-flexio-rx-root-cause-iter9
Jun 18, 2026
Merged

zackees merged 2 commits into
masterfrom
docs/3066-flexio-rx-root-cause-iter9

Conversation

@zackees

@zackees zackees commented Jun 18, 2026 •

Copy link
Copy Markdown
Member

Summary

Adds a top-of-file warning block to src/platforms/arm/teensy/teensy4_common/rx_flexio_channel.cpp.hpp that captures the root-cause finding from #3066 iter 9:

Why a doc-only PR

The loop ledger explicitly paused this driver at the 5-PR cap pending bench-scope debug or a structural pivot. Iter 9 (research-only, no code) cross-checked against NXP AN12174 / AN5275, the FTF-ACC-F1179 Introduction to FlexIO deck, and the NXP Community threads, and concluded the path forward is FlexPWM RX (Phase 4 of #3066) instead — FlexPWM has dedicated SMx_CAPTCTRL input-capture silicon that FlexIO lacks.

Without this header, the next iteration (human or agent) will likely re-tread the same single-timer SMOD=1 path the prior five PRs already exhausted.

Changes

  • src/platforms/arm/teensy/teensy4_common/rx_flexio_channel.cpp.hpp — 40 lines of new doc-block; preserves the original design-intent comment for historical context. No code change.

Test plan

  • bash compile teensy40 --examples AutoResearch succeeds (1m55s).
  • Bench validation N/A — pure comment change.

Related

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Expanded Teensy 4 platform documentation to clearly describe an architectural limitation affecting FlexIO RX shifter-based captures, including the root cause, observed symptoms, and recommended migration to the FlexPWM RX backend. The update also preserves historical design context and adds a recent cross-check note to support ongoing maintenance and future development.

…iter 9)

Adds a top-of-file warning block to rx_flexio_channel.cpp.hpp capturing the
iter-9 root-cause finding from #3066: iMXRT FlexIO shifters cannot snapshot a
peer timer's count into SHIFTBUF, and SMOD=1+TIMOD=3 collides shift-and-store
on the same compare event per NXP's own documentation ('shift registers
cannot shift and store on the same clock, so input data may be lost').

This explains the all-zero captures that PRs #3067/#3068/#3069/#3070/#3071
chased without success and the loop's pause at the 5-PR cap. Future readers
should know not to twist more knobs on this file — the path forward is
FlexPWM RX (Phase 4 of #3066), which has dedicated SMx_CAPTCTRL input-capture
silicon.

Pure comment change. Verified compiles via 'bash compile teensy40 --examples
AutoResearch'. References issue comment #3066/4740201201 for the full
register-by-register NXP cross-check.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@coderabbitai

coderabbitai Bot commented Jun 18, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: dd5e313b-ed57-4cff-9eca-e06bd11c47bf

📥 Commits

Reviewing files that changed from the base of the PR and between 4c62711 and 2f83e1d.

📒 Files selected for processing (1)
  • src/platforms/arm/teensy/teensy4_common/rx_flexio_channel.cpp.hpp
✅ Files skipped from review due to trivial changes (1)
  • src/platforms/arm/teensy/teensy4_common/rx_flexio_channel.cpp.hpp

📝 Walkthrough

Walkthrough

A 40-line comment block is prepended to rx_flexio_channel.cpp.hpp marking the Teensy 4 FlexIO shifter-based RX implementation as architecturally blocked due to the iMXRT1062 FlexIO SMOD/SHIFTBUF mismatch that causes all-zero captures. It recommends using the FlexPWM RX backend and preserves the original Phase 1B design history.

Changes

FlexIO RX Architectural Blocker Documentation

Layer / File(s) Summary
Top-of-file architectural status comment
src/platforms/arm/teensy/teensy4_common/rx_flexio_channel.cpp.hpp
Inserts a header comment documenting that the FlexIO shifter-based RX path is architecturally blocked on iMXRT1062 due to SMOD/SHIFTBUF mismatch causing all-zero captures, recommends switching to FlexPWM RX, and preserves the Phase 1B original design intent along with an Iter-9 (2026-06-18) cross-check note. No functional code is modified.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐇 A shifter once dreamed it could read every hue,
But SMOD and SHIFTBUF said, "Nope, we won't do!"
So a comment was written, a warning inscribed:
"Take the FlexPWM path — the good one described."
The code stands still, but the lesson is clear,
In hardware blockers, we have nothing to fear! 🎉

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: adding documentation about the iMXRT FlexIO architectural mismatch to the rx_flexio_channel file, with reference to issue #3066 iteration 9.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/3066-flexio-rx-root-cause-iter9

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/platforms/arm/teensy/teensy4_common/rx_flexio_channel.cpp.hpp`:
- Line 5: The comment on line 5 containing the status indicator uses an emoji
character (⚠️) which violates C++ coding guidelines that require text-based
prefixes instead of emoticons or emoji characters. Replace the emoji character
at the beginning of the comment with a text-based alternative such as
`[WARNING]`, `[STATUS]`, or `WARNING:` while preserving the rest of the comment
text "STATUS: ARCHITECTURALLY BLOCKED — DO NOT TWIST KNOBS HERE (`#3066` iter 9)".
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 8d72e3c2-34c1-4746-ad7c-90d38686a052

📥 Commits

Reviewing files that changed from the base of the PR and between 9684ad8 and 4c62711.

📒 Files selected for processing (1)
  • src/platforms/arm/teensy/teensy4_common/rx_flexio_channel.cpp.hpp

Replace the warning-triangle emoji with a 'WARNING:' text prefix per
the FastLED C++ guideline against emoji in source files.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant