Skip to content

add DEFAULT_SD_* for Metro RP2040 and Feather RP2040 Adalogger#10968

Open
mikeysklar wants to merge 1 commit intoadafruit:mainfrom
mikeysklar:pr-rp2040-sd-pin-defines
Open

add DEFAULT_SD_* for Metro RP2040 and Feather RP2040 Adalogger#10968
mikeysklar wants to merge 1 commit intoadafruit:mainfrom
mikeysklar:pr-rp2040-sd-pin-defines

Conversation

@mikeysklar
Copy link
Copy Markdown

Why

Both boards have onboard microSD slots but their mpconfigboard.h files don't declare DEFAULT_SD_* pin defines. Without these, CircuitPython's native SD automount can't fire and users fall back to mounting SD from boot.py — which hits the VM-heap race in get_vfs() and doesn't expose the card reliably over USB MSC on macOS.

Adding the pin defines lets the native automount path take over (SD is set up before USB enumerates, off-heap, stable across resets) and makes SD-over-MSC "just work" on these boards once #10963 and #10967 land.

What this changes

Board Pins
Adafruit Metro RP2040 SD on SCK=GP18, MOSI=GP19, MISO=GP20, CS=GP23, CD=GP15
Adafruit Feather RP2040 Adalogger SD on SCK=GP18, MOSI=GP19, MISO=GP20, CS=GP23, CD=GP16

Both use DEFAULT_SD_CARD_INSERTED=true (CD pin reads HIGH when card present — verified on hardware).

Tested on

Both boards verified end-to-end on macOS 26.x (Apple Silicon) and Linux (Ubuntu 24.04): SD mounts as the second USB drive, card insert/remove cycle works, contents readable.

Related

…040 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 adafruit#10963 (automount at filesystem init) and #NNNN (per-LUN
PREVENT_ALLOW response). Fixes the last mile for adafruit#10965.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant