SD card without file system

Hello all. I recently got the duino to read a sandisk 1g card and I am planning to create a data logger that does not use a file system. As I understand it, sandisk always preloads a fat file system on the card and my scans of the sectors on the card show lots of non zero sectors.

My question is, if I go aout and zero out all sectors (including sector 0) will I be messing anything up? I know (and want) to be wiping out the fat file system. I just wants 1g worth of addressable memory to access/read/write to.

Will this work or do I need to leave some sectors, like sector 0 alone?

The problem is that the sort of memory used on the SD card (NAND flash) is not always reliable, therefore a file system is a good way of identifying malfunctioning sectors and mapping them out. So while you could just write to a flat memory map, it might not prove reliable. Also a file system offers a form of ware levelling, so that the same sectors are not being written to all the time but writes are spread out over all sectors.

Thanks for the insight on the reliability issue. I will build in some sort of CRC with multisector reliability cross checks to keep an eye on that. It seems to me that if sectors go bad, regardless of the way I use the storage I will have problems. It seems (if I stick with this technology) I simply have a choice in how I try to recover from any failures - FAT file system and it’s utilities or straight memory mapping and my own utilities.

I will give it (my own mapping) and see what happens!

Thanks again for the response!

I’m curious about what advantage you see in writing the SD card without a FAT.
Since you say you have already interfaced to the SD (with a FAT?) I assume you are aware of the FileLogger and DevicePrint libs discussed in the Exhibition section? Both seem to be a reliable and “low cost” way of writing the card, and being able to read the card from a “PC” seems like a nice perk for most applications.
As I said, I’m just curious and also want to make sure you are aware of these other methods. Rolling your own seems like a lot of work. :slight_smile:

I am planning on mapping the storage into two separate areas, one for a self wrapping log of data readings from a device I am monitoring and one area for a self wrapping flight recorder of diagnostic information to help me debug the situation if the data looks odd. By having these areas as basically circular arrays, I can let the device run forever without worrying about the storage running out.

I have not yet looked at the FileLogger or DevicePrint libs, so I will check them out, but I am guessing neither has a self wrapping feature, do they?

Anyway, thanks for pointing me in that direction and I am open to any other suggestions you might have for handling wrapping storage with an Aduino.