User`s manual

Dynamic C Users Manual digi.com 169
10.2.5.8 Hot-Swapping an SD Card
Hot-swapping is currently supported on the RCM3900 and the RCM3910. FAT version 2.14 or later is
required. A sample program is provided in Samples/FileSystem to demonstrate this feature:
FAT_HOT_SWAP_SD.C. The sample tests for a keyboard hit to determine if the user wants to hot-swap
the SD card.
Hot-swapping an SD card requires that you unmount the device before removal, as the FAT filesystem
employs a cache system that may not have written all information to the device unless unmounted.
As demonstrated in the sample program, the SD card should only be removed after it has unmounted with
fat_UnmountDevice() and no operations are happening on the device. Only fat_AutoMount()
should be used to remount SD cards. In addition, the function sdspi_debounce() should be called to
verify SD card presence before attempting to remount an SD card.
10.2.5.9 Unsupported FAT Features
At this time, the Dynamic C FAT file system does not support the following.
Single-volume drives (they do not have an MBR)
FAT32 or long file or directory names
Sector sizes other than 512 bytes
Direct parsing of relative paths
Direct support of a “working directory”
Drive letters (the FAT file system is not DOS)
10.2.5.10 References
There are a number of good references regarding FAT file systems available on the Internet. Any reason-
able search engine will bring up many hits if you type in relevant terms, such as “FAT,” “file system,” “file
allocation table,” or something along those lines. At the time of this writing, the following links provided
useful information.
1. This link is to Microsoft’s “FAT32 File System Specification,” which is also applicable to FAT12 and
FAT16.
www.microsoft.com/whdc/system/platform/firmware/fatgen.mspx
2. This article gives a brief history of FAT.
http://en.wikipedia.org/wiki/File_Allocation_Table
3. These tutorials give lots of details plus links to more information.
www.serverwatch.com/tutorials/article.php/2239651
www.pcguide.com/ref/hdd/file/fat.htm