Repository navigation
Description
Context
#3021 (closed) shipped the LPC8xx SCT-input-capture RX backend as a "two-phase rollout" — pin-toggle loopback (Phase 1) and WS2812 byte-match loopback (Phase 2). The code for both phases plus a Phase-2-accelerator DMA path is now in master:
- feat(rx/lpc): SCT input-capture + pin-toggle loopback (refs #3021) #3024 — Phase 1 SCT input-capture + pin-toggle loopback (polling-mode)
- feat(rx/lpc): WS2812 byte-match loopback plumbing (refs #3021 Phase 2) #3031 — Phase 2 WS2812 byte-match plumbing
- feat(rx/lpc): SCT→DMA RX capture path — closes Phase 2 hardware gate for #3021 #3034 — Phase 2 SCT→DMA capture path
But all three landed without on-silicon validation — only host-side injectEdges() round-trips were exercised (see tests/fl/channels/rx_sct_capture.cpp). The remaining bench work + cleanup is currently buried in source TODOs (src/platforms/arm/lpc/rx_sct_capture.h:24-31, rx_sct_capture.cpp.hpp:5-24, examples/AutoResearchLpc/AutoResearchLpc.ino:24-29). This meta surfaces it on the tracker so the WS2812 loopback gate from #3015 is actually held to the "verified on hardware" bar that #3021 originally aimed for.
Phases
Phase 1 — pin-toggle bench validation (polling-mode RX)
Code: ✅ landed (#3024). Bench: ❌ not yet run.
- Wire LPC845-BRK
P0_10 ↔ P0_11jumper. - Flash
examples/AutoResearchLpc/AutoResearchLpc.inowith default flags (FASTLED_LPC_RX_SCT=1, neither WS2812 nor DMA). - Run
bash autoresearch lpc845brk --pin-toggle-rx --upload-port COM<N>. - Assert all three rates pass within the documented tolerances:
- 1 kHz: mean ±2 %, σ < 1 µs
- 10 kHz: mean ±2 %, σ < 500 ns
- 100 kHz: mean ±2 %, σ < 500 ns
- If σ regresses, characterise the polling-loop jitter budget in
rx_sct_capture.cpp.hpp::pollOnce()and tighten the comment in the header to reflect measured numbers.
Phase 2a — SCT→DMA capture path silicon-validation
Code: ✅ landed (#3034). Bench: ❌ not yet run.
The DMA descriptor table + channel CFG/XFERCFG was written from UM11029 §16 cold — no scope/LA confirmation that g_dma_rising[] / g_dma_falling[] actually fill, that SETVALID arms the descriptors correctly, or that the SCT_DMA0/SCT_DMA1 trigger lines route through INPUTMUX as encoded.
- Build
AutoResearchLpc.inowith-DFASTLED_LPC_RX_SCT_DMA=1(without WS2812 — see Phase 2b for that). - Add a temporary
dmaProbeRPC (or extendpinToggleRxwith a--dmaflag) that exposesdmaChannelEdgeCount(0)/dmaChannelEdgeCount(1)raw, so the orchestrator can confirm DMA writes are landing. - Re-run the 100 kHz pin-toggle case with the DMA path. σ should drop vs polling — DMA latches every edge regardless of CPU.
- Verify
merge by timestamplogic inwait()against a known asymmetric edge stream (e.g. 70 % duty cycle). - Delete the probe RPC once confirmed; keep the assertion in the autoresearch orchestrator.
Phase 2b — WS2812 byte-match loopback (DMA-backed)
Code: ✅ plumbing landed (#3031, #3034). Bench: ❌ blocked.
Two blockers:
- Flash budget.
FASTLED_LPC_RX_SCT_WS2812=1pulls in<FastLED.h>alongsidefl::Remoteand overflows the 64 KB LPC845 flash. Blocked on fl::json: replace double with templated fixed-point variant to drop libgcc soft-FP bloat on embedded #3002 (fl::json soft-FP cleanup). - Default-off. Once flash fits, flip the default in
examples/AutoResearchLpc/AutoResearchLpc.ino:24-29and document the change infbuild/ autoresearch.
- Track fl::json: replace double with templated fixed-point variant to drop libgcc soft-FP bloat on embedded #3002 to completion; rebuild the LPC845 bring-up sketch with WS2812 enabled and confirm flash margin ≥ 1 KB.
- Run
bash autoresearch lpc845brk --ws2812-loopback. - All 5 cases must achieve
mismatched == 0:- case 0 — Red single LED
- case 1 — RGB 3-LED chain
- case 2 — All zeros (T0H/T0L fidelity)
- case 3 — All ones (T1H/T1L fidelity)
- case 4 — 100-LED alternating R/G/B (watchdog safety)
- Remove the "expected mismatch on real silicon" caveat block from
ci/autoresearch/test_lpc_ws2812_loopback.py:260-264. - Enable
FASTLED_LPC_RX_SCT_WS2812=1+FASTLED_LPC_RX_SCT_DMA=1by default inAutoResearchLpc.ino(or its successor — see Phase 3).
Phase 3 — decoder consolidation + sketch retirement
Code cleanup follow-ups noted inline.
- Consolidate the 4-phase WS2812 decoder out of the per-driver copies (
rx_sct_capture.cpp.hpp::decode, FlexPWM, FlexIO, native) intosrc/fl/channels/rx/decode_ws2812.h. Tracked inline atrx_sct_capture.h:14-15. - Retire
examples/AutoResearchLpc/AutoResearchLpc.inoonce fl::json: replace double with templated fixed-point variant to drop libgcc soft-FP bloat on embedded #3002 unlocks the unified low-memory mode — handled in Retire AutoResearchLpc.ino — fold into AutoResearch.ino low-memory mode #3030. - After retirement, update the autoresearch orchestrator (
ci/autoresearch/phases.py:617-873) so thepinToggleRx/ws2812SctTestRPCs are exercised against the unified sketch.
Phase 4 — wider LPC family expansion (parking lot, not blocking)
- LPC11U35 SCT — different register layout (UM10462). Validate the existing scaffold or add a per-family compat header.
- LPC15xx SCT — UM11074 register layout. Same question.
- LPC804 — confirm SCT path applies (smaller flash budget than LPC845; may need a more aggressive subset).
Cross-references
- Predecessor meta: feat(lpc): RX backend for LPC8xx via SCT input-capture — two-phase rollout #3021 (closed — code-complete, bench-incomplete)
- Original ask: LPC845-BRK: WS2812 loopback validation via SCT-capture RX channel #3015 (closed)
- Sketch retirement: Retire AutoResearchLpc.ino — fold into AutoResearch.ino low-memory mode #3030 (open)
- Flash-budget blocker for Phase 2b: fl::json: replace double with templated fixed-point variant to drop libgcc soft-FP bloat on embedded #3002
- LPC port roadmap: meta: LPC dev roadmap — Stages 3 + 4 (port completion, family expansion) #2845
- Multi-strip parallel (downstream): feat(platform/lpc): multi-strip parallel output for LPC845 (SCT + DMA) — Stage 4.4 from #2845, gated on Stage 2c hardware validation #2879
Definition of done
This meta closes when:
- Phase 1, 2a, 2b checklists are all complete on real LPC845-BRK silicon.
- Phase 3 decoder consolidation + sketch retirement are merged.
- The "needs hardware bench validation" / "expected mismatch on real silicon" caveats are deleted from
rx_sct_capture.{h,cpp.hpp}andtest_lpc_ws2812_loopback.py.
Phase 4 is parking-lot; it can spin out into its own meta once Phases 1–3 are green.
Filed via Claude Code ([email protected]).
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
refactor(rx): consolidate WS2812 edge-pair decoder into fl/channels/r…
refactor(rx/decode_ws2812): split header into .h declaration + .cpp.h…
refactor(rx/decode_ws2812): split header into .h declaration + .cpp.h…
docs(lpc/rx): mark #3035 Phase 3 shipped (decoder consolidation + LPC…
zackees commentedon Jun 14, 2026
Closing the meta. Phase 3 (decoder consolidation + AutoResearchLpc retirement + orchestrator update) shipped via #3037 + #3041 + #3043. Phases 1, 2a, 2b are hardware-gated — folding into the #2880 hardware sign-off checklist so they're tracked under a single live issue rather than two parallel ones.
docs(lpc): reframe #2880 as AutoResearch loopback verification (no ma…