Watchdog Trigger Corrupts Filesystem
-
I've started using the watchdog timer routines to protect my program from lockups, but what I have discovered is if the watchdog is triggered and resets the processor the file system is corrupted (reformatted?).
Here's what the os.listdir() shows after the watchdog reset. All my program files are gone.
['\x00\x00\x00\x00\x00\x00\x00\x00.\x00\x00\x00', '\x00\x00\x00\x00\x00\x00\x00\x00.\x00\x00\x00', '\x00\x00\x00\x00\x00\x00\x00\x00.\x00\x00\x00', '\x00\x00\x00\x00\x00\x00\x00\x00.\x00\x00\x00',
<etc.>
'\x00\x00\x00\x00\x00\x00\x00\x00.\x00\x00\x00', 'main.py', 'sys', 'lib', 'cert', 'boot.py']Has anyone else seen this problem?
-
Hi @tlanier, which Filesystem are you using FAT or LittleFS?
-
Hmmmm - this might also explain why I get a lot of sync problems - "project status unknown, resync all (or so)" in pymakr.
-
@iwahdan
I was using the FAT file system in stable v1.18.2. I've now switched to the LittleFS in the beta v1.20.0.rc7 and the problem so far has not reappeared. -
Could you simply feed the WDT while you write until you flush?
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login