Repository navigation
fix(uart): wave10 minimum symbol separation — UART + SPI loopback GREEN (fixes #3572) - #3573
Conversation
…back GREEN (#3572) Bench validation sweep on ESP32-WROOM COM11 (jumper GPIO33->34), all four channel drivers now pass byte-exact 10-LED loopback, 4/4 patterns: RMT, I2S, UART, SPI. UART (the one real bug, fixes #3572): buildWave10Lut best-fit rounding put WS2812B-V5's 1-symbol at 2 pulses (490 ns) — only 245 ns above the 0-symbol, inside real WS281x parts' sampling-threshold band and flapping the bench decoder's 500 ns threshold (wrong bytes / failed decodes). Enforce a 400 ns minimum absolute wire separation, widening T1H upward: V5 -> (1,3) = 245 vs 735 ns, matching the proven legacy WS2812 LUT shape. canRepresentTiming mirrors the bump (T1H tolerance widened by exactly the deliberate separation growth). Canonical WS2812 (1,3), SK6812 (1,4) and slow chipsets (WS2811-400, 500 ns pulses) unchanged. New unit test pins the V5 (1,3) shape. SPI needed no code change — its earlier bench crashes were the #3571 heap-exhaustion family. The driver is already async at the channel level (spi_device_queue_trans ISR-driven DMA + non-blocking poll()); the remaining #3179 scope (ISR-chunked ring-buffer streaming) is a peak-memory optimization, unchanged by this PR. Co-Authored-By: Claude Fable 5 <[email protected]>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughModifies ChangesWave10 LUT minimum separation enforcement
Estimated code review effort: 2 (Simple) | ~12 minutes Sequence Diagram(s)Not applicable — the changes are localized numeric/logic adjustments within a single component rather than a multi-component interaction flow. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
Fixes #3572.
Bench validation sweep on ESP32-WROOM COM11 (jumper GPIO33→34): all four channel drivers now pass byte-exact 10-LED loopback, 4/4 patterns each — RMT, I2S, UART, SPI.
UART — the one real bug
buildWave10Lut()best-fit rounding put WS2812B-V5's 1-symbol at 2 UART pulses (490 ns), only 245 ns above the 0-symbol — inside real WS281x parts' 0/1 sampling band and flapping the bench decoder's 500 ns threshold (wrong bytes / failed decodes, bench-capturedH475/H500flapping). Fix: enforce a 400 ns minimum absolute wire separation, widening T1H upward (longer HIGH still reads as 1): V5 → (1,3) = 245 vs 735 ns, matching the proven legacy WS2812 LUT shape.canRepresentTiming()mirrors the bump. Canonical WS2812 (1,3), SK6812 (1,4), and slow chipsets (WS2811-400 — 500 ns pulses already exceed the floor) are unchanged; unit test pins the V5 shape.Bench after fix:
{"driver":"UART","passed":true,"passedTests":4,"captureEvidenceBytes":120,"captureEvidenceRawEdges":256}SPI — no code change needed
{"driver":"SPI","passed":true,"passedTests":4,...}on the same bench. Its earlier crashes were the #3571 heap-exhaustion family. The driver is already async at the channel level (spi_device_queue_transISR-driven DMA + non-blockingpoll()pipeline); the remaining #3179 scope (ISR-chunked ring-buffer streaming) is a peak-memory optimization for very long strips, tracked separately.Verification
bash test --cpp: green (incl. new Wave10 V5 separation test; WS2811-400/SK6812/WS2812 pinning tests unchanged).bash lint: clean.🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Tests