This question from my team member, he cannot verify id yet, so I upload this topic instead of him.
---
Hi forum.
I'm studying .NET MF and my board is netduino plus 2.
I tested safety in sdcard data access when external interruption is occured.
My program follows like below:
Create new file -> Write random data not a byte, about 30 bytes
Every my own write operation include open and close.
I made netduino program halting when it perform writting operation.
I use this method while these 3 kinds of exceptional cases.
1) turn off the power supply
2) press the button 'reset'
3) eject sdcard unexpectedly.
Sometimes, my files are stored naturally. but, almost files doesn't.
There is no damage in files.
In the process of test, I found one thing strange.
Files with enough writing time(recorded about 19kb and more than) were stored almost without damage.
But, files with tiny writting time were not stored. WHY?
So, I browse many site for information related with block device, read/write buffer etc.
Still I don't know it yet. Help me.
This is my write source in infinite loop.
using (TextWriter tw = new StreamWriter(MyManager.FileName, true)){ tw.WriteLine(Content); tw.Close();}Debug.Print(Content);
PS. What kind of filesystem for sdcard is general ? in netduino plus 2. FAT16 or FAT32.