To use the SD/MMC SPI driver, five files, in addition to the generic file system files, must be included in the build:
fs_dev_sd.c
fs_dev_sd.h
fs_dev_sd_spi.c
fs_dev_sd_spi.h
fs_dev_sd_spi_bsp.c
The file fs_dev_sd_spi.h
must also be #included in any application or header files that directly reference the driver (for example, by registering the device driver). The following directories must be on the project include path:
\Micrium\Software\uC-FS\Dev\SD
\Micrium\Software\uC-FS\Dev\SD\SPI
A single SD/MMC volume is opened as shown in . The file system initialization (FS_Init()
) function must have previously been called.
ROM/RAM characteristics and performance benchmarks of the SD/MMC driver can be found in section Driver Characterization. The SD/MMC driver also provides interface functions to get low-level card information and read the Card ID and Card-Specific Data registers (see section FAT System Driver Functions).
If the SD/MMC initialization succeeds, the file system will produce the trace output as shown in (if a sufficiently high trace level is configured). See section Trace Configuration about configuring the trace level.