I am using LPC1788 with Keil MDK4 along with RLFlash FS[4GB External NAND] & RTX Kernel. In my application i use the NAND Flash to store TEST Reports & activity logs.
Each report is stored in individual file & there are 500 reports in each folder with a max count of 5000 reports[10 folders].data is written only once in the report file[open->write->close]
In the activity log file, the data is appended.In my case, i have appended data to the file around 10000 times[~50 bytes per append].Every time after appending i close the file & then reopen the next time.
Now, i am unable to access any files in the NAND.When i read the directory, the files can be seen, but when i try to open it, the system hangs.infact, the debugger that i am using also hangs[ULINK2] & i have to reset it as well.
I have read somewhere that it is not a good practice to append small data to files again & again..
Please guide..!
Hello Zack,
As it was an overnight test, i could not check the return value..i will retest & try to keep a track of return values.
Can u please tell what is the size of a cluster for FAT32 Format.In my case, the cluster size is 16KB.But as per specifications i think it should be 4KB.Am i misunderstanding something here?
Thanks, Punit
Hello Punit,
FAT32 does not have a fixed cluster size. Several cluster sizes are accepted. The cluster size can depend on the memory device and its storage size. What type of NAND flash is the project using?
If the specification/datasheet for the NAND flash says 4KB, then use 4 kilobytes.
Thanks, Zack
Hello,
We have just migrated to the Keil mdk version 5.Already migrated version 4 projects to version 5.
1]Currently we use RL-FlaashFs.But from version 5 onwards the "File system Component" is being used.Is it worth changing to this new system?Can it help resolve the above issues
2]Also,there is very heavy focus on CMSIS-RTOS.We use Keil RTX at present? Should we change that as well?
1) We haven't really narrowed down the cause, so it is hard to know if a change in middleware would resolve the issue. In general, upgrading does give the file system the best chance for it to work well. There have been added features and bug fixes, over the years, just like most software layers. It may help, if you are really stuck. The most important reason to upgrade is that the File System Component is actively maintained, and you'd have access to Keil tech support, who can help and try to resolve the issue with you, by answering questions about the tools, in a better format than a forum. You'd also get access to the Event Recorder to get more detailed feedback during debug, if using a recent version of the file system (Middleware v7.3.0+). Feel free to mention this forum to the support engineer, so they know what has already been covered.
2) The File System Component requires a CMSIS RTOS. We also have a migration guide, if you are moving from the earlier RTX to CMSIS RTOSv1-compliant RTX: http://www.keil.com/appnotes/files/apnt_264.pdf