diff --git a/ports/samd/boards/ADAFRUIT_GRAND_CENTRAL_M4_EXPRESS/board.json b/ports/samd/boards/ADAFRUIT_GRAND_CENTRAL_M4_EXPRESS/board.json new file mode 100644 index 0000000000000..9188f7bbaffbe --- /dev/null +++ b/ports/samd/boards/ADAFRUIT_GRAND_CENTRAL_M4_EXPRESS/board.json @@ -0,0 +1,19 @@ +{ + "deploy": [ + "../deploy.md" + ], + "docs": "", + "features": [ + "External Flash", + "RGB LED", + "USB" + ], + "mcu": "samd51", + "product": "Grand Central M4 Express", + "images": [ + "grand_central_m4_express.jpg" + ], + "thumbnail": "", + "url": "https://www.adafruit.com/product/4064", + "vendor": "Adafruit" +} diff --git a/ports/samd/boards/ADAFRUIT_GRAND_CENTRAL_M4_EXPRESS/manifest.py b/ports/samd/boards/ADAFRUIT_GRAND_CENTRAL_M4_EXPRESS/manifest.py new file mode 100644 index 0000000000000..d90a3c0ababc1 --- /dev/null +++ b/ports/samd/boards/ADAFRUIT_GRAND_CENTRAL_M4_EXPRESS/manifest.py @@ -0,0 +1,6 @@ +include("$(PORT_DIR)/boards/manifest.py") +include("$(MPY_DIR)/extmod/asyncio") +require("onewire") +require("ds18x20") +require("neopixel") +require("sdcard") diff --git a/ports/samd/boards/ADAFRUIT_GRAND_CENTRAL_M4_EXPRESS/mpconfigboard.h b/ports/samd/boards/ADAFRUIT_GRAND_CENTRAL_M4_EXPRESS/mpconfigboard.h new file mode 100644 index 0000000000000..693639238d177 --- /dev/null +++ b/ports/samd/boards/ADAFRUIT_GRAND_CENTRAL_M4_EXPRESS/mpconfigboard.h @@ -0,0 +1,13 @@ +#define MICROPY_HW_BOARD_NAME "Grand Central M4 Express" +#define MICROPY_HW_MCU_NAME "ATSAMD51P20A" + +#define MICROPY_HW_XOSC32K (1) + +// 8MB QSPI chip +#define MICROPY_HW_QSPIFLASH GD25Q64C + +// fatfs configuration used in ffconf.h +#define MICROPY_FATFS_ENABLE_LFN (1) +#define MICROPY_FATFS_RPATH (2) +#define MICROPY_FATFS_MAX_SS (4096) +#define MICROPY_FATFS_LFN_CODE_PAGE 437 /* 1=SFN/ANSI 437=LFN/U.S.(OEM) */ diff --git a/ports/samd/boards/ADAFRUIT_GRAND_CENTRAL_M4_EXPRESS/mpconfigboard.mk b/ports/samd/boards/ADAFRUIT_GRAND_CENTRAL_M4_EXPRESS/mpconfigboard.mk new file mode 100644 index 0000000000000..b99b2a526a23a --- /dev/null +++ b/ports/samd/boards/ADAFRUIT_GRAND_CENTRAL_M4_EXPRESS/mpconfigboard.mk @@ -0,0 +1,13 @@ +MCU_SERIES = SAMD51 +CMSIS_MCU = ATSAMD51P20A +LD_FILES = boards/samd51x20a.ld sections.ld +TEXT0 = 0x4000 + +# The ?='s allow overriding in mpconfigboard.mk. +# MicroPython settings +MICROPY_VFS_LFS1 ?= 1 + +FROZEN_MANIFEST = $(BOARD_DIR)/manifest.py + +# Greater room for code in flash +MICROPY_HW_CODESIZE ?= 1008K \ No newline at end of file diff --git a/ports/samd/boards/ADAFRUIT_GRAND_CENTRAL_M4_EXPRESS/pins.csv b/ports/samd/boards/ADAFRUIT_GRAND_CENTRAL_M4_EXPRESS/pins.csv new file mode 100644 index 0000000000000..508a509af2565 --- /dev/null +++ b/ports/samd/boards/ADAFRUIT_GRAND_CENTRAL_M4_EXPRESS/pins.csv @@ -0,0 +1,98 @@ +# The lines contain pairs of Pin name and Pin number. +# Pin names must be valid Python identifiers. +# Pin numbers have the form Pxnn, with x being A, B, C or D. +# Lines starting with # or empty lines are ignored. + +A0,PA02 +A1,PA05 +A2,PB03 +A10,PB07 +A11,PB08 +A12,PB09 +A13,PA04 +A14,PA06 +A15,PA07 +A3,PC00 +A4,PC01 +A5,PC02 +A6,PC03 +A7,PB04 +A8,PB05 +A9,PB06 +AREF,PA03 +CS,PD10 +D0,PB25 +D1,PB24 +D10,PB22 +D11,PB23 +D12,PB00 +D13,PB01 +D2,PC18 +D22,PD12 +D23,PA15 +D3,PC19 +D4,PC20 +D44,PC11 +D45,PC10 +D46,PC06 +D47,PC07 +D48,PC04 +D49,PC05 +D5,PC21 +D6,PD20 +D7,PD21 +D8,PB18 +D9,PB02 +MISO,PD11 +MOSI,PD08 +NEOPIXEL,PC24 +PCC_CLK,PA14 +PCC_D0,PA16 +PCC_D1,PA17 +PCC_D10,PC12 +PCC_D11,PC13 +PCC_D12,PC14 +PCC_D13,PC15 +PCC_D2,PA18 +PCC_D3,PA19 +PCC_D4,PA20 +PCC_D5,PA21 +PCC_D6,PA22 +PCC_D7,PA23 +PCC_D8,PB14 +PCC_D9,PB15 +PCC_DEN1,PA12 +PCC_DEN2,PA13 +PCC_XCLK,PB19 +RX1,PB13 +RX2,PC23 +RX3,PB17 +RXLED,PC31 +SCK,PD09 +SCL,PB21 +SCL_1,PC17 +SD_CD,PB31 +SD_CS,PB28 +SD_MISO,PB29 +SD_MOSI,PB26 +SD_SCK,PB27 +SDA,PB20 +SDA_1,PC16 +SWO,PB30 +TX1,PB12 +TX2,PC22 +TX3,PB16 +TXLED,PC30 + +QSPI_CS,PB11 +QSPI_SCK,PB10 +QSPI_D0,PA08 +QSPI_D1,PA09 +QSPI_D2,PA10 +QSPI_D3,PA11 + +USB_DM,PA24 +USB_DP,PA25 + +SWCLK,PA30 +SWDIO,PA31