I'm having trouble understanding how they can do an erase for every write since that would erase the data already written to the sector while we're trying to append data in the sector. Thanks! Harold > Harold, > > It's the sector erases. > > Normally, an excellent way to reduce erase counts would be to write a > bunch of 0xFFs, use 0xFF or 0xFFFF as an end of record marker, and add > records using writes only. > > I tested a few SD cards and I determined that they perform erases at > every single write, no matter what data is written. I'm not clear off > the top of my head how I determined that, but I was quite convinced at > the time. The behavior is probably vendor dependent and unreliable anyway= .. > > ... just one more way SD cards suck for embedded. It's a terrible > standard. > > > Darron > > > On 4/13/15 8:16 AM, Harold Hallikainen wrote: >>> If you hammer an SD card writing a byte at a time (okay a line at a >>> time) >>> then you kill the writes. >> Is there really a problem with writing a byte or line at a time? It >> seems >> the issue is the number of times a sector gets erased. On several >> systems >> I've designed, I log to SPI flash. I have a function prototyped like >> this" >> >> UINT32 ExtFlashStreamProgram(UINT32 Addr, UINT8 *pData, UINT32 NumBytes) >> >> This returns the next address that would be written. If a byte is about >> to >> be written to the first address of a sector, the sector is erased, then >> programmed. My logs typically take several sectors (logging goes to >> everything not used for something else). >> >> So, is the issue the number of write instructions, or is it the number >> of >> sector erases? >> >> Thanks! >> >> Harold >> >> > > -- > http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > --=20 FCC Rules Updated Daily at http://www.hallikainen.com - Advertising opportunities available! Not sent from an iPhone. --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .