Skip to content

MGM240 native FastPin definitions bypass forced software pin selection #5072

Closed

Description

@zackees

Parent: #5024. Related native optimization child: #5041. Its GPIO store/race/timing acceptance remains unchanged; this functional selection defect is a separate prerequisite and cannot close that optimization task.

FASTLED_FORCE_SOFTWARE_PINS chooses the primary FastPin<PIN> : detail::ForcedSoftwarePin<PIN> in src/fl/system/fastpin_base.h. The selected platform route below still defines explicit native specializations, which override that primary. Safe fallback methods from #5056 cannot fix selection of a different type.

Source checkpoint: b6935e7b1311ce182a71138c6ee6ca479b188bc2.

  • Conditional route: ARDUINO_ARCH_SILABS and availableem_gpio/em_cmuSDKheaders.
  • Dispatch chain: platforms.h ARDUINO_ARCH_SILABS→fastled_arm_mgm240.h→thisheader; nativeDEFPIN150invocationsNanoMattermapunexcluded.
  • Source SHA-256: b151aa8b94a7ed06d3beded1b2dc1fdc0822f4d47e0770bdcaa0e092fbde5f9a.
  • src/platforms/arm/mgm240/fastpin_arm_mgm240.h:150: #define _FL_DEFPIN(PIN, BIT, PORT_LETTER, MASK) template<> class FastPin<PIN> : public _ARMPIN<MASK, __generated_struct_GPIO_PORT_##PORT_LETTER, PORT_NUM_##PORT_LETTER, BIT> {};
  • src/platforms/arm/mgm240/fastpin_arm_mgm240.h:162: _FL_DEFPIN(0, 0, A, (1 << 0)); // D0/RX - PA00

Source-confirmed conditional finding only: no new forced SDK build, runtime waveform or physical timing measurement is claimed.

The generated audit records all query results, 103 inspected source paths, 35 definition sites, guards and include edges. Its source positives were independently reviewed. Local audit: .build/spi-force-selection-audit/report.json, SHA-256 ebb780d4d10fc2a0981f505e5c355dedb5636dfa9fe313b5650a6f96bf42407b. No filename/string-absence heuristic alone establishes this finding.

Required acceptance:

  • Exercise ARDUINO_ARCH_SILABS with actual em_gpio/em_cmu headers and Nano Matter mappings; absent SDK prerequisites are not a successful route control.
  • Use actual SDK selected-type and executed-route controls with force off/on, mapped and NO_PINMAP configurations. Include-only and real generic software-SPI producers must compile in the intended modes; independent MY9221 users must remain compatible where supported. A macro appearing in a producer or a successful native build is not forced-fallback evidence.
  • Preserve native defaults and applicable pin validity, logical mapping and user exclusions. Prove ordering, initialization LOW, single-bit/byte/bulk GPIO behavior and subsequent pin reuse on the actual selected implementation. Keep native store-count/timing optimization controls separate.
  • Restore the old unguarded-specialization defect and require the same type/route gate to fail for the intended reason. An unrelated compiler/setup failure is insufficient. Bind source, SDK/compiler/configuration, commands and actual artifacts in the managed gate.
  • Recheck actual fallback callees and code/data placement for timing-sensitive consumers. Native IRAM/SRAM receipts cannot certify a newly selected software fallback. No GPIO latency credit or physical-speed claim is authorized by this selection fix.

This issue is unresolved. Closing it must not close the related optimization issue or imply electrical/timing validation.

Activity

  1. added
    sanitized
    on Nov 5, 2026
  2. zackees commented on Nov 7, 2026

    @zackees
    MemberAuthor

    #5151 (in the merge queue) makes FASTLED_FORCE_SOFTWARE_PINS select a software FastPin on MGM240. The pin map now always emits a native Mgm240HwPin; the clockless and ezWS2812 drivers use it, and FastPin is specialized only outside forced mode. Forced mode also defines FASTLED_NO_PINMAP: the Silabs core has no portOutputRegister, and FastLED's fallback register macros are placeholder addresses, so the register-based software pin would write to unrelated memory.

    Still open on this issue:

    • No hardware, waveform or timing run.
    • No LOW-at-init, reuse or ordering proof on the selected software implementation.
    • The managed audit gate and artifact binding are not provided; selection is shown by real-SDK compile probes.
  3. zackees commented on Nov 22, 2026

    @zackees
    MemberAuthor

    Closing with an accepted limitation.

    Fix: #5151 (cf15c98). The MGM240 pin map always emits a native Mgm240HwPin (src/platforms/arm/mgm240/fastpin_arm_mgm240.h:37-66), which the clockless and ezWS2812 drivers use. FastPin is specialized only outside forced mode (:57-63). Forced mode also defines FASTLED_NO_PINMAP (:320, led_sysdefs_arm_mgm240.h), so forced pins go through the Silabs core pin API rather than FastLED's placeholder register macros.

    Proven by: ci/tests/test_mgm240_forced_software_pins.py and real-SDK MGM240 compile probes in both modes.

    Accepted limitations:

    • No hardware, waveform or timing run, and no proof of LOW at init, reuse or ordering on the selected software pin: no MGM240 board is attached here.
    • Selection is shown by compile probes, not a managed artifact gate.

    The #5031 binding is replaced by a rescoped host-side gate, tracked in #5031.

  4. moved this from Triage to Done in FastLED Trackeron Nov 22, 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

    sanitized

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions