Git Product home page Git Product logo

Comments (11)

ilutchenko avatar ilutchenko commented on May 18, 2024 3

What about RAM retention?
We can store time in a certain part of RAM that will be excluded from startup initialization.
And after reboot time can be restored from this part of memory.
https://devzone.nordicsemi.com/f/nordic-q-a/272/ram-banks-ram-retention

from infinitime.

JF002 avatar JF002 commented on May 18, 2024 1

Yes, good idea! We can also write the current date/time to flash just before issuing a reset (after a successful OTA, for example).

from infinitime.

JF002 avatar JF002 commented on May 18, 2024 1

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.
I think littlefs provides a higher level and easier to use API than a simple EEPROM.
We would be able to use this FS to store configuration parameters, data time, graphic assets, heart rate values,...

from infinitime.

ObiKeahloa avatar ObiKeahloa commented on May 18, 2024 1

Well what if the device runs out of battery?

from infinitime.

ZephyrLabs avatar ZephyrLabs commented on May 18, 2024

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..

from infinitime.

ObiKeahloa avatar ObiKeahloa commented on May 18, 2024

What about RAM retention?
We can store time in a certain part of RAM that will be excluded from startup initialization.
And after reboot time can be restored from this part of memory.
https://devzone.nordicsemi.com/f/nordic-q-a/272/ram-banks-ram-retention

Ram is volatile memory right?

from infinitime.

Avamander avatar Avamander commented on May 18, 2024

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.

from infinitime.

pfeerick avatar pfeerick commented on May 18, 2024

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).

from infinitime.

myxor avatar myxor commented on May 18, 2024

This could not only be used for date and time but also for other data like steps counter and last hrm result.

from infinitime.

ObiKeahloa avatar ObiKeahloa commented on May 18, 2024

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.

from infinitime.

kieranc avatar kieranc commented on May 18, 2024

This has been implemented in #595 and can be closed.

from infinitime.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.