Skip to content

Commit bbdc832

Browse files
robert-hhdpgeorge
authored andcommitted
samd/boards: Add two SparkFun SAMD21 boards.
Add support for the boards: - SparkFun SAMD21 Dev Breakout - SparkFun RedBoard Turbo Both boards are SAMD21 based and actively sold by SparkFun. Signed-off-by: robert-hh <[email protected]>
1 parent 6bfb83e commit bbdc832

File tree

9 files changed

+281
-0
lines changed

9 files changed

+281
-0
lines changed

docs/samd/pinout.rst

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -650,6 +650,124 @@ Adafruit ItsyBitsy M0 Express :ref:`samd21_pinout_table`.
650650

651651
The board does not provide access to UART, I2C, SPI or DAC.
652652

653+
SparkFun Redboard Turbo assignment table
654+
----------------------------------------
655+
656+
=== ==== ============ ==== ==== ====== ====== ====== ======
657+
Pin GPIO Pin name IRQ ADC Serial Serial TCC/TC TCC/TC
658+
=== ==== ============ ==== ==== ====== ====== ====== ======
659+
2 PA02 A0 2 0 - - - -
660+
40 PB08 A1 8 2 - 4/0 4/0 -
661+
41 PB09 A2 9 3 - 4/1 4/1 -
662+
4 PA04 A3 4 4 - 0/0 0/0 -
663+
5 PA05 A4 5 5 - 0/1 0/1 -
664+
34 PB02 A5 2 10 - 5/0 6/0 -
665+
11 PA11 D0 11 19 0/3 2/3 1/1 0/3
666+
10 PA10 D1 10 18 0/2 2/2 1/0 0/2
667+
14 PA14 D2 14 - 2/2 4/2 3/0 0/4
668+
9 PA09 D3 9 17 0/1 2/1 0/1 1/3
669+
8 PA08 D4 - 16 0/0 2/0 0/0 1/2
670+
15 PA15 D5 15 - 2/3 4/3 3/1 0/5
671+
20 PA20 D6 4 - 5/2 3/2 7/0 0/4
672+
21 PA21 D7 5 - 5/3 3/3 7/1 0/7
673+
6 PA06 D8 6 6 - 0/2 1/0 -
674+
7 PA07 D9 7 7 - 0/3 1/1 -
675+
11 PA11 RX 11 19 0/3 2/3 1/1 0/3
676+
10 PA10 TX 10 18 0/2 2/2 1/0 0/2
677+
3 PA03 AREF 3 1 - - - -
678+
18 PA18 D10 2 - 1/2 3/2 3/0 0/2
679+
16 PA16 D11 0 - 1/0 3/0 2/0 0/6
680+
19 PA19 D12 3 - 1/3 3/3 3/1 0/3
681+
17 PA17 D13 1 - 1/1 3/1 2/1 0/7
682+
13 PA13 FLASH_CS 13 - 2/1 4/1 2/0 0/7
683+
35 PB03 FLASH_MISO 3 11 - 5/1 6/1 -
684+
54 PB22 FLASH_MOSI 6 - - 5/2 7/0 -
685+
55 PB23 FLASH_SCK 7 - - 5/3 7/1 -
686+
31 PA31 LED_RX 11 - - 1/3 1/1 -
687+
27 PA27 LED_TX 15 - - - - -
688+
12 PA12 MISO 12 - 2/0 4/0 2/0 0/6
689+
42 PB10 MOSI 10 - - 4/2 5/0 0/4
690+
30 PA30 NEOPIXEL 10 - - 1/2 1/0 -
691+
43 PB11 SCK 11 - - 4/3 5/1 0/5
692+
23 PA23 SCL 7 - 3/1 5/1 4/1 0/5
693+
22 PA22 SDA 6 - 3/0 5/0 4/0 0/4
694+
30 PA30 SWCLK 10 - - 1/2 1/0 -
695+
31 PA31 SWDIO 11 - - 1/3 1/1 -
696+
24 PA24 USB_DM 12 - 3/2 5/2 5/0 1/2
697+
25 PA25 USB_DP 13 - 3/3 5/3 5/1 1/3
698+
0 PA00 0 - - 1/0 2/0 -
699+
1 PA01 1 - - 1/1 2/1 -
700+
28 PA28 8 - - - - -
701+
=== ==== ============ ==== ==== ====== ====== ====== ======
702+
703+
For the definition of the table columns see the explanation at the table for
704+
Adafruit ItsyBitsy M0 Express :ref:`samd21_pinout_table`.
705+
706+
The default devices at the board are:
707+
708+
- UART 0 at pins PA11/PA10, labelled RX/TX
709+
- I2C 3 at pins PA22/PA23, labelled SDA/SCL
710+
- SPI 4 at pins PB10/PA12/PB11, labelled MISO, MOSI and SCK
711+
- DAC output on pin PA02, labelled A0
712+
713+
714+
SparkFun SAMD21 Dev Breakout assignment table
715+
---------------------------------------------
716+
717+
=== ==== ============ ==== ==== ====== ====== ====== ======
718+
Pin GPIO Pin name IRQ ADC Serial Serial TCC/TC TCC/TC
719+
=== ==== ============ ==== ==== ====== ====== ====== ======
720+
2 PA02 A0 2 0 - - - -
721+
40 PB08 A1 8 2 - 4/0 4/0 -
722+
41 PB09 A2 9 3 - 4/1 4/1 -
723+
4 PA04 A3 4 4 - 0/0 0/0 -
724+
5 PA05 A4 5 5 - 0/1 0/1 -
725+
34 PB02 A5 2 10 - 5/0 6/0 -
726+
11 PA11 D0 11 19 0/3 2/3 1/1 0/3
727+
10 PA10 D1 10 18 0/2 2/2 1/0 0/2
728+
14 PA14 D2 14 - 2/2 4/2 3/0 0/4
729+
9 PA09 D3 9 17 0/1 2/1 0/1 1/3
730+
8 PA08 D4 - 16 0/0 2/0 0/0 1/2
731+
15 PA15 D5 15 - 2/3 4/3 3/1 0/5
732+
20 PA20 D6 4 - 5/2 3/2 7/0 0/4
733+
21 PA21 D7 5 - 5/3 3/3 7/1 0/7
734+
6 PA06 D8 6 6 - 0/2 1/0 -
735+
7 PA07 D9 7 7 - 0/3 1/1 -
736+
11 PA11 RX 11 19 0/3 2/3 1/1 0/3
737+
10 PA10 TX 10 18 0/2 2/2 1/0 0/2
738+
3 PA03 AREF 3 1 - - - -
739+
18 PA18 D10 2 - 1/2 3/2 3/0 0/2
740+
16 PA16 D11 0 - 1/0 3/0 2/0 0/6
741+
19 PA19 D12 3 - 1/3 3/3 3/1 0/3
742+
17 PA17 D13 1 - 1/1 3/1 2/1 0/7
743+
54 PB22 D30 6 - - 5/2 7/0 -
744+
55 PB23 D31 7 - - 5/3 7/1 -
745+
13 PA13 D38 13 - 2/1 4/1 2/0 0/7
746+
35 PB03 LED_RX 3 11 - 5/1 6/1 -
747+
27 PA27 LED_TX 15 - - - - -
748+
12 PA12 MISO 12 - 2/0 4/0 2/0 0/6
749+
42 PB10 MOSI 10 - - 4/2 5/0 0/4
750+
43 PB11 SCK 11 - - 4/3 5/1 0/5
751+
23 PA23 SCL 7 - 3/1 5/1 4/1 0/5
752+
22 PA22 SDA 6 - 3/0 5/0 4/0 0/4
753+
30 PA30 SWCLK 10 - - 1/2 1/0 -
754+
31 PA31 SWDIO 11 - - 1/3 1/1 -
755+
24 PA24 USB_DM 12 - 3/2 5/2 5/0 1/2
756+
25 PA25 USB_DP 13 - 3/3 5/3 5/1 1/3
757+
0 PA00 0 - - 1/0 2/0 -
758+
1 PA01 1 - - 1/1 2/1 -
759+
28 PA28 8 - - - - -
760+
=== ==== ============ ==== ==== ====== ====== ====== ======
761+
762+
For the definition of the table columns see the explanation at the table for
763+
Adafruit ItsyBitsy M0 Express :ref:`samd21_pinout_table`.
764+
765+
The default devices at the board are:
766+
767+
- UART 0 at pins PA11/PA10, labelled RX/TX
768+
- I2C 3 at pins PA22/PA23, labelled SDA/SCL
769+
- SPI 4 at pins PB10/PA12/PB11, labelled MISO, MOSI and SCK
770+
- DAC output on pin PA02, labelled A0
653771

654772
SAMD21 Xplained PRO pin assignment table
655773
----------------------------------------
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"deploy": [
3+
"../deploy.md"
4+
],
5+
"docs": "",
6+
"features": [
7+
"Battery Charging",
8+
"DAC",
9+
"External Flash",
10+
"USB",
11+
"RGB LED"
12+
],
13+
"images": [
14+
"sparkfun_readboard_turbo.jpg"
15+
],
16+
"mcu": "samd21",
17+
"product": "SparkFun RedBoard Turbo",
18+
"thumbnail": "",
19+
"url": "https://www.sparkfun.com/products/14812",
20+
"vendor": "Sparkfun"
21+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#define MICROPY_HW_BOARD_NAME "SparkFun RedBoard Turbo"
2+
#define MICROPY_HW_MCU_NAME "SAMD21G18A"
3+
4+
#define MICROPY_HW_XOSC32K (1)
5+
6+
#define MICROPY_HW_SPIFLASH (1)
7+
#define MICROPY_HW_SPIFLASH_ID (5)
8+
9+
#define MICROPY_HW_DEFAULT_UART_ID (0)
10+
#define MICROPY_HW_DEFAULT_I2C_ID (3)
11+
#define MICROPY_HW_DEFAULT_SPI_ID (4)
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
MCU_SERIES = SAMD21
2+
CMSIS_MCU = SAMD21G18A
3+
LD_FILES = boards/samd21x18a.ld sections.ld
4+
TEXT0 = 0x2000
5+
6+
# The ?='s allow overriding in mpconfigboard.mk.
7+
# MicroPython settings
8+
MICROPY_HW_CODESIZE ?= 232K
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# The lines contain pairs of Pin name and Pin number.
2+
# Pin names must be valid Python identifiers.
3+
# Pin numbers have the form Pxnn, with x being A, B, C or D.
4+
# Lines starting with # or empty lines are ignored.
5+
6+
USB_DM,PA24
7+
USB_DP,PA25
8+
9+
SWCLK,PA30
10+
SWDIO,PA31
11+
12+
D0,PA11
13+
D1,PA10
14+
D2,PA14
15+
D3,PA09
16+
D4,PA08
17+
D5,PA15
18+
D6,PA20
19+
D7,PA21
20+
D8,PA06
21+
D9,PA07
22+
D10,PA18
23+
D11,PA16
24+
D12,PA19
25+
D13,PA17
26+
A0,PA02
27+
A1,PB08
28+
A2,PB09
29+
A3,PA04
30+
A4,PA05
31+
A5,PB02
32+
AREF,PA03
33+
RX,PA11
34+
TX,PA10
35+
SCL,PA23
36+
SDA,PA22
37+
MOSI,PB10
38+
MISO,PA12
39+
SCK,PB11
40+
FLASH_MOSI,PB22
41+
FLASH_MISO,PB03
42+
FLASH_SCK,PB23
43+
FLASH_CS,PA13
44+
NEOPIXEL,PA30
45+
46+
LED_TX,PA27
47+
LED_RX,PA31
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"deploy": [
3+
"../deploy.md"
4+
],
5+
"docs": "",
6+
"features": [
7+
"Battery Charging",
8+
"DAC",
9+
"USB"
10+
],
11+
"images": [
12+
"sparkfun_sam21_dev_breakout.jpg"
13+
],
14+
"mcu": "samd21",
15+
"product": "SparkFun SAMD21 Dev Breakout",
16+
"thumbnail": "",
17+
"url": "https://www.sparkfun.com/products/13672",
18+
"vendor": "Sparkfun"
19+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#define MICROPY_HW_BOARD_NAME "SparkFun SAMD21 Dev Breakout"
2+
#define MICROPY_HW_MCU_NAME "SAMD21G18A"
3+
4+
#define MICROPY_HW_XOSC32K (1)
5+
6+
#define MICROPY_HW_DEFAULT_UART_ID (0)
7+
#define MICROPY_HW_DEFAULT_I2C_ID (3)
8+
#define MICROPY_HW_DEFAULT_SPI_ID (4)
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
MCU_SERIES = SAMD21
2+
CMSIS_MCU = SAMD21G18A
3+
LD_FILES = boards/samd21x18a.ld sections.ld
4+
TEXT0 = 0x2000
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# The lines contain pairs of Pin name and Pin number.
2+
# Pin names must be valid Python identifiers.
3+
# Pin numbers have the form Pxnn, with x being A, B, C or D.
4+
# Lines starting with # or empty lines are ignored.
5+
6+
USB_DM,PA24
7+
USB_DP,PA25
8+
9+
SWCLK,PA30
10+
SWDIO,PA31
11+
12+
D0,PA11
13+
D1,PA10
14+
D2,PA14
15+
D3,PA09
16+
D4,PA08
17+
D5,PA15
18+
D6,PA20
19+
D7,PA21
20+
D8,PA06
21+
D9,PA07
22+
D10,PA18
23+
D11,PA16
24+
D12,PA19
25+
D13,PA17
26+
A0,PA02
27+
A1,PB08
28+
A2,PB09
29+
A3,PA04
30+
A4,PA05
31+
A5,PB02
32+
AREF,PA03
33+
RX,PA11
34+
TX,PA10
35+
SCL,PA23
36+
SDA,PA22
37+
MOSI,PB10
38+
MISO,PA12
39+
SCK,PB11
40+
D38,PA13
41+
D30,PB22
42+
D31,PB23
43+
44+
LED_TX,PA27
45+
LED_RX,PB03

0 commit comments

Comments
 (0)