For a while I was unsure of why the data on the SD would sometimes be corrupted.
I finally found the problem: If I’m writing on the SD (I’m unsure about reading) WHILE deploying the application, what happens is that there is a reboot done at that moment.
Would it be possible to unmount the SD Card before rebooting, OR maybe a Soft shutdown first (Maybe a DoBeforeShutdown event?)
For now what I do is, I try to never deploy while there might be operation on the SD card, but its not always possible.
To fix a corrupted SD Card, I have to put it in a PC, type chkdsk /f for it to fix the issues.
Also is there a function in netMF to fix a corrupted SD card (or to check it)?
Finally, on very rare occasion, I even had double filename in the same directory! This is very weird for example in windows explorer I see 2 log123.txt, then I have to delete both to fix that particular issue.