Repository navigation
Description
Parent: #5024. Related native optimization child: #5048. 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: NRF52_SERIES plus recognized board/TARGET variant.
- Dispatch chain: platforms.h NRF52_SERIES→fastled_arm_nrf52.h→fastpin_arm_nrf52.h→thisvariantsheader171; nativeexplicitmacrosfl::FastPin unexcluded.
- Source SHA-256:
d1874d37698c26ce1bd1f1954097dd093e18efba15391a4235b4d4cbe3d3605e. src/platforms/arm/nrf52/fastpin_arm_nrf52_variants.h:42:template<> class fl::FastPin<ARDUINO_PIN> : \src/platforms/arm/nrf52/fastpin_arm_nrf52_variants.h:51:#define _FL_DEFPIN(ARDUINO_PIN, BOARD_PIN, BOARD_PORT) \
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 every recognized board/TARGET branch and raw fallback in fastpin_arm_nrf52_variants.h, P0/P1 legal pins, NFC/user-LED options and user-target overrides. Do not infer all-board coverage from one Feather build.
- 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.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
zackees commentedon Nov 6, 2026
Additional source-derived acceptance requirement for the future forced-NoPinMap route; this does not claim that route currently executes.
Recognized nRF52 variant specializations still override
FASTLED_FORCE_SOFTWARE_PINS, which is this issue's prerequisite. Once fixed, coverFASTLED_FORCE_SOFTWARE_PINS=1plus explicitFASTLED_NO_PINMAP(not the nRF52 default). The actual runtime adapter issrc/platforms/arm/nrf52/pin_nrf52.hpp: output callsnrf_gpio_cfg_output()at41–42; read callsnrf_gpio_pin_read()at61–62.A concrete core version admitted by the configured
framework-arduinoadafruitnrf52@^1.10601.0range is Adafruit1.6.1. Its bundled Nordic HAL disconnects input incfg_output; input-read documentation requires input connected, and the implementation reads IN. Its Arduino digitalRead control instead reads OUT for an output pin. This is an admitted source version, not proof of the actually resolved release package, SDK headers, or Mbed legacy HAL.After the selector fix, qualify the actual production forced provider and selected runtime/HAL route with an output-latch/readback oracle: both initial HIGH/LOW states, two successive toggles, strobe returning to its initial state, and unrelated GPIO preservation. Distinguish the input sampler from the output latch; a fake shared port or selected-type assertion alone is insufficient. Bind the actual package/headers/flags and mapping. Require focused GREEN, restoration of the disabled-input/input-read path to produce controlled behavioral RED, and restored GREEN. Preserve all existing variant/provider-selection and native optimization requirements; do not treat this comment as completing #5048 or broadening evidence to every SDK.
This remains a latent source/API-contract obligation behind the current selector defect. No current forced-route execution, exact returned value, electrical waveform, timing, or physical acceptance is claimed. No new duplicate child is requested.
zackees commentedon Nov 7, 2026
#5149 (in the merge queue) makes FASTLED_FORCE_SOFTWARE_PINS select the software FastPin on nRF52, while the PWM/SPIM drivers keep native routing through a new always-present Nrf52HwPin. It also fixes _FL_DEFPIN ignoring BOARD_PORT, which sent the 45 short-form P1 entries to P0 PSEL.
Still open on this issue:
fix(nrf52): honor FASTLED_FORCE_SOFTWARE_PINS and route P1 short-form…
zackees commentedon Nov 22, 2026
Closing with an accepted limitation. The remaining defect moves to #5396.
Fix: #5149 (2a8f55d).
fastpin_arm_nrf52_variants.h:44-54always emits a nativeNrf52HwPinand specializesFastPinonly outside forced mode, soFASTLED_FORCE_SOFTWARE_PINSnow selects the software template (fastpin_arm_nrf52.h:136). The PWM and SPIM drivers keep native routing throughNrf52HwPin._FL_DEFPINnow honorsBOARD_PORT, so short-form P1 pins no longer route to P0.Proven by:
ci/tests/test_nrf52_pin_table.pyand real-SDK nRF52 compile probes in both modes.Accepted limitations:
toggle()bug is already fixed by fix(fastpin): toggle mapped output latch outside AVR #5237 (tests/fl/system/fastpin_mapped_toggle.cpp). The non-atomichi()/lo()(fastpin_base.h:126,128) are tracked in fix(nrf52): forced software FastPin hi()/lo() are non-atomic read-modify-writes of OUT (toggle() already fixed in #5237) #5396.The #5031 binding is replaced by a rescoped host-side gate, tracked in #5031.