7 years, 11 months ago.

best way to preserve state through deep sleep?

hi,

i am using the mdot with deep sleep for longest battery life:

deep sleep

         dot->sleep(sleep_time_seconds, mDot::RTC_ALARM_OR_INTERRUPT, true);

now i am wondering what the best way is to preserve some state (couple of bytes) through the wake-up/restart?

there seem to be backup registers (writeUserBackupRegister, 10x 32 bit?) and user files in flash (saveUserFile) and maybe other ways?. for things like counters and stuff that change all the time: is it a concern to keep writing to flash?

thanks, frank

I've been trying to get this to work:

dot->writeUserBackupRegister

But no luck yet.

Did you ever have any luck?

It's amazing that, almost 2 years later, nobody has shared this solution.

posted by Pete Hoffswell 31 Jan 2018

1 Answer

6 years, 2 months ago.

I've been trying to get this to work:

dot->writeUserBackupRegister

But no luck yet.

Did you ever have any luck?

It's amazing that, almost 2 years later, nobody has shared this solution.