Skip to content

Commit 9f21387

Browse files
committed
raspberrypi/boards: add DEFAULT_SD_* for Metro RP2040 and Feather RP2040 Adalogger
Both boards have onboard microSD slots but were missing the DEFAULT_SD_* pin defines that enable CircuitPython's native SD automount. Without these, SD-over-USB-MSC only worked via user boot.py code and hit the heap-mount race in get_vfs(). Pin wiring verified on hardware against the board schematics; CD pin polarity (DEFAULT_SD_CARD_INSERTED=true) confirmed by runtime test. Companion to #10963 (automount at filesystem init) and #NNNN (per-LUN PREVENT_ALLOW response). Fixes the last mile for #10965.
1 parent abb3cbb commit 9f21387

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

ports/raspberrypi/boards/adafruit_feather_rp2040_adalogger/mpconfigboard.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,11 @@
2323

2424
// #define CIRCUITPY_CONSOLE_UART_RX DEFAULT_UART_BUS_RX
2525
// #define CIRCUITPY_CONSOLE_UART_TX DEFAULT_UART_BUS_TX
26+
27+
// Onboard microSD slot on SPI1.
28+
#define DEFAULT_SD_SCK (&pin_GPIO18)
29+
#define DEFAULT_SD_MOSI (&pin_GPIO19)
30+
#define DEFAULT_SD_MISO (&pin_GPIO20)
31+
#define DEFAULT_SD_CS (&pin_GPIO23)
32+
#define DEFAULT_SD_CARD_DETECT (&pin_GPIO16)
33+
#define DEFAULT_SD_CARD_INSERTED true

ports/raspberrypi/boards/adafruit_metro_rp2040/mpconfigboard.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,11 @@
2020

2121
#define DEFAULT_UART_BUS_RX (&pin_GPIO1)
2222
#define DEFAULT_UART_BUS_TX (&pin_GPIO0)
23+
24+
// Onboard microSD slot.
25+
#define DEFAULT_SD_SCK (&pin_GPIO18)
26+
#define DEFAULT_SD_MOSI (&pin_GPIO19)
27+
#define DEFAULT_SD_MISO (&pin_GPIO20)
28+
#define DEFAULT_SD_CS (&pin_GPIO23)
29+
#define DEFAULT_SD_CARD_DETECT (&pin_GPIO15)
30+
#define DEFAULT_SD_CARD_INSERTED true

0 commit comments

Comments
 (0)