You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
UART clockless: generalize wave10 to waveN frame geometries (wave4/wave5) with per-chipset selection #3574
Follow-up to #3572, suggested during bench review: the wave10 model (10-bit UART frame = 2 LED bits × 5 pulses, 8 data bits + start/stop bookends) is one point in a family. ESP32 UART word lengths give sibling geometries:
Geometry
Frame
Data bits
Pulses/LED-bit
Baud @ 800 kHz
wave10 (current)
10
8
5
4.0 M
wave8-frame (new)
8
6
4
3.2 M
Why wave4 matters:
Coverage — 20% lower baud reaches faster chipsets under the ESP32's 5 Mbps cap: LPD1886-class 1250 kHz timings (period 800 ns) are infeasible at wave10 (6.25 M) but fit wave4 at exactly 5.0 M with zero quantization error.
Quantization — a second grid (period/4): SK6812's T0H=300/T1H=900 are EXACT multiples of period/4 (error 0 ns) vs 60+60 ns error on the period/5 grid.
Implementation: buildWave10Lut() evaluates both geometries via a shared fitUartWave(timing, P) helper (baud cap, [1, P−1] pulse range, distinctness, 400 ns minimum symbol separation from #3572, quantization tolerance) and picks the lower-error fit with a 50 ns hysteresis preferring wave10 — so all long-proven chipset shapes (WS2812, WS2812B-V5, WS2811-400) stay exactly as they were. The peripheral word length (UART_DATA_6_BITS/8_BITS) and baud now derive from the selected geometry.
Not pursued: P=3 (9-bit frame, 3 bits/frame) — only fits wave3-eligible timings, adds little; P≥7 single-bit-per-frame — exceeds the 5 Mbps cap for all 800 kHz chipsets.
Activity
feat(uart): waveN frame geometries — wave4 alongside wave10, per-chip…