AnsweredAssumed Answered

FATFs SDHC issue (doesn't write past 4GB)

Question asked by dachancellor on Mar 18, 2014
Latest reply on Mar 31, 2015 by Daniele Cortellazzi

I have encountered a problem which I believe is related to the implementation of FATFs.

(I use PE components provided by Erich Styger, so I'm not sure if these are ones that come with CW or I have downloaded from Erich's site.)


I have a program that continuously writes 8MB data files.

I've noticed on multiple occasions, that once we reach 4GB of data (512 files), the next file will not write (Assertion failed error), and the file system gets corrupted.

It seems like it is wrapping around and overwriting the FAT instead of correctly continuing to the next location.


Any ideas ?

Has anyone written more than 4GBs worth of data to an SD card ?
I've had this error occur on multiple SD cards, of different brands and sizes (32/64GB).

I have written past the 4GB mark on a card using the SDHC directly without FATFs.

FATFs is also quite popular, so I would assume the 4GB limit is not inherent to that library, and that the implementation of it is where the issues lies.


Thanks in advance!