Charles Manning! sorry to border you with that silly question! I found the answer just one day after I send out the question. I am miss leading by the old doc, it say the close function is the only way to sync the file data to flash. Thanks' for your goodness anyway! ======= 2009-06-19 10:54:08 您在来信中写道:======= >Hello > >Sorry about taking long to answer this. Unfortunately this ended up in my spam >folder. > > >On Monday 01 June 2009 18:16:37 杨标(Vinge) wrote: >> Hi all: >> I just port yaff2 to ucos in direct mode with a 2k page 512m nand flash. >> But as user of my device like to just shutdown the power. yaffs2 file >> system is most likey not been unmount! > >> Is there a method to sync cache to >> nand? Or how can I just provent lost the cache data to be lost in poweroff? >> Should I close the file every time after write to it? > >If you close a file then it will be fully flushed to flash. >yaffs_flush() will also flush the file without closing it. > >> Or event unmount and remount the dev? > >You do not need to do that. > >-- Charles = = = = = = = = = = = = = = = = = = = =