Skip to content

meta(lpc): LPC SCT-RX bench-validation + Phase-3 follow-ups (post #3021) #3035

Closed

Description

@zackees

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:

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_11 jumper.
  • Flash examples/AutoResearchLpc/AutoResearchLpc.ino with 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.ino with -DFASTLED_LPC_RX_SCT_DMA=1 (without WS2812 — see Phase 2b for that).
  • Add a temporary dmaProbe RPC (or extend pinToggleRx with a --dma flag) that exposes dmaChannelEdgeCount(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 timestamp logic in wait() 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:

  1. Flash budget. FASTLED_LPC_RX_SCT_WS2812=1 pulls in <FastLED.h> alongside fl::Remote and 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).
  2. Default-off. Once flash fits, flip the default in examples/AutoResearchLpc/AutoResearchLpc.ino:24-29 and document the change in fbuild / 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=1 by default in AutoResearchLpc.ino (or its successor — see Phase 3).

Phase 3 — decoder consolidation + sketch retirement

Code cleanup follow-ups noted inline.

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

Definition of done

This meta closes when:

  1. Phase 1, 2a, 2b checklists are all complete on real LPC845-BRK silicon.
  2. Phase 3 decoder consolidation + sketch retirement are merged.
  3. The "needs hardware bench validation" / "expected mismatch on real silicon" caveats are deleted from rx_sct_capture.{h,cpp.hpp} and test_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]).

Activity

  1. zackees commented on Jun 14, 2026

    @zackees
    MemberAuthor

    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.

  2. moved this from Triage to Done in FastLED Trackeron Jun 14, 2026
  3. added a commit that references this issue on Jun 14, 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