Skip to content

Instantly share code, notes, and snippets.

@hidsh
Last active February 28, 2026 20:44
Show Gist options
  • Select an option

  • Save hidsh/71a020391dd1f60abf77f1b6d126a393 to your computer and use it in GitHub Desktop.

Select an option

Save hidsh/71a020391dd1f60abf77f1b6d126a393 to your computer and use it in GitHub Desktop.
About the "XIAO nrf52840 PLUS documentation has incorrect pinouts!" on Seeed forum.

About the XIAO nrf52840 PLUS documentation has incorrect pinouts!


No response from Seeed, so I tested the all additional pinout introduced in the Plus by running Blink on my XIAO nRF52840 Plus.

Conclusion

There are two errors. Please refer to the correction proposal diagram below.

pinout_diagram

If Seeed simply revises the currently published pinout diagram as shown in this correction proposal (without modifying the PCB or the BSP), it will resolve the discrepancy for users.

I reviewed Seeed’s schematic and BSP (e.g., P1.03, D19, PIN_SPI1_SCK, SCK1), including internal pins and the “non-Plus” pins. Although there are several points that should be improved (such as pin placement U4 in the schematic and some incorrect BSP comments like // D21 is P1.03 (SCK1)), there is no mismatch between the Nordic pin definitions (e.g., P1.03), the XIAO pin names (e.g., D19) and the alt-function names (e.g., PIN_SPI1_SCK, SCK1). In terms of actual operation, everything appears to work as expected.

Notes

  1. The scope of this verification was limited to checking electrical connections via Blink only. Other functions such as INPUT, ADC, I2C, and SPI have not been tested. From reviewing the BSP, there do not appear to be inconsistencies, so these are likely fine, but they remain unverified.

  2. The XIAO nRF52840 Plus (non-“Sense”) used for this test was purchased from a Japanese distributor in December last year. Depending on the manufacturing period or batch, there may be differences. If possible, please run the attached sketch on your own hardware to confirm, but at your own risk.

Unrelated observations

As noted in the test sketch:

  • According to the nRF52840 specification (where Nordic marks this as “not recommended”), the NFCx pins—D14 (P0.09) and D15 (P0.10)—should be reserved for NFC use and should not be used as GPIO or UART.

  • D16 (P0.31) is an internal signal dedicated to the LiPo charging circuit and ideally should not be exposed in the pinout.

Given these limitations, only 6 of the 9 additional pins introduced in the “Plus” (D11, D12, D13, D17, D18, D19) can realistically be used as GPIOs. It is somewhat disappointing that this reduces the practical advantage of the “Plus” variant.

Sketch used for testing (Non-mbed version only)

/*
  Blink-plus.ino
*/

static const uint TEST_LED = D17;  // Verified: OK
// static const uint TEST_LED = D18;  // Verified: OK
// static const uint TEST_LED = D19;  // Verified: OK

// These pins (D11-D13) also work as expected.
// Note: This confirms the mappings in the modified pinout diagram.
// static const uint TEST_LED = D11;  // Verified: OK
// static const uint TEST_LED = D12;  // Verified: OK
// static const uint TEST_LED = D13;  // Verified: OK (P1.01)

/* 
 * D14 and D15 are reserved for NFC by default and cannot be used as GPIOs.
 * To enable them as GPIOs, you must modify the BSP's 'boards.txt' file.
 * Path example (Windows): %LOCALAPPDATA%\Arduino15\packages\Seeeduino\hardware\nrf52\<VERSION>\boards.txt
 * 
 * Find the section for your specific board (e.g., "Seeed XIAO nRF52840 Plus" or "Sense").
 * Change the following line:
 * xiaonRF52840Plus.build.extra_flags=-DNRF52840_XXAA {build.flags.usb}
 * to:
 * xiaonRF52840Plus.build.extra_flags=-DNRF52840_XXAA {build.flags.usb} -DCONFIG_NFCT_PINS_AS_GPIOS
 */

// static const uint TEST_LED = D14;  // OK with the fix above. CAUTION: Lacks ESD protection diodes!
// static const uint TEST_LED = D15;  // OK with the fix above. CAUTION: Lacks ESD protection diodes!

// static const uint TEST_LED = D16;  // Verified: OK. CAUTION: Do NOT use this pin while charging a LiPo battery for safety!

void setup() {
  pinMode(TEST_LED, OUTPUT);
}

void loop() {
  digitalWrite(TEST_LED, HIGH);  // turn the LED on (HIGH is the voltage level)
  delay(200);                      // wait
  digitalWrite(TEST_LED, LOW);   // turn the LED off by making the voltage LOW
  delay(200);                      // wait
}

Please let me know if you find any mistakes.

Thanks.

@hidsh
Copy link
Author

hidsh commented Feb 28, 2026

add image:
plus_pinout-mod2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment