MiniOS7 File System Library

MiniOS7 file system, MFS, provides a more reliable file system than traditional hard disk, SD card, which is not affected by vibration and unexpected power failure. For 64MB/256MB NAND flash memory, MFS implements a reliable file system with C language API to make data logging on MiniOS7 embedded controllers easy.

ITEM DESCRIPTION
Disk Number 2 (disk A and B)
Disk Size 1/2 size of the flash memory size
File Number 456 files max. for each disk
File Size Disk size max. for each file
File Operation Modes 1. Read only.
2. Write only: Creates a new file to write data, or overwrite a file. (If the file is already exit)
3. Append: appends data to a file.
File Handle 10 max. for each disk.
For read mode: the 10 file handles can all be used for reading operation on each disk. Total 20 files can be opened for reading mode.
For write and append mode: only 1 file handle can be used for writing operation on all disks.
Writing Verification Yes. Default is enabled.
Calling mfs_EnableWriteVerification and mfs_DisableWriteVerification can change the setting.
Automate File System Recovery If an unexpected reset or power failure occurs, the closed files and files opened which for reading are never at risk. Only data written since the last writing operation (mfs_WriteFile, ) might be lost.
When the file system reboots, it restores the file system to its state at the time of the last writing operation.
Writing Speed mfs_WriteFile:
147.5 KB/Sec (verification enabled)(default)
244.0 KB/Sec (verification disabled)
mfs_Puts:
142.1 KB/Sec (verification enabled)(default
229.5 KB/Sec (verification disabled)
Reading Speed mfs_ReadFile:
734.7 KB/Sec
mfs_Gets:
414.2 KB/Sec
Max. Length of Writing Data 32767 bytes
Max. Length of Reading Data 32767 bytes
  • 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

    When an unexpected reset or power failure occurs, the closed files, and files opened which 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.

     

  • Log data with timestamp
  • Log data and forward via the Ethernet

This package contains MFS libraries and demo samples.

FILE NAME RELEASE DATE SIZE DOWNLOAD
mfs.rar 2015/02/04 137 KB

File Structure

This package consists of the following folder and files:

mfs.rar

lib folder for MFS Libraries

FOLDER DESCRIPTION
- MFS Libraries
MFS.h
MFS_V224.LIB
MFS_History.txt

demo folder for MFS Demo Samples

DEMO DESCRIPTION
Utility Utility for the MiniOS7 File System. Operations Include Dir, Read, Write, etc.
MFS_QA Quality assurance program for the MiniOS7 File System.
Including function test, read/write performance test.
Puts How to write a string to a file in the 64MB flash memory.
Gets How to get a string from a file in the 64MB flash memory.

Related Products

uPAC-5001-FD / uPAC-5001D-FD

uPAC-7186EX-FD / uPAC-7186EXD-FD

Related Resources

uPAC-5000 User Manual

uPAC-7186 User Manual

MiniOS7 API Functions Reference Manual