Skip to content

Some pin definitions for Seeed XIAO nRF52840 are incorrect #1911

Closed

Description

@junsoftware

Describe the issue
The pin definitions for the Seeed XIAO nRF52840 board in fastpin_arm_nrf52_variants.h do not work correctly. The pin mapping seems to be incorrect.


Steps to reproduce

  1. Use the FastLED library with Seeed XIAO nRF52840.
  2. Attempt to control LEDs using the existing pin definitions.
  3. Observe that the pins do not function as expected.

Proposed Fix
After testing, the following corrected pin definitions work correctly for the board:

File: FastLED/src/platforms/arm/nrf52/fastpin_arm_nrf52_variants.h

#if defined(ARDUINO_Seeed_XIAO_nRF52840)

    #if defined(__FASTPIN_ARM_NRF52_VARIANT_FOUND)
        #error "Cannot define more than one board at a time"
    #else
        #define __FASTPIN_ARM_NRF52_VARIANT_FOUND
    #endif

    #if !defined(FASTLED_NRF52_SUPPRESS_UNTESTED_BOARD_WARNING)
        #warning "ARDUINO_Seeed_XIAO_nRF52840 board is an untested board -- test and let use know your results via https://github.com/FastLED/FastLED/issues"
    #endif
 
    // Arduino pins 0..7
    _FL_DEFPIN( 0, 2, 0); // D0  is P0.02
    _FL_DEFPIN( 1, 3, 0); // D1  is P0.03
    _FL_DEFPIN( 2, 28, 0); // D2  is P0.28
    _FL_DEFPIN( 3, 29, 0); // D3  is P0.29 
    _FL_DEFPIN( 4, 4, 0); // D4  is P0.4
    _FL_DEFPIN( 5, 5, 0); // D5  is P0.5
    _FL_DEFPIN( 6, 43, 1); // D6  is P1.11    <-- 11 to 43
    _FL_DEFPIN( 7, 44, 1); // D7  is P1.12    <-- 12 to 44
    
    // Arduino pins 8..15
    _FL_DEFPIN( 8, 45, 1); // D8  is P1.13    <-- 13 to 45
    _FL_DEFPIN( 9, 46, 1); // D9  is P1.14    <-- 14 to 46
    _FL_DEFPIN(10, 47, 1); // D10 is P1.15    <-- 15 to 47

Additional context
The corrected pin definitions were tested and verified on a Seeed XIAO nRF52840 board.


Activity

  1. zackees commented on Apr 6, 2025

    @zackees
    Member

    Thank you! It will appear in the next release which will be tomorrow if all goes well!

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