Skip to content

samd/boards: Add Seeed XIAO SAMD21 Plus board definition.#19254

Open
cumin777 wants to merge 1 commit into
micropython:masterfrom
cumin777:xiao_samd21_plus
Open

samd/boards: Add Seeed XIAO SAMD21 Plus board definition.#19254
cumin777 wants to merge 1 commit into
micropython:masterfrom
cumin777:xiao_samd21_plus

Conversation

@cumin777
Copy link
Copy Markdown

Summary

This PR adds board support for the Seeed XIAO SAMD21 Plus to the samd port.

It introduces a dedicated SEEED_XIAO_SAMD21_PLUS board definition with:

  • board metadata
  • SAMD21 Plus pin mappings
  • default UART/I2C/SPI configuration
  • board-specific aliases for the exposed GPIO and analog pins

The goal of this change is to make the board available as a first-class MicroPython target in the samd port with the correct board-level pin definitions.

Testing

The upstream PR branch is intentionally limited to the board-definition files only.

Board-definition correctness was checked by:

  • verifying that the new board files are present and self-consistent
  • checking the pin mapping against the intended XIAO SAMD21 Plus board wiring
  • confirming that the board-only branch contains only the ports/samd/boards/SEEED_XIAO_SAMD21_PLUS definition files

In addition, the corresponding development branch used for full board bring-up (xiao_samd21_plus_support) was tested on hardware with a locally built MicroPython firmware for SEEED_XIAO_SAMD21_PLUS.

On that branch, the following sample-based validation was completed successfully:

  • board boots and enters the MicroPython REPL
  • GPIO tests passed
  • ADC tests passed
  • PWM tests passed
  • UART tests passed
  • SPI tests passed
  • I2C tests passed
  • RGB LED / LED-related tests passed
  • board-specific pin alias tests passed

This PR itself does not include those sample/test files because it is intended to stay minimal for upstream board-definition submission.

Trade-offs and Alternatives

This PR only adds a new board definition and does not modify shared samd port behavior.

The alternative would have been to include additional test scripts and board-specific validation helpers in the same PR, but that would make the upstream submission larger and less focused. Keeping this PR limited to board-definition files makes review easier and avoids mixing bring-up/testing assets with the minimal board support change.

Generative AI

I used generative AI tools when creating this PR, but a human has checked the
code and is responsible for the code and the description above.

Signed-off-by: cumin <13809292481@163.com>
@github-actions
Copy link
Copy Markdown

Code size report:

Reference:  docs/library/rp2.DMA: Correct and add pack_ctrl defaults. [8f3a416]
Comparison: samd/boards: Add Seeed XIAO SAMD21 Plus board definition. [merge of 79fbacd]
  mpy-cross:    +0 +0.000% 
   bare-arm:    +0 +0.000% 
minimal x86:    +0 +0.000% 
   unix x64:    +0 +0.000% standard
      stm32:    +0 +0.000% PYBV10
      esp32:    +0 +0.000% ESP32_GENERIC
     mimxrt:    +0 +0.000% TEENSY40
        rp2:    +0 +0.000% RPI_PICO_W
       samd:    +0 +0.000% ADAFRUIT_ITSYBITSY_M4_EXPRESS
  qemu rv32:    +0 +0.000% VIRT_RV32

@robert-hh
Copy link
Copy Markdown
Contributor

What is the difference to the already-supported Seed XIAO SAMD21? I do not find a XIAO SAMD21 Plus board at the Seeed homepage, and the URL in your files points to the already supported device.

@robert-hh
Copy link
Copy Markdown
Contributor

It seems that the only substantial change is extending the pins.csv file. That change does not need a new board definition. Instead you can make a PR for the actual board files with the suggested changes. About the actual list I have a few minor comments:

  • There is no button at the XIAO SAMD21 board, and PB22 is not connected.
  • It seems a common habit for Arduino to have a LED found at D13. But different to other Arduino D11 to D13 are not accessible for users, an the LEDs have their own entries in the Pin list.
  • There are two entries for the User LED, LED and USER_LED. One of the should go.
  • There is no TX_LED item.
  • The SAMD21 port#s memory is very limited, and every line in the pins.csv uses flash space. So better keep the table as short as possible. That was the reason to call the pins Ax_Dx, besides that Seeed calls them so in the schematics.

But maybe you have better information and there will be a new version of the XIAO SAMD21 board, like with a button. Then, one could introduce variants.

@agatti agatti added port-samd board-definition New or updated board definition files. Combine with a port- label. labels May 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

board-definition New or updated board definition files. Combine with a port- label. port-samd

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants