Skip to content

UART clockless driver: wave10 quantization puts WS2812B-V5 1-symbol inside the 0/1 ambiguity band (bench decode failures) #3572

Closed

Description

@zackees

Found during the classic-ESP32 WROOM bench validation sweep (follow-up to #3569).

Bug

buildWave10Lut() quantizes T1H by best-fit rounding with no minimum separation from the 0-symbol. For the AutoResearch default chipset WS2812B-V5 (T1=225, T2=355, T3=645): pulse width = 1225/5 = 245 ns, T0H=225 → 1 pulse (245 ns), T1H=580 → best-fit 2 pulses = 490 ns. That leaves only 245 ns between the 0 and 1 symbols on the wire — inside real WS281x parts' sampling-threshold band (~550–625 ns) and right on the bench RX decoder's 500 ns threshold.

Bench evidence (WROOM COM11, jumper GPIO33→34)

runSingleTest {driver: UART, laneSizes: [10], pattern: ALL_ONES}:

  • Captured 1-symbol: H475/H500 (flapping the threshold), 0-symbol H250 — decode produced wrong bytes (actual [20,156,1] vs expected [85,255,0]) or failed outright, varying per pattern.
  • RMT control on the same pins: 4/4 byte-exact.

Fix

Enforce a minimum absolute wire separation (400 ns) between the symbols in buildWave10Lut()/canRepresentTiming(), widening T1H upward (a longer HIGH still reads as 1). WS2812B-V5 → (1,3) = 245 vs 735 ns, matching the proven legacy WS2812 LUT shape. Slow chipsets (WS2811-400, 500 ns pulses) already exceed the floor with single-pulse separation and are untouched; canonical WS2812 (1,3) and SK6812 (1,4) unchanged.

After the fix: UART loopback passes 4/4 patterns byte-exact at 10 LEDs on the bench.

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