Can dynamically read/write/append data to files continuously
The NAND flash memory is divided to 2 disks, each disk can store 456 files max. You can create files and then write/append data to it. Then read data in the file and forward to PC for posted analysis when the data is complete collected.
Provides C language API
Following functions are similar to the functions that turbo C and Borland C provide. This helps users short the learning of MFS.
mfs_OpenFile, mfs_CloseFile, mfs_ReadFile, mfs_WriteFile, mfs_Gets, mfs_Puts, mfs_Getc, mfs_Putc, mfs_EOF, mfs_Seek, mfs_Tell, mfs_DeleteFile, mfs_DeleteAllFiles, mfs_GetFileInfoByName, mfs_GetFileInfoByNo, … etc.
Writing Verification
Data written to flash memory are read back to verify its correction.
The function can be disabled to increase writing speed. But for data safety, we recommend users to enable the function.
Automate file system recovery in the event of unexpected reset or power losses
When an unexpected reset or power loss occurs, closed files, and files opened for reading are never at risk. Only writing data has risk to be lost.
MFS writes data to the flash memory just after executing writing functions (such as mfs_WriteFile, mfs_Puts, mfs_Putc, etc.). And meanwhile, MFS stores important information (such as file name, pointer, flash location, etc) to NVRAM (non-volatile random access memory).
When an unexpected reset or power loss occurs, only data written since the last writing operation (such as mfs_WriteFile, mfs_Puts, mfs_Putc, etc.) could be lost. After the MFS reboots, it refers the information stored in the NVRAM to restores the file system. The un-closed writing file will be automatically closed and all its data written before the last writing operation will be safe. |