Lily T-Dongle S3 SD Card Pins

SD Card pin numbers for use with SPI

LilyGo Pin NameGPIO #SPI
SDMMC_D014MISO
SDMMC_D117
SDMMC_D221
SDMMC_D318CS
SDMMC_CLK12SCK
SDMMC_CMD16MOSI

Example

let spi_bus = Spi::new(
    peripherals.SPI2,
    spi::master::Config::default()
        .with_frequency(Rate::from_khz(400))
        .with_mode(spi::Mode::_0),
)
.unwrap()
.with_sck(peripherals.GPIO12) // clk
.with_mosi(peripherals.GPIO16) // cmd
.with_miso(peripherals.GPIO14) // d0
.into_async();

let sd_cs = Output::new(
    peripherals.GPIO18,  // d3
    Level::High,
    OutputConfig::default().with_pull(Pull::Up),
);
let spi_dev = ExclusiveDevice::new(spi_bus, sd_cs, Delay).unwrap();
let sdcard = SdCard::new(spi_dev, Delay);
 

cmac4603

A random assortment of notes.


Categories


2026-07-19