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

resolves #112 Restart sleep if WDT not what awakened CPU. #113

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MojaveTom
Copy link

A volatile flag is set in the WDT ISR to show that the WDT interrupt
happened. The flag is cleared in functions when not SLEEP_FOREVER
before the interrupt is enabled. When an interrupt awakens the CPU,
the flag is checked and the CPU put back to sleep if the WDT interrupt
was not the cause of the awakening. For the case of SLEEP_FOREVER,
the flag is set to "true" before the CPU is slept, and the functions
return when awakened by any interrupt.

A volatile flag is set in the WDT ISR to show that the WDT interrupt
happened.  The flag is cleared in functions when not SLEEP_FOREVER
before the interrupt is enabled.  When an interrupt awakens the CPU,
the flag is checked and the CPU put back to sleep if the WDT interrupt
was not the cause of the awakening.  For the case of SLEEP_FOREVER,
the flag is set to "true" before the CPU is slept, and the functions
return when awakened by any interrupt.
@MojaveTom
Copy link
Author

Apologies for the white-space variances.

I suggest that the sources be consistent on white-space policy. The current sources have both tab and space on the same line.

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.

None yet

1 participant