Repository navigation
Description
Context
Discovery at 94dab9c for #5024, two source investigation rounds, no builds. CI1302/CI1303/CI1306 register FastPin through src/platforms/fastpin.h:40-44; src/platforms/spi_output_template.h:64-66 falls back to shared software SPI. src/platforms/ci13xx/fastpin_ci13xx.h:20-35,58-60 proves each pin has its own PL061-style masked address: one store changes only that pin. Its hi/lo values are 0xff/0. src/platforms/shared/spi_bitbang/bitbang_pin.h:33-44 currently defaults to a data-dependent branch and marks atomic writes false. Generic bulk paths can additionally select precomputed register writes (generic_software_spi.h:289-300).
Proposal
Specialize CI13XX software data writes to store the selected masked value without a data-dependent branch and consistently use that operation through production scalar and bulk entry points. Keep timing/clock ownership in shared SPI. This masked per-pin address must not be mistaken for a whole-port snapshot or an ESP-style set/clear pair.
Acceptance criteria
- First produce RED evidence from actual software SPI scalar and bulk APIs, then GREEN production disassembly proving one data-pin store without a bit-dependent branch or port read. Exercise all 256 values and every bit, back-to-back bytes, start bits, adjustment callbacks and final clock idle.
- Trace unrelated pin preservation with concurrent updates and ensure the masked data address/value is correct for PA/PB/PC/PD. Same bank pins still have distinct per-pin addresses: do not enable whole-port two-store streaming.
- Compile real CI1302, CI1303 and CI1306 configurations with their upstream Arduino core. Include default vs USE_EXTERNAL_CRYSTAL_OSC, common pins 2/3/13/14/20, CI1306 extended PD pins 22/23/25/26, and rejection of absent 24/27 and crystal-reserved 0/1. Report missing board-inventory/toolchain coverage explicitly; host shims alone are insufficient.
- Preserve timing and forced-software-pin fallback. Establish GPIO timing using vendor evidence; physical throughput claims require real-board measurements via the existing AutoResearch/fbuild workflow.
- Restore the old branch-producing data operation after implementation; the focused code-generation gate must fail and return GREEN after restoration. Changing trait flags or ledger metadata without using the behavior must fail.
Decisions
- One child covers the single CI13XX masked-register implementation and its variant matrix.
- Branchless masked-value stores are applicable; same-port streaming is not established.
- Duplicate search metadata:
CI13XX SPIfound Meta: convert all legacy addLeds controllers to the slim bridge (all platforms) #4580/slim bridge: LPC non-channel, Apollo3, Renesas, MGM240, CI13xx clockless #4596/slim bridge: decide Direct DriverTraits policy; convert AVR/ATtiny #4590; screenedCI13XX SPI label:sanitizedreturned none. No unscreened text was ingested. These numbers alone do not establish duplicates.
Open questions
Confirm the supported CI13XX toolchain/board targets and silicon bus timing before implementation. No physical speedup was measured. Next step: a focused real production code-generation repro.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
zackees commentedon Nov 6, 2026
Blocked, not started. Real CI13xx builds need fbuild 2.5.52 (native CI1306 support from FastLED/fbuild#1914, release prepared in FastLED/fbuild#1920). PyPI and GitHub still show 2.5.51 as the latest, so these acceptance builds cannot run yet, and FastLED has no ci13xx board entry until the floor is raised. Skipping ahead in #5024 until that release exists.
zackees commentedon Nov 22, 2026
Closing with an accepted limitation, the same pattern as #5047.
This is a performance improvement for CI13XX with no reported user problem behind it. The fbuild 2.5.52 blocker is gone (#5293), but:
ci/boards.pyhas no CI13XX board entry, so no CI build can show the codegen change;Writing a branchless masked-pin path without either would mean adding unverifiable code for a target nobody builds. If a CI13XX board entry or a user report appears, reopen with that as the production path. The shared software-SPI gating work continues in #5031.