PIO (Programmable I/O) support for RP2040 / RP2350 — proposal + working prototype #1807
Replies: 1 comment 2 replies
-
|
Quick update — I've published runnable demo samples with end-to-end validation: https://github.com/begeistert/nf-rp2040-pio-samples — WS2812 / Blink / Fade. Each sample is a tiny nanoFramework app that assembles its PIO program in C# at runtime. They come with Happy to walk through any of it, and to open the formal feature request whenever there's interest. 🙂 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi! I've built PIO (Programmable I/O) support for RP2040 / RP2350 in nanoFramework and would love to contribute it upstream — opening this to gauge interest and figure out the preferred path before a formal feature request.
The gap
Today a Pico app can do GPIO / I2C / SPI / PWM / ADC from C#, but PIO — the chip's headline feature — isn't reachable at all. PIO is the reason people reach for a Pico: WS2812/NeoPixel, custom serial protocols, precise timing, quadrature decoding, DPI/HUB75, etc. There's also no managed way to author PIO programs (other approaches force the external
pioasmtool + a rawushort[], which loses the program metadata the runtime needs).What I have (working prototype)
System.Reflection.Emit-style builder (no externalpioasm, no rawushort[]), byte-exact vspioasm(golden tests). It returns a richPioProgram(wrap / side-set / shift metadata) that seeds the state-machine config automatically.Pio/PioBlock/PioStateMachine) backed byInternalCallnative interop innf-interpreter, version-aware for RP2350 PIO v1 (3rd block PIO2, FIFO PUTGET join, GPIO base).Proposed shape
A
nanoFramework.Hardware.Rp2040library (same pattern asnanoFramework.Hardware.Esp32.Rmt, a chip-specific programmable-timing peripheral) + the PIO native innf-interpreter, bound by the usual MDP checksum/version stubs.Questions for the team
nanoFramework.Hardware.Rp2040org repo + the native innf-interpreter?I have a feature request drafted and runnable demo samples (WS2812 / blink / fade), and I'm happy to open the formal issue, split the work into the managed-library PR(s) and the
nf-interpreternative PR(s), and demo the silicon run. Thanks! 🙏Beta Was this translation helpful? Give feedback.
All reactions