It seems to be that ~4GB is the max file size for SD card recording. Is that because of 32-bit int indexing or FAT32 formatting for the SD card? Is there any way to overcome that and allocate a larger file? Can we use exFAT formatting for the SD card?
Comments
Hi Sandyas,
FAT32 file size limit is 4GB. No way around that.
https://en.wikipedia.org/wiki/File_Allocation_Table#Maximal_sizes
It is remotely possible that exFAT may be supported in the future, as it is present in this standard Arduino library,
https://www.arduino.cc/reference/en/libraries/sdfat/
https://github.com/greiman/SdFat
But the Cyton firmware may not use that library, or is currently using an older version of the library without exFAT support. Also using exFAT may impact block write timing constraints, which are quite tight according to this doc. Which only supports FAT32,
https://docs.openbci.com/Cyton/CytonSDCard/
William
You could try rebuilding the firmware with the newer
sdfatlibrary. But again, this may cause failure or bad results if the time to write exFAT blocks is longer than expected in the firmware. exFAT is more complex than FAT32, hence may require more computation to calculate allocations or writing operations.Working with a larger file also makes it difficult to work with programmatically, since it would then need to be loaded into system memory when parsing the file.