FFS fsclose required?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

FFS fsclose required?

ソリューションへジャンプ
1,817件の閲覧回数
kubiznak_petr
Contributor V

Hi,

can someone please explain how to correctly write data to NAND flash using the FFS subsystem? In the mfs_nandflash demo, I can open the filesystem and read/write data from/to it, everything works fine. The only problem is that written data is not persistent unless I close the filesystem (fsclose) after the changes performed, i.e. if I simply write a file and turn off the power, the change is gone after I turn the power on again.

So, if I want to write a file, do I always have to close the filesystem to make the changes persistent? That doesn't seem to me like a good solution (by the way it also looses the point of MFS generality then). Or is this just a kind of misbehaviour on my side (maybe a wrong configuration)?

ラベル(1)
タグ(3)
0 件の賞賛
返信
1 解決策
1,491件の閲覧回数
LuisCasado
NXP Employee
NXP Employee

Hi Petr,

Have a look at the new nand ffs example in MQX 4.1.1. MQX 4.1.1 release notes:

MQX-4216 The FFS NAND Flash FFlush malfunction issue is fixed. The IO_IOCTL_FLUSH_OUTPUT ioctl is introduced to flush media on FFS NAND memory and make sure that the flush process is complete. The low-level flush on MFS is implemented when closing the file handler.

Now you have a procedure of flushing data without closing the file system  "return_code = fflush(filesystem_handle);”

Luis

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
1,492件の閲覧回数
LuisCasado
NXP Employee
NXP Employee

Hi Petr,

Have a look at the new nand ffs example in MQX 4.1.1. MQX 4.1.1 release notes:

MQX-4216 The FFS NAND Flash FFlush malfunction issue is fixed. The IO_IOCTL_FLUSH_OUTPUT ioctl is introduced to flush media on FFS NAND memory and make sure that the flush process is complete. The low-level flush on MFS is implemented when closing the file handler.

Now you have a procedure of flushing data without closing the file system  "return_code = fflush(filesystem_handle);”

Luis

0 件の賞賛
返信
1,491件の閲覧回数
kubiznak_petr
Contributor V

Perfect Luis, that's exactly what I wanted. Thank you.

0 件の賞賛
返信