I have been trying to get EFSL to store log data on an SD card. In doing so I have found some pretty odd problems which I hope perhaps someone else here has encountered before.
I am using version 2.8 but I have also added each and every patch and bug-fix that has been posted to this board. I have had great success in using EFSL for small operations but now that I'm trying to use it more frequently for data logging I am finding that it is very, very prone to crashing.
Specifically- I am logging data on an sd card. Everything about these logs is currently a variable (the frequency of writing, the amount of data to write) but in general I'm logging data in 16 different files approximately once a minute.
If I open the file system and then one file, append to it, then close the file and close the filesystem all works great. I can do this around the clock it seems without any problems at all. The problem is that I'm spending enourmous amounts of processor time to log data this way, far more than I can allow.
When I try to open and append to each of the 16 files before closing the file system (open one, write to it, close it, then open the next file, etc) the task crashes and burns after about 100 or so writes.
I am only opening the file system from one task (from one function specifically) and I'm not doing anything crazy here, it just seems that there is sime bug that doesn't allow EFSL to properly open and close multiple files without reinitializing the entire filesystem.
My heap is huge and mostly unused as is my stack, yet something eventually kills the filesystem and leaves the card unreadable until I re-format it or run SCNDSK on the computer.
I've got the following settings:
#define IOMAN_NUMBUFFER 4
#define IOMAN_NUMITERATIONS 3
#define CLUSTER_PREALLOC_FILE 1
#define CLUSTER_PREALLOC_DIRECTORY 0
Anyone else having these issues? It would be a real shame if 20 seconds out of every minute logged was used simply to store the data...
Log in to post a comment.