Skip to content

Commit 8af139e

Browse files
rolandvsdpgeorge
authored andcommitted
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.
1 parent 0d82f5d commit 8af139e

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

ports/stm32/boards/NUCLEO_F767ZI/mpconfigboard.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#define MICROPY_HW_ENABLE_RTC (1)
1313
#define MICROPY_HW_ENABLE_DAC (1)
1414
#define MICROPY_HW_ENABLE_USB (1)
15+
#define MICROPY_HW_ENABLE_SDCARD (1)
1516

1617
#define MICROPY_BOARD_EARLY_INIT NUCLEO_F767ZI_board_early_init
1718
void NUCLEO_F767ZI_board_early_init(void);
@@ -71,6 +72,11 @@ void NUCLEO_F767ZI_board_early_init(void);
7172
#define MICROPY_HW_USB_VBUS_DETECT_PIN (pin_A9)
7273
#define MICROPY_HW_USB_OTG_ID_PIN (pin_A10)
7374

75+
// SD card detect switch (actual pin may need to be changed for a particular use)
76+
#define MICROPY_HW_SDCARD_DETECT_PIN (pin_G2)
77+
#define MICROPY_HW_SDCARD_DETECT_PULL (GPIO_PULLUP)
78+
#define MICROPY_HW_SDCARD_DETECT_PRESENT (GPIO_PIN_RESET)
79+
7480
// Ethernet via RMII
7581
#define MICROPY_HW_ETH_MDC (pin_C1)
7682
#define MICROPY_HW_ETH_MDIO (pin_A2)

ports/stm32/boards/NUCLEO_F767ZI/pins.csv

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,13 @@ AUDIO_SCL,PH7
4646
EXT_SDA,PB9
4747
EXT_SCL,PB8
4848
EXT_RST,PG3
49-
SD_SW,PC13
49+
SD_D0,PC8
50+
SD_D1,PC9
51+
SD_D2,PC10
52+
SD_D3,PC11
53+
SD_CMD,PD2
54+
SD_CK,PC12
55+
SD_SW,PG2
5056
LCD_BL_CTRL,PK3
5157
LCD_INT,PI13
5258
LCD_SDA,PH8

0 commit comments

Comments
 (0)