-
-
Notifications
You must be signed in to change notification settings - Fork 894
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
Littlefs (or similar) datetime backup #87
Comments
Yes, good idea! We can also write the current date/time to flash just before issuing a reset (after a successful OTA, for example). |
I have a proposal, perhaps we can create a partition in the FS for the SPI flash such that is some sort of EEPROM emulation for non-volatile data, eg. the request for time backup by @Avamander or user settings and other future things... 4Kb of storage should be ample for such a thing.. |
There's no FS in the SPI flash for now. The first 115200KB are used by the boot graphics, the rest is empty. As @Avamander wrote, I think the best would be to use a embedded FS like littleFS to manage the reste of the SPI flash space. |
What about RAM retention? |
Ram is volatile memory right? |
Yes. There are sleep modes where RAM contents are kept (with extra power used) and methods to keep some amount of RAM untouched. |
Well what if the device runs out of battery? |
If it runs out, it looses it... simple as that. That's when you would revert to the datetime stored in flash memory. But for reboots, either manual or update related, storing it in RAM would be perfect as it would save a write to the flash memory and preserve the time across the reboot (bar the bootloader/DFU update delay). |
This could not only be used for date and time but also for other data like steps counter and last hrm result. |
I think there is a discussion for this , we could of course use this for a whole lot of other things. |
This has been implemented in #595 and can be closed. |
Remove unused files
It would be nice if the watch kept track of at least the current date on it's own.
Writing a new date to a file once a day should be okay in terms of wear, but it'd make the watch much more useful if it needs to reboot in a situation where there's no phone nearby. Plus it'd make date look nicer during testing which constantly resets it.
The text was updated successfully, but these errors were encountered: