Skip to content

2.x: handle bad power on reset better #802

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

Merged
merged 1 commit into from
May 4, 2018

Conversation

dhalbert
Copy link
Collaborator

@dhalbert dhalbert commented May 3, 2018

Fixes #280.

  1. Do not write boot_out.txt if there's no boot.py or equivalent, and the version info in boot_out.txt will not change.
  2. If there is a boot.py, wait 1.5 seconds before running it and writing its output to boot_out.txt.
  3. Add storage.erase_filesystem() for ease of erasing filesystem (already in 3.0).
  4. Change BOD33 brownout threshold to 2.77V for SAMD21.

This makes bouncy switched and plugged power connections much less likely to erase the filesystem.

The main.h file is a bit silly, but it's not worth refactoring init_flash_fs() out of main.c now, since 2.x is in maintenance mode.

I will port this to 3.0.

@dhalbert dhalbert requested review from tannewt, ladyada and kattni May 3, 2018 21:36
Copy link

@kattni kattni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was able to consistently wipe the file system when attempting to do it on purpose the last time we had this issue. I again attempted to wipe the file system and was entirely unsuccessful. I tested with both a lipo battery and the AAA battery pack. Great job getting this fixed!

Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent! This is an awesome improvement!

@tannewt tannewt merged commit 3814e97 into adafruit:2.x May 4, 2018
@dhalbert dhalbert deleted the 2.x-filesystem-work branch May 4, 2018 20:09
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

Successfully merging this pull request may close these issues.

3 participants