rp2/boards/SEEED_XIAO_RP2040: Fix swapped D13/D15 pins on XIAO RP2040 Plus by cumin777 · Pull Request #19695 · micropython/micropython · GitHub
Skip to content

rp2/boards/SEEED_XIAO_RP2040: Fix swapped D13/D15 pins on XIAO RP2040 Plus - #19695

Open
cumin777 wants to merge 1 commit into
micropython:masterfrom
cumin777:fix-xiao-rp2040-plus-pin-map
Open

cumin777 wants to merge 1 commit into
micropython:masterfrom
cumin777:fix-xiao-rp2040-plus-pin-map

Conversation

@cumin777

Copy link
Copy Markdown
Contributor

Fixes a swapped pin mapping for the Seeed Studio XIAO RP2040 Plus that was introduced in #19253 (the Plus-only pins live in SEEED_XIAO_RP2040/pins.csv).

Problem: D13 was mapped to GPIO19 and D15 to GPIO21, but on the actual hardware D13 is wired to GPIO21 and D15 to GPIO19.

Evidence:

  • Official Seeed Studio wiki pin map: D13 = GPIO21 (I2C1 clock), D14 = GPIO20 (I2C1 data), D15 = GPIO19 (https://wiki.seeedstudio.com/XIAO-RP2040/, "Pin Map" table).
  • The board schematic labels these nets GPIO21/SCL1/D13, GPIO20/SDA1/D14, GPIO19/D15.
  • Internal consistency: this file already maps SCL1,GPIO21 and SDA1,GPIO20, and the wiki/schematic identify D13 as SCL1 and D14 as SDA1, so D13 must be GPIO21.

The mistaken sequential assignment (GPIO18,19,20,21 -> D12..D15) also exists in the arduino-pico seeed_xiao_rp2040_plus variant and will be reported there separately.

Effect of the bug: code referring to board pins D13/D15 (e.g. machine.Pin("D13")) drove the opposite pad. SCL1/SDA1 and the other Plus-only pins were unaffected.

Fix: swap the two GPIO values so that D13,GPIO21 and D15,GPIO19.

@github-actions

github-actions Bot commented Sep 10, 2026

Copy link
Copy Markdown

D13 and D15 were mapped to each other's GPIO.  Per the Seeed Studio
wiki pin map and the board schematic, D13 is wired to GPIO21 (SCL1)
and D15 to GPIO19.  This also makes D13 agree with the existing
SCL1 entry (GPIO21) and D14 with SDA1 (GPIO20).

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: cumin <13809292481@163.com>
@cumin777
cumin777 force-pushed the fix-xiao-rp2040-plus-pin-map branch from e4c915f to d8da830 Compare September 10, 2026 08:06
earlephilhower pushed a commit to earlephilhower/arduino-pico that referenced this pull request Sep 10, 2026
D13 and D15 were mapped to each other GPIO. Per the official Seeed
wiki pin map and the board schematic, D13 is GPIO21 (SCL1) and D15
is GPIO19; the actual pad order is 18, 21, 20, 19, not sequential.

Also correct the neighboring comments: SDA1 is on D14 (GPIO20), and
PIN_WIRE1_SCL (GPIO21) is D13.

MicroPython had the identical bug, fixed in
micropython/micropython#19695

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant