I trying to run the EFFS-BASIC sample program on a NANO54415. I'm using v2.6.7 of NBEclipse. I have a 1Gb microSD chip plugged into the microSD socket.
The first library call fails:
rv = f_getfreespace( EXT_FLASH_DRV_NUM, &space );
with error F_ERR_TASKNOTFOUND.
I have no idea what that means.
Sample program EFFS-BASIC
-
- Posts: 630
- Joined: Mon May 12, 2008 10:55 am
Re: Sample program EFFS-BASIC
So, the first time through the program, it works. When I move the start of the while loop in usermain() from just spinning on a 1-second delay to the just before DisplayEffsSpaceStats(), so that it repeatedly runs through the SD card test once a second, it fails. Is that because I have to call f_enterFS() (which the comments say call once) and/or InitExtFlash() again with each loop?
Steve
Steve
Re: Sample program EFFS-BASIC
Does the unmodified example work correctly?
Re: Sample program EFFS-BASIC
umm... you only need to call f_enterFS() once. However, you must do this AFTER the last call to OSChangePrio in the task. Also, there is a maximum number of tasks that can be registered at a time (I believe that the default is 5 or 10). InitExtFlash() should also only be called once.
If you're still having the issue, would you mind posting your relevant startup code?
-Dan
If you're still having the issue, would you mind posting your relevant startup code?
-Dan
Dan Ciliske
Project Engineer
Netburner, Inc
Project Engineer
Netburner, Inc
Re: Sample program EFFS-BASIC
If you simply moved the "do while()" to before "DisplayEffsSpaceStats()" in the "EFFS-BASIC" example program, then it should behave just as you said: on the first loop, it runs DisplayEffsSpaceStats(), and that works; it then unmounts the file drive with "UnmountExtFlash();" and closes the file system with "fs_close();". On the next time through the loop, there is no drive or file system to process and so you get the error.
Try copying "DisplayEffsSpaceStats();" and "DumpDir();" into the loop just before the OSTimeDly(...) line. That way the file system stays open.
Ed
Try copying "DisplayEffsSpaceStats();" and "DumpDir();" into the loop just before the OSTimeDly(...) line. That way the file system stays open.
Ed