Skip to content

Commit 1593f4e

Browse files
authored
Create mpconfigboard.h
1 parent 6d97459 commit 1593f4e

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
#define MICROPY_HW_BOARD_NAME "Mini SAM M4"
2+
#define MICROPY_HW_MCU_NAME "samd51g18"
3+
4+
#define CIRCUITPY_MCU_FAMILY samd51
5+
6+
// RGB Status LED Pins
7+
#define MICROPY_HW_APA102_MOSI (&pin_PB03)
8+
#define MICROPY_HW_APA102_SCK (&pin_PB02)
9+
10+
#define CIRCUITPY_BITBANG_APA102
11+
12+
// These are pins not to reset.
13+
// QSPI Data pins
14+
#define MICROPY_PORT_A (PORT_PA08 | PORT_PA09 | PORT_PA10 | PORT_PA11)
15+
// RGB Status LED pins, QSPI CS, and QSPI SCK
16+
#define MICROPY_PORT_B (PORT_PB02 | PORT_PB03 | PORT_PB10 | PORT_PB11)
17+
#define MICROPY_PORT_C (0)
18+
#define MICROPY_PORT_D (0)
19+
20+
#define AUTORESET_DELAY_MS 500
21+
22+
// If you change this, then make sure to update the linker scripts as well to
23+
// make sure you don't overwrite code
24+
#define CIRCUITPY_INTERNAL_NVM_SIZE 4096
25+
26+
#define BOARD_FLASH_SIZE (FLASH_SIZE - 0x4000 - CIRCUITPY_INTERNAL_NVM_SIZE)
27+
28+
#include "external_flash/devices.h"
29+
30+
#define EXTERNAL_FLASH_DEVICE_COUNT 1
31+
#define EXTERNAL_FLASH_DEVICES W25Q16JV_IM
32+
33+
#include "external_flash/external_flash.h"
34+
35+
#define DEFAULT_I2C_BUS_SCL (&pin_PA13)
36+
#define DEFAULT_I2C_BUS_SDA (&pin_PA12)
37+
38+
#define DEFAULT_SPI_BUS_SCK (&pin_PA01)
39+
#define DEFAULT_SPI_BUS_MOSI (&pin_PB22)
40+
#define DEFAULT_SPI_BUS_MISO (&pin_PB23)
41+
42+
#define DEFAULT_UART_BUS_RX (&pin_PA16)
43+
#define DEFAULT_UART_BUS_TX (&pin_PA17)
44+
45+
// USB is always used internally so skip the pin objects for it.
46+
#define IGNORE_PIN_PA24 1
47+
#define IGNORE_PIN_PA25 1

0 commit comments

Comments
 (0)