I’ve found that in order to get files to save to the flash I have to unmount my device. I can remount it, or even restart the device and resave the same files that are already there. However, when I try to change some of the data in a file, it crashes on unmount.
I’m using Rabbit 6700’s and 6750’s
I am having the exact same problem with you… RCM6750 in an attempt to unmount an SD card device using fat_UnmountDevice.
This is causing a system interrupt runtime error on my end - are you experiencing the same type of error?
I don’t remember the error I was getting, but I eventually got the unmount and syncPartitions to work. I didn’t like my pointer to the partition so I replaced it with this.
//Flushes cache and saves files.
rc = fat_SyncPartition(fat_part_mounted[0]);
I don’t unmount it anymore but this did work…
for (i = 0; i < num_fat_devices * FAT_MAX_PARTITIONS; i += FAT_MAX_PARTITIONS) {
if (fat_part_mounted[i]) {
rc = fat_UnmountDevice(fat_part_mounted[i]->dev);
}
Have you allocated enough bbram (and included the battery backup) for the FAT library’s cache? I’d use the RCM4300 as a model, but realize that it does not configure the on-board serial flash for FAT. Just the SD card.
How are you interfacing the SD card slot to the module?
What size SD cards are you using?