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

All reset flags cleared by xboot #23

Open
stevemarple opened this issue Oct 12, 2015 · 0 comments
Open

All reset flags cleared by xboot #23

stevemarple opened this issue Oct 12, 2015 · 0 comments

Comments

@stevemarple
Copy link
Contributor

Clearing all reset flags in MCUSR (for ATmega devices) prevents the user application from finding out the cause of the MCU reset.

I have some hardware where an LED displays some debugging information for a few minutes following a reset, but only if the reset was caused by a human (power-on, JTAG and external resets). To preserve battery life resets caused by the watchdog timer and brown-outs do not enable the LED. Pull request #22 preserves all reset flags except the watchdog which must be cleared. However when all flags are zero the user application can deduce that the cause was the watchdog timer.

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