Skip to content

Follow-up: revisit invalidated pins on SuperMini / nice!nano / nRFMicro nRF52840 variants #2446

Closed

Description

@zackees

Background

PR #2445 (closes #2422) added FastPin variant blocks for three community nRF52840 boards exposed by the pdcook/nRFMicro-Arduino-Core BSP:

  • TARGET_SUPERMINI_NRF52840 → SuperMini nRF52840
  • TARGET_NICE_NANO_V2 → nice!nano v2 (ProMicro footprint)
  • TARGET_NRFMICRO → nRFMicro

To match how XIAO nRF52840 is currently handled, several pins on the new variants were declared with _FL_DEF_INVALID_PIN rather than _FL_DEFPIN. This issue tracks revisiting those decisions once we have hardware feedback from the community.

Currently invalidated pins (_FL_DEF_INVALID_PIN)

In src/platforms/arm/nrf52/fastpin_arm_nrf52_variants.h:

SuperMini nRF52840 / nice!nano v2 (same pinout)

Arduino pin nRF pin Reason invalidated
D10 P0.09 NFC1 (NFC pin — needs CONFIG_NFCT_PINS_AS_GPIOS or BSP equivalent to enable as GPIO)
D11 P0.10 NFC2 (same as above)
D21 P0.13 EXT_VCC enable (drives the onboard 3V3 regulator; pulling it low cuts power)
D22 P0.15 USR LED (onboard, but still drivable — invalidating mainly to discourage accidental use)

nRFMicro

Arduino pin nRF pin Reason invalidated
D7 P0.09 NFC1
D8 P0.10 NFC2
D25 P0.04 VBAT analog sense
D26 P1.09 EXT_VCC enable
D27 P1.10 USR LED

Questions to resolve

  1. NFC pins (P0.09 / P0.10). Other nRF52840 BSPs (Adafruit Feather, XIAO) also leave these as _FL_DEF_INVALID_PIN, but the upstream Adafruit nRF52 core does support repurposing them as GPIO via NFC_PINS_AS_GPIO() at boot. Should we expose a FASTLED_NRF52_ENABLE_NFC_GPIO (or similar) compile-time switch that re-enables them? This would benefit users wiring LEDs to D10/D11.
  2. USR LED pins (P0.15, P1.10). These are physically driveable; the only reason to invalidate is to keep FastLED.addLeds<..., D22> from accidentally fighting with the BSP's digitalWrite(LED_BUILTIN, ...). Some users want the LED row addressable. Worth a FASTLED_NRF52_ALLOW_USR_LED_PIN opt-in?
  3. EXT_VCC enable pins (P0.13 SuperMini/nice!nano, P1.09 nRFMicro). Almost certainly should stay invalid — toggling them mid-show() would brown out the regulator and the strip. Keep as-is, but document.
  4. VBAT (nRFMicro D25 / P0.04). Pure analog input on most BSPs. Keep invalid.
  5. General consistency. XIAO nRF52840 currently also marks USR LED pins (P0.26, P0.06, P0.30) invalid. Whatever decision we land on for SuperMini should probably apply uniformly across XIAO too.

Proposed next steps

cc @zackees

Activity

  1. zackees commented on May 10, 2026

    @zackees
    MemberAuthor

    Implemented in #2447.

    Added two opt-in compile-time switches to src/platforms/arm/nrf52/fastpin_arm_nrf52_variants.h:

    • FASTLED_NRF52_ALLOW_NFC_PINS — re-enables P0.09 / P0.10 as valid FastLED output pins on SuperMini, nice!nano v2, nRFMicro, XIAO nRF52840, and XIAO nRF52840 Sense. Documented as necessary-but-not-sufficient: users must also set CONFIG_NFCT_PINS_AS_GPIOS=1 in their BSP, or call NFC_PINS_AS_GPIO() at boot (Adafruit nRF52 core).
    • FASTLED_NRF52_ALLOW_USR_LED — re-enables on-board user-LED pins (P0.15 SuperMini/nice!nano v2, P1.10 nRFMicro, plus the three XIAO RGB LED pins at P0.26 / P0.06 / P0.30).

    Per the decision matrix above:

    • EXT_VCC enable pins (P0.13 SuperMini/nice!nano v2, P1.09 nRFMicro) stay invalid unconditionally.
    • VBAT-sense pins (P0.04 nRFMicro, plus the XIAO READ_BAT / VBAT lines) stay invalid unconditionally.
    • HICHG, ~CHG, QSPI flash, and the XIAO "NFC1 only via test point" notes stay invalid as before.

    Default behaviour is unchanged — without either macro defined the same set of pins remains invalid as before. README updated with both macros documented under the existing "Optional feature defines" section.

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

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions