In the course of troubleshooting my design, I found what appears to be a random and somewhat rare event (1 in 100 tests). The issue is while writing the same source data to two different file handles and closing the files successfully at the end of the data stream, I have the rare occurrence of one full sized file and one much shorter file (5,000 KB and 1350 KB as an example).
I write to an SD card using an I2C interface. I store chunks of data from the stream using a microprocessor and then use the write command to tell the ALFAT to write in 2048 Byte payloads, switching back and forth between the files. My ALFAT is at version 2.0.0
While this is a rare event, I cannot afford losing half of 1 out of 100 data sets. Any help would be great. Thanks