Hi.
1. code path ncs\v2.6.0\zephyr\samples\subsys\fs
2. use 16G SD Card
3. Direct connected SD card to nrf52840_SK (VCC , GND , CS , CLK , MOSI , MISO)
4. The SD Cord use FAT and no any data
Question : Can't access SD card
below is pr.conf
CONFIG_DISK_ACCESS=y CONFIG_LOG=y CONFIG_FILE_SYSTEM=y CONFIG_FAT_FILESYSTEM_ELM=y CONFIG_PRINTK=y CONFIG_MAIN_STACK_SIZE=2048 CONFIG_DISK_DRIVER_SDMMC=y CONFIG_SPI=y
below is app.overlay (Don't use nrf52840dk_nrf52840.overlay)
/ { pinctrl: pin-controller { compatible = "nordic,nrf-pinctrl"; spi1_default: spi1_default { group1 { psels = <NRF_PSEL(SPIM_SCK, 0, 31)>, <NRF_PSEL(SPIM_MOSI, 0, 30)>, <NRF_PSEL(SPIM_MISO, 0, 8)>; }; }; spi1_sleep: spi1_sleep { group1 { psels = <NRF_PSEL(SPIM_SCK, 0, 31)>, <NRF_PSEL(SPIM_MOSI, 0, 30)>, <NRF_PSEL(SPIM_MISO, 0, 8)>; low-power-enable; }; }; }; }; &spi1 { status = "okay"; cs-gpios = < &gpio0 21 GPIO_ACTIVE_HIGH >; sdhc0: sdhc@0 { compatible = "zephyr,mmc-spi-slot"; reg = < 0x0 >; status = "okay"; label = "SDHC0"; spi-max-frequency = < 24000000 >; }; };
below is log
*** Booting Zephyr OS build v3.3.99-ncs1-1 *** [00:00:00.438,751] <err> main: Storage init ERROR! [00:00:00.438,812] <err> fs: fs mount error (-5) Error mounting disk. [00:00:00.438,842] <err> fs: fs not mounted (mp == 0x20000000)