MiniOS7 file system

Features

MiniOS7 file system, MFS, offers a rugged alternative to mechanical storage systems. Designed for the 64MB NAND flash memory, MFS implements a reliable file system with C language API for embedded data logger applications on MiniOS7.

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.

upad-7186ex-fd-mfs_app

Applications

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

Specifications


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 Name 12 bytes max. (case sensitive)
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 Yes
If an unexpected reset or power loss occurs, closed files, and files opened 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.
Calling mfs_EnableWriteVerification and mfs_DisableWriteVerification can change the setting.
Max. Length of Writing Data 32767 bytes
Max. Length of Reading Data 32767 bytes

Hardware Supported

  • μPAC-7186EX-FD (with 64MB Flash Memory)
  • μPAC-5000-FD Series (with 256MB Flash Memory)
  • iP-8000-FD Series (with 256MB Flash Memory)
Note: All 31 bytes of NVRAM are occupied by the MFS.

Resource Download:

For μPAC-7186EX-FD and μPAC-5000-FD Series

Item Description Location on CD-ROM
Document User's manual http://ftp.icpdas.com/pub/cd/8000cd/napdos/7186e/document/
http://ftp.icpdas.com/pub/cd/8000cd/napdos/upac-5000/document/
http://ftp.icpdas.com/pub/cd/8000cd/napdos/ipac8000/document/
Development Tools Turbo C 2.01
TurboC++ 1.01
Borland C++ 3.01
N/A
SDK MFS_Vxxx.Lib & MFS.h http://ftp.icpdas.com/pub/cd/8000cd/napdos/7186e/demo/basic/bc_tc/lib/
http://ftp.icpdas.com/pub/cd/8000cd/napdos/upac-5000/demo/basic/5000_fd/lib/
http://ftp.icpdas.com/pub/cd/8000cd/napdos/ipac8000/demo/basic/ip-84x1_ip-88x1/lib/
Demo programs C source code http://ftp.icpdas.com/pub/cd/8000cd/napdos/7186e/demo/basic/bc_tc/7186fd/
http://ftp.icpdas.com/pub/cd/8000cd/napdos/upac-5000/demo/basic/5000_fd/
http://ftp.icpdas.com/pub/cd/8000cd/napdos/ipac8000/demo/basic/ip-84x1_ip-88x1/256mb_flash/
ICP DAS USA,Inc.