Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SD Card (fs module) does not reset when issuing reset(); #200

Closed
gfwilliams opened this issue Jan 28, 2014 · 1 comment
Closed

SD Card (fs module) does not reset when issuing reset(); #200

gfwilliams opened this issue Jan 28, 2014 · 1 comment

Comments

@gfwilliams
Copy link
Member

From @ticpu:

I tried the FS module and it was working just fine until I ran very busy timers. Then it wasn't able to read/write files anymore. I issued reset(); and tried again without any success, afterward I went to the computer, fsck'ed the SD card with no error and noticed a file that was in fs.readdir(); missing from the computer listing.
I tried again on the Espruino and the missing file was still appearing, I then tried readdir() without any SD card and it seems to list the same files over and over again ignoring the fact that there is no card.
I finally was able to recover by using the reset button followed by BTN1 to ignore loading from memory.
I did a quick check on the code jswrap_fat.c but I'm not at ease with JsVars yet, could it be some sort of static var that reuse the same space in memory?

http://forum.espruino.com/conversations/507/

@gfwilliams
Copy link
Member Author

Yes, there are some static vars (specifically jsfsFAT) that need resetting.

I guess we just need a jsfsKill to go along with jsfsInit - and need make sure that it's called from jsiSoftKill.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant