Skip to content

fix(rp2350): expose independent PIO channels - #3841

Merged
zackees merged 1 commit into
masterfrom
fix/rp2350w-pio-channels
Aug 5, 2026
Merged

zackees merged 1 commit into
masterfrom
fix/rp2350w-pio-channels

Conversation

@zackees

@zackees zackees commented Aug 5, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Register each RP PIO block with concrete Channels driver names: PIO0, PIO1, and RP2350-only PIO2.
  • Expose RP2350 PIO2 through bus traits, priorities, introspection, and AutoResearch.
  • Retain Bus::FLEX_IO as the portable bus abstraction.

Why

All RP PIO engines previously reported FLEX_IO, so manager registration replaced PIO0 with PIO1. That made runtime-exclusive PIO selection impossible and left RP2350 PIO2 inaccessible.

Validation

  • Focused RP PIO C++ mock and manager test
  • Focused AutoResearch parser tests
  • Full lint
  • RP2350W AutoResearch firmware compile

Refs #3832

Summary by CodeRabbit

  • New Features

    • Added RP2350 support for a third FLEX_IO channel, identified as PIO2.
    • Added PIO2 support for clockless and SPI communication, diagnostics, device detection, and channel configuration.
    • Improved driver identification for PIO0, PIO1, and PIO2.
  • Bug Fixes

    • Prevented selecting PIO2 on targets that do not support it.
    • Updated channel priorities for multiple FLEX_IO instances.
  • Tests

    • Added coverage for PIO2 selection, validation, registration, naming, and diagnostics.

@zackees
zackees merged commit d478de7 into master Aug 5, 2026
15 of 17 checks passed
@zackees
zackees deleted the fix/rp2350w-pio-channels branch August 5, 2026 19:33
@coderabbitai

coderabbitai Bot commented Aug 5, 2026 •

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: d322759a-8ae4-4a7a-94a3-49cae57a684e

📥 Commits

Reviewing files that changed from the base of the PR and between a2a90bc and 98bf4df.

📒 Files selected for processing (15)
  • ci/autoresearch/args.py
  • ci/autoresearch/phases.py
  • ci/tests/test_autoresearch_phases.py
  • examples/AutoResearch/AutoResearchRemoteRunParallelTest.cpp
  • examples/AutoResearch/AutoResearchRemoteRunSingleTest.cpp
  • examples/AutoResearch/AutoResearchRemoteSystemMethods.cpp
  • examples/AutoResearch/AutoResearchTest.cpp
  • src/fl/channels/bus.h
  • src/fl/channels/bus_info.h
  • src/fl/channels/bus_priorities.h
  • src/platforms/arm/rp/rpcommon/channel_engine_rp_pio.cpp.hpp
  • src/platforms/arm/rp/rpcommon/channel_engine_rp_pio.h
  • src/platforms/arm/rp/rpcommon/init_channel_driver_rp.cpp.hpp
  • src/platforms/arm/rp/rpcommon/rp_pio_tx_bus_traits.h
  • tests/platforms/arm/rp/rpcommon/channel_engine_rp_pio.cpp

📝 Walkthrough

Walkthrough

RP2350 now supports the third RP PIO engine through FLEX_IO bus instance 2. CLI validation, bus metadata, channel registration, driver naming, AutoResearch diagnostics, and tests now recognize PIO2.

Changes

RP2350 PIO2 support

Layer / File(s) Summary
PIO2 selection and validation
ci/autoresearch/args.py, ci/autoresearch/phases.py, ci/tests/test_autoresearch_phases.py
CLI parsing accepts index 2. RP2040 rejects PIO2, while RP2350 selects the PIO2 driver.
FLEX_IO bus model
src/fl/channels/bus.h, src/fl/channels/bus_info.h, src/fl/channels/bus_priorities.h
RP2350 defines three FLEX_IO instances, maps indices to PIO0–PIO2, exposes device metadata, and assigns instance priorities.
PIO2 registration and naming
src/platforms/arm/rp/rpcommon/* , tests/platforms/arm/rp/rpcommon/channel_engine_rp_pio.cpp
RP2350 registers FLEX_IO bus 2 with PIO2 traits. ChannelEngineRpPio stores distinct driver names, and tests verify three registered instances.
AutoResearch integration
examples/AutoResearch/*
AutoResearch maps PIO2 to bus 2 and includes it in capture sizing, GPIO measurements, metadata, and diagnostics.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Possibly related PRs

✨ 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 fix/rp2350w-pio-channels

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.

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