-
Notifications
You must be signed in to change notification settings - Fork 0
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
setWatchdog safety checks #63
Comments
Also, the RTC DS1337C specification and API source code don't match Libelium's documentation. It looks they did something hardware in v15 to implement a different behaviour. From the specification and source code From the Libelium's documentation Test we can do:
|
Pushed Output is:
This is bad (but expected) news. What we're testing here is what happens if for some reason the RTC goes back in time. For instance in the case the RTC time is reset to 00/01/01 the watchdog won't trigger until a far distant future. Though if the time is reset probably the alarms will reset as well (that's asnother test). This has been tested with firmware |
This is what i get. J#
RTC time: Tue, 19/04/02, 12:06:20 RTC time: Mon, 19/04/01, 00:00:55 Will reboot at next 00s or wait for the absolute date? Inside infinite loop. Time: Mon, 19/04/01, 00:00:55 |
Thanks! It's the same behaviour. |
A new test, with the same sketch. This one tests what happens when both alarms are triggered at the same time.
The watchdog wins. EDIT: Tests by John with |
TODO:
|
Many changes have been done already, mostly details. Here a couple of highlights:
Updated and extended TODO list:
|
Just like in
WaspPWR::deepSleep
, after setting the alarm, get it and verify the values are as expected, if they're not then return an error.Also, in
WaspPWR::deepSleep
I thinksleep_disable()
should be called in case of an error.The text was updated successfully, but these errors were encountered: