Repository navigation
Description
Scope
Build the device-side and host-side AutoResearch validation harness for the LPC845 SCT+DMA clockless channels-API engine that just landed. This is the natural next step in the LPC controller bring-up: the driver is written (#3460), tested on host (#3464), and had its show()/poll() bodies wired to LpcSctDmaTransmitter (#3466). What is still missing is the harness that will actually exercise it on a real LPC845-BRK — a self-loopback through the LPC SCT-capture RX device.
This is the paired sibling of #3456 — same architectural shape, but for the clockless engine instead of the SPI engine. Same on-device and host-side plumbing pattern; the two harnesses just point at different drivers.
Background
After #3466:
ChannelEngineLpcSctDmaimplements the fullIChannelDrivercontract with a realshow()body backed by the runtimeLpcSctDmaTransmitter(SCT match programming + 3-DMA-channel chunk-stream encode + busy-wait for chunk completion).- Host tests (
tests/fl/channels/lpc_sct_dma_engine.cpp) validate the channels-API contract + a TX→RX byte-flow round-trip usingLpcSctRxChannel::injectEdges(). - The RX device (
src/platforms/arm/lpc/rx_sct_capture.cpp.hpp) has a fully-implementedbegin()body — bothFASTLED_LPC_RX_SCTpolling andFASTLED_LPC_RX_SCT_DMAautonomous DMA capture paths — against UM11029 §10/§14/§16/§21.
What we do not have: any code path where a real WS2812 frame emitted by the engine gets captured by the RX device on the same silicon and byte-compared against what was sent. That is what this issue tracks.
Deliverables
Device-side: examples/AutoResearch/AutoResearchPwmDmaClockless.h
New harness header, gated on #if defined(FL_IS_ARM_LPC_845) && defined(FASTLED_LPC_PWM_DMA), conditionally included from AutoResearch.ino (or AutoResearchLowMemory.h if the 64 KB flash budget pushes back). Wires three RPC handlers on top of the existing remote.bind(...) infrastructure:
-
pwmDmaCl.frameOnce(led_count, color_rgb)— allocates aCRGB[led_count]filled with the requested color, drives one frame through the channels-API path (FastLED.addLeds<WS2812, DATA_PIN, GRB>+FastLED.show()), returns{started_us, done_us, cpu_was_busy_during_transfer: bool}. -
pwmDmaCl.frameBurst(n_frames, fps_target)— drives n_frames back-to-back at the requested rate, reports actual fps + any inter-frame guard-band overruns. -
pwmDmaCl.captureSelf(led_count, color_rgb)— drives the frame AND captures the wire via the LPC SCT-capture RX device on the same chip (cross-pin loopback: DATA_PIN → SCT input pin). Returns the decoded byte sequence for host-side byte-for-byte comparison.
Implementation reference: examples/AutoResearch/AutoResearchSimd.h for the header layout + remote.bind pattern.
Host-side: ci/autoresearch/phases.py + wrapper
- Add
--pwm-dma-clflag to thebash autoresearchwrapper, parallel to--dma-spi(from AutoResearch: SPI-DMA validation harness for LPC845 (Phase 1 of #3453 bench bring-up) #3456). - Add a corresponding phase entry in
ci/autoresearch/phases.pythat:- Compiles
examples/AutoResearchwith-DFASTLED_LPC_PWM_DMA(and-DFASTLED_LPC_RX_SCT_DMAfor the RX side) added tobuild_flags. - Calls the three RPC handlers in sequence.
- Pass criteria:
frameOnce:done_us - started_uswithin ±5% ofled_count * 24 * total_period_ns / 1000(WS2812 wire time).frameBurst: measured fps ≥ 95% of theoretical max for the LED count.captureSelf: decoded bytes match the drivencolor_rgbfor every LED; no drift, no missing edges.
- Compiles
- Document mutual exclusion vs
--dma-spi(AutoResearch: SPI-DMA validation harness for LPC845 (Phase 1 of #3453 bench bring-up) #3456). Both consume DMA0 channels —_PWM_DMA_BASECH=0uses channels 0/1/2,_SPI_DMA_CHANNEL=4uses channel 4 — they DO NOT collide by default, but the LowMemory flash budget doesn't fit both. Reject--dma-spi --pwm-dma-clin the wrapper with a clear error.
Loopback wiring
- Single jumper on LPC845-BRK: from the WS2812
DATA_PIN(e.g. PIO0_10) to an SCT-capture-capable pin (e.g. PIO0_11). Reuses the existingLPC_SCT_CAPTUREplumbing. - Document the jumper + example port setup in
agents/docs/hardware-autoresearch.mdor an LPC-specific doc section.
Acceptance criteria
-
examples/AutoResearch/AutoResearchPwmDmaClockless.hlands with the three RPC bindings. -
--pwm-dma-clflag inbash autoresearch lpc845wraps to the new phase. - All three pass criteria above are bench-validated on LPC845-BRK. Closing this issue requires either scope/LA captures of the wire OR clean self-loopback decoded-bytes-match runs (or both).
- At least one additional
TODO(2842)marker inlpc_sct_dma_runtime.cpp.hppis closed as a result of the bench validation. Suggested targets:- SYSAHBCLKCTRL0 bit assignments (bit 8 = SCT, bit 29 = DMA) — confirm or correct per UM11029 §4.6.13.
- EVx_CTRL bit layout (bit 12 = COMBMODE) — confirm per §16.6.21.
- SCT→DMAREQ0 event routing — confirm per §16.6.18.
- Busy-wait replacement with WFI + DMA-done IRQ.
Dependencies
Hard-blocked by:
- [BLOCKER] LPC845-BRK AutoResearch bring-up echo returns empty RX (suspected HardFault) — blocks #3102 #3300 — LPC845-BRK AutoResearch echo silence. Without RPC round-trip there is no way for the host to call any of the three handlers.
- [META] LPC8xx compile + autoresearch + channels API end-to-end restoration — all blockers #3450 B2 —
framework-arduino-lpc8xxtarball checksum mismatch. Blocks platform install after fbuild 2.3.15 (B1 already resolved).
Soft-blocked by:
- LPC845: clockless+DMA channels-API engine — ChannelEngineLpcSctDma wrapping clockless_arm_lpc_pwm_dma.h #3459 addLeds<> route verification — the acceptance criterion "
addLeds<WS2812, PIN, GRB>routes throughChannelEngineLpcSctDma::show()via the channels-API path" needs a routing check. IfaddLeds<>still lands in the legacyclockless_arm_lpc_pwm_dma.htemplate,frameOncewill drive the wrong engine and the harness will validate the wrong code path. Might need a-DFASTLED_LPC_USE_CHANNELS_API=1shim in the harness build_flags to force the channels-API path.
Device-side header and host-side phase code can both land while the hard blockers are open — they just won't gate CI on a passing run until the blockers clear. Same "code lands early, validation gates the close" pattern as #3456.
Out of scope
- Multi-strip parallel output validation (feat(platform/lpc): multi-strip parallel output for LPC845 (SCT + DMA) — Stage 4.4 from #2845, gated on Stage 2c hardware validation #2879 Stage 4.4).
- LPC804 harness — the 4-channel DMA limit forbids the 3-channel topology for now.
- Retirement of the legacy
clockless_arm_lpc_pwm_dma.htemplate path — that's a separate cleanup once this harness proves the channels-API path is silicon-correct.
Relationships
- Sibling of AutoResearch: SPI-DMA validation harness for LPC845 (Phase 1 of #3453 bench bring-up) #3456 — same shape, SPI side.
- Direct follow-up to PRs feat(lpc): channels-API SCT+DMA clockless engine scaffold (#3459) #3460 / test(lpc): host tests for the SCT+DMA channels-API engine + RX round-trip #3464 / feat(lpc): wire show()/poll() body via runtime SCT+DMA transmitter (#3459) #3466 (channels-API scaffold + host tests + show/poll body lift).
- Feeds validation into LPC845: clockless+DMA channels-API engine — ChannelEngineLpcSctDma wrapping clockless_arm_lpc_pwm_dma.h #3459 (the parent controller bring-up issue) — once this harness is green, at least three of the remaining
TODO(2842)markers can be closed and LPC845: clockless+DMA channels-API engine — ChannelEngineLpcSctDma wrapping clockless_arm_lpc_pwm_dma.h #3459 can move toward closure. - Reuses LPC845-BRK: WS2812 loopback validation via SCT-capture RX channel #3015 →
LpcSctRxChannelfor the self-loopback path. - Part of the [META] LPC8xx compile + autoresearch + channels API end-to-end restoration — all blockers #3450 LPC restoration meta as the clockless-side validation arm.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
fix(lpc): unblock LPC845 compile path for SCT+DMA channels-API engine (…
feat(lpc): AutoResearch PWM+DMA clockless harness + TX→RX readback (F…
feat(autoresearch): accept LPC-Link2 CMSIS-DAP VID:PID for LPC845-BRK (…
feat(lpc): drive SCT+DMA chunk progression via poll() — no busy-wait (#…
feat(autoresearch): LPC845 SPI+DMA async driver validation harness (#…
feat(lpc): route addLeds<WS2812> through channels engine (#3517 Phase…
feat(lpc): route addLeds<WS2812> through channels engine (#3517 Phase…