-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add abstraction for storing persistent variables #202
Comments
Edit: We don't have time for this additional complexity, and the test memory section of the FRAM can give us similar if not better information anyway. |
We also need to make sure that all persistent variables are repaired often enough such that only a single one of the three redundant copies of the values gets corrupted by radiation. Edit: I think all (or at least most) of the persistent variables are part of the telemetry data/beacon, therefore they are accessed every 30 s which surely is enough. |
As explained in #294, we need a fallback mechanism in case the FRAM does not work. This means that every persistent variable also needs to cache the value three times in RAM. If the FRAM works, data is read from and written to it. The data is also always written to the cache, but only when the FRAM doesn't work is it also read from the cache. |
Description
Persistent variables are part of the persistent state. They are very important because they contain things like the
activeFirmwareImage
. Therefore, they should be implemented with a self-healing mechanism. I suggest storing each variable three times on the FRAM and every time a variable is read the three values are compared and a potentially wrong value is overwritten.There must also be a way to easily place multiple persistent variables one after the other on the FRAM without overlapping and manual address calculations.
The text was updated successfully, but these errors were encountered: