Skip to content

slim bridge: nRF52 clocked SPI + clockless (channels API present; nRF51 excluded) #4595

Closed

Description

@zackees

Files:

  • src/platforms/arm/nrf51/clockless_arm_nrf51.h
  • src/platforms/arm/nrf52/clockless_arm_nrf52.h

FASTLED_HAS_CHANNELS is 1 for NRF52. Choose Bridged or Direct depending on driver availability.

Part of #4580. Follow the slim bridge format, the gap register (A1-A12) and the testing plan (T0-T4) there. Acceptance: the T1 conformance suite passes, a same-SHA bash bloat before/after is recorded, and AutoResearch evidence is included where hardware is available.

Activity

  1. zackees commented on Sep 25, 2026

    @zackees
    MemberAuthor

    Exempt per the decision recorded in #4590: this platform's legacy clockless path links no channel code, so the slim bridge has nothing to remove, and bridging would add ChannelManager. Reopen if its legacy controller adopts a channel driver.

  2. moved this from Triage to Done in FastLED Trackeron Sep 25, 2026
  3. zackees commented on Sep 25, 2026

    @zackees
    MemberAuthor

    Reopened under follow-up meta #4601. The exemption in #4590 is being re-evaluated per platform by measurement rather than applied as a blanket rule.

  4. moved this from Done to Triage in FastLED Trackeron Sep 25, 2026
  5. zackees commented on Sep 25, 2026

    @zackees
    MemberAuthor

    Measured on origin/master e61aae4f0d, Blink, bash bloat <board> --build. The channel-symbol check greps .build/symbols/<board>/report.json for ChannelManager, fl::Channel::, ChannelData and IChannelDriver.

    Channel driver: no clockless one. FASTLED_HAS_CHANNELS is 1 for NRF52, but init_channel_driver_nrf52.cpp.hpp registers only the unified SPI adapter (SpiHw2/4). No clockless IChannelDriver or BusTraits exists (for example, there is no PWM/I2S-DMA engine), and nRF51 has no channel support at all. A future nRF52 PWM-DMA clockless engine would be a new driver, which is a separate feature and not a slim-bridge conversion.

    Board Flash RAM Channel symbols
    nrf52840_dk 64,461 B 225,735 B none

    (The first attempt timed out in zccache under parallel load; the retry succeeded.)

    Decision: keep as-is and close as not planned (per the #4601 rule). There is no channel engine to bridge onto, and no channel code is linked. The only option left is a "Direct" DriverTraits reshuffle of the same timing-critical bit-bang code. It would not save flash and could not be hardware-validated. Reopen if a hardware channel engine (DMA, PIO-like or UART) lands for this family.

  6. moved this from Triage to Done in FastLED Trackeron Sep 25, 2026
  7. zackees commented on Sep 25, 2026

    @zackees
    MemberAuthor

    Reopened: this platform has the channels API, so it moves to the slim bridge (maintainer decision; the earlier "exempt" closure only looked at clockless and missed the existing channel support). FASTLED_HAS_CHANNELS=1 here, and init_channel_driver_* registers a SPI channel adapter.

    Scope:

    1. Clocked SPI (APA102, SK9822, …). This currently uses the legacy SPIOutput, because FASTLED_SPI_USES_CHANNEL_API=0. Move it onto the slim SPI bridge (SlimSpiBridgeController, feat(spi): slim SPI bridge controller for clocked addLeds<> (#4585) #4613) over the existing SPI channel adapter.
    2. Clockless (WS2812, …). There is no clockless channel engine yet. Either wrap the platform's existing bit-bang controller as an IChannelDriver, or register the shared BitBangChannelDriver (platforms/shared/bitbang). Then use fl::SlimBridgeController.

    Acceptance: same-SHA bash bloat before and after for Blink and an APA102 example on a representative board, lint and tests pass, and the compile matrix passes. Hardware validation is deferred (#4623 pattern).

  8. changed the title [-]slim bridge: nRF51/nRF52 clockless[/-] [+]slim bridge: nRF52 clocked SPI + clockless (channels API present; nRF51 excluded)[/+] on Sep 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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