On Tuesday, October 30, 2012, Neil wrote: > I'm writing ongoing CSV data (logging) to an SD card, and wondering if > there are any guidelines for when to periodically flush the data to the > card. Should I flush after every line of data? Or should I flush after > some amount that ties to block-size, etc? Is there any good doc > floating around the web that has good guidelines or best practices for > this? > I don't think it matters either way. Optimizing flushing is done to speed up I/O and minimize wear on the SD card when possible. But due to the nature of your data and the way it's being written, there's no point delaying a flush. I would flush after every block or so and opt for simplicity since there's absolutely nothing to gain by trying to optimize I/O. Partly related, I still can't believe that the SD card interface spec hasn't been leaked yet. Or I just haven't found it. --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .