carlk3 / no-OS-FatFS-SD-SDIO-SPI-RPi-Pico

A FAT filesystem with SDIO and SPI drivers for SD card on Raspberry Pi Pico
Apache License 2.0
76 stars 15 forks source link

Detecting card without CD pin #39

Open willeccles opened 2 months ago

willeccles commented 2 months ago

Our hardware has a hinged SD card slot, and those don't typically have a CD pin for obvious reasons. At the moment, I am just calling f_mount and relying on the result being FR_NOT_READY if there is no SD card present. Is this the recommended way? I had a gander through the source and couldn't find any other appealing way to do this, but I'd like to confirm.

carlk3 commented 1 month ago

Have a look at (dev_sdio) Added sd_test_com() which can be used to quickly test the presence of SD card when card detect is not used.