Repository navigation
fix(SM16824E): align TIMING_SM16824E with datasheet (300/600/300) - #3204
Conversation
Closes #3203. The SM16824E datasheet (attached by @einlichtvogel in #1941) specifies typicals T0H=300 / T0L=900 / T1H=900 / T1L=300 ns, identical to the SM16703 / WS2811-800kHz RZ family. The previous T1=300 / T2=900 / T3=100 emitted T0H=300 / T0L=1000 / T1H=1200 / T1L=100 — out of spec against both this chip's own datasheet and SM16703, which made the SM16703 + SM16824E shared-bus case in #1941 unworkable. Verified algorithmically via ci/tools/led_timing_conversions.py: old 300/900/100 -> T1H=1200ns (over SM16703 max 1000), T1L=100ns (under SM16703 min 200) — FAIL vs both datasheets new 300/600/300 -> T0H=300, T0L=900, T1H=900, T1L=300, cycle=1200ns PASS vs both SM16703P and SM16824E windows Also: - Sync the AVR FMUL-quantized legacy entry to match SM16703. - Sync the chipset-database round-trip test fixture in ci/test_led_timing_conversion.py. - Flip the Wave3 eligibility unit test: SM16824E now matches the WS2811-family Wave3-eligible profile (was rejected only because of the over-spec T1H=1200 ns). - Reconcile the stale doc comment in src/chipsets.h. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughCorrects the SM16824E LED chipset timing constants from ChangesSM16824E Timing Correction
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related issues
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
Summary
Closes #3203. Workaround/follow-up to the mixed-bus discussion in #1941.
fl::TIMING_SM16824Ewas emitting T0H/T0L/T1H/T1L = 300/1000/1200/100 ns. That waveform is out of spec against:The two chip families share an identical RZ-code timing profile in their datasheets, so the only thing blocking the shared-data-line case in #1941 was this in-tree fixture. Aligning
TIMING_SM16824Ewith the datasheet makes both chips co-driveable from a singleSM16703(orSM16824E) controller.Algorithmic verification
Using
ci/tools/led_timing_conversions.py:Round-trip through
phase3_to_datasheetis included inci/test_led_timing_conversion.py(passes after updating the fixture).Changes
src/fl/chipsets/led_timing.h—TIMING_SM16824E->T1=300, T2=600, T3=300, RESET=200.src/chipsets.h— reconcile the stale doc comment that already claimed the datasheet typicals.src/platforms/avr/led_timing_legacy_avr.h— sync FMUL-quantized AVR entry to match SM16703.ci/test_led_timing_conversion.py— update the chipset-database fixture for round-trip tests.tests/platforms/esp/32/drivers/parlio/parlio_driver.cpp— flip the Wave3 eligibility test for SM16824E from NOT-eligible to eligible (the only reason it was rejected was the over-spec T1H=1200 ns; with the datasheet timing it shares the WS2811-family profile and IS Wave3-eligible).Test plan
bash lintbash test parlio_driver --cpp(Wave3 eligibility — passes)bash test timing_traits --cpp(passes)uv run python -m unittest ci.test_led_timing_conversion(16/16 pass)bash test --cpp(pre-existing flakes on parallel run only; individual targets pass; no SM16824E-related test fails)🤖 Generated with Claude Code
Summary by CodeRabbit