summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroland van straten <roland@van-straten.org>2019-12-09 14:53:48 +0100
committerDamien George <damien.p.george@gmail.com>2019-12-19 11:28:47 +1100
commit8af139e8a4a01c2eea034df4e3eb96488ec3231b (patch)
tree1bc67bc80c5218712e76316b01521f2afae8d436
parent0d82f5d8c868d7f4e93d48e400cd4d769175e3e5 (diff)
stm32/boards/NUCLEO_F767ZI: Add pins and config for using an SD card.
The Nucleo board does not have an SD card slot but does have the requisite pins next to each other and labelled, so provide the configuration for convenience.
-rw-r--r--ports/stm32/boards/NUCLEO_F767ZI/mpconfigboard.h6
-rw-r--r--ports/stm32/boards/NUCLEO_F767ZI/pins.csv8
2 files changed, 13 insertions, 1 deletions
diff --git a/ports/stm32/boards/NUCLEO_F767ZI/mpconfigboard.h b/ports/stm32/boards/NUCLEO_F767ZI/mpconfigboard.h
index 1ee73c303..b144ce466 100644
--- a/ports/stm32/boards/NUCLEO_F767ZI/mpconfigboard.h
+++ b/ports/stm32/boards/NUCLEO_F767ZI/mpconfigboard.h
@@ -12,6 +12,7 @@
#define MICROPY_HW_ENABLE_RTC (1)
#define MICROPY_HW_ENABLE_DAC (1)
#define MICROPY_HW_ENABLE_USB (1)
+#define MICROPY_HW_ENABLE_SDCARD (1)
#define MICROPY_BOARD_EARLY_INIT NUCLEO_F767ZI_board_early_init
void NUCLEO_F767ZI_board_early_init(void);
@@ -71,6 +72,11 @@ void NUCLEO_F767ZI_board_early_init(void);
#define MICROPY_HW_USB_VBUS_DETECT_PIN (pin_A9)
#define MICROPY_HW_USB_OTG_ID_PIN (pin_A10)
+// SD card detect switch (actual pin may need to be changed for a particular use)
+#define MICROPY_HW_SDCARD_DETECT_PIN (pin_G2)
+#define MICROPY_HW_SDCARD_DETECT_PULL (GPIO_PULLUP)
+#define MICROPY_HW_SDCARD_DETECT_PRESENT (GPIO_PIN_RESET)
+
// Ethernet via RMII
#define MICROPY_HW_ETH_MDC (pin_C1)
#define MICROPY_HW_ETH_MDIO (pin_A2)
diff --git a/ports/stm32/boards/NUCLEO_F767ZI/pins.csv b/ports/stm32/boards/NUCLEO_F767ZI/pins.csv
index d84f8e9d1..ccd90d447 100644
--- a/ports/stm32/boards/NUCLEO_F767ZI/pins.csv
+++ b/ports/stm32/boards/NUCLEO_F767ZI/pins.csv
@@ -46,7 +46,13 @@ AUDIO_SCL,PH7
EXT_SDA,PB9
EXT_SCL,PB8
EXT_RST,PG3
-SD_SW,PC13
+SD_D0,PC8
+SD_D1,PC9
+SD_D2,PC10
+SD_D3,PC11
+SD_CMD,PD2
+SD_CK,PC12
+SD_SW,PG2
LCD_BL_CTRL,PK3
LCD_INT,PI13
LCD_SDA,PH8