Adding More SERCOM Ports for SAMD Boards
Contributors:
M-Short
Helpful Charts
I promised you some charts.
- Let's start with the SAM21 datasheet. Starting on page 21 under I/O Multiplexing and Considerations, you'll see all the pin definition including the mux options. This is really where everything comes from.
- Next are the graphical datasheets. While these are available on the product pages of any board that has one, here they are as a neat little collection.
Now here are a few charts I made to help you out...
Arduino Pins on SAMD21
SERCOM | Port 0 | Port 0 Alt | Port 1 | Port 1 Alt | Port 2 | Port 2 Alt | Port 3 | Port 3 Alt |
---|---|---|---|---|---|---|---|---|
0 | D4 | A3 | D3 | A4 | D1 | D8 | D0 | D9 |
1 | D11 | Crystal | D13 | Crystal | D10 | SWCLK | D12, RXLED |
SWDIO |
2 | MISO | D4 | D38 | D3 | D2 | D1/TX | D5 | D0/RX |
3 | D20/SDA | D11/MOSI | D21/SCL | D13/SCK | USB | D10/SS, D6 |
USB | D12/MISO, D7 |
4 | A1, MISO |
A2, D38 |
MOSI, D2 |
SCK, D4 |
||||
5 | D20/SDA, A5 |
D21/SCL | D6 | USB, EDBGTX |
D7 | USB, EDBGRX |
Note: The ISP header does not name the pins individually so it is referred to as ISP or the actual SPI pin names that are used on the board.
Note: A comma means there are 2 pins that can use that port. A slash denotes 2 different names for the same pin.
Note: Some pins are tied directly to the USB port or the Crystal and not available for use. They are labeled as such.
Arduino Boards
I also figured it might be nice to know which SERCOM ports are open on different Arduino boards. Below is a table that lists what SERCOM ports that are already assigned to a serial protocol for a few development boards.
SERCOM Port | 0 | 1 | 2 | 3 | 4 | 5 |
---|---|---|---|---|---|---|
Zero | Serial1 | SPI | I2C | ISP | Serial on EDBG | |
MKR1000 | I2C | SPI | WinC1500 (SPI) | Serial1 | ||
SAMD21 Development Board | Serial1 | SPI | I2C | ISP | Serial | |
SAMD21 Mini Board | Serial1 | SPI | I2C | |||
RedBoard Turbo | Serial1 | SPI | I2C | ISP | Flash |