-
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
Add a way to store configurable parameters #24
Comments
For the API and implementation, we could take a look at the new Zephyr Memory Storage subsystem or Zephyr NVS, and regarding the backend we could start simple with an internal flash partition, and possibly switch to an external NOR flash chip. |
There are multiple ways to achive the aim of this ticket through Zephyr APIs, I will shortly describe the ones that don't seem to fit our use-cases and then move to list pros and cons of the remaining candidates. Flash Circular Buffer (FCB) - Not really sure that this would work without extensive wrapper. Also, I'm getting a vibe from Zephyr docs that this might get deprecated at some point in the future. Zephyr Memory Storage (ZMS) - Seems to be more geared towards non-erasable technologies, even though it can be used with flash memory. Even so, it has bigger metadata overhead than any of the flash alternatives. File in LittleFS- Probably impractical as we'd need to have bulky logic to serialize and parse the config files. I also see some architectural problems, with most of the other stuff having dependencies to this "config storage" component/library. So essentially, to me it seems the choice boils down to two alternatives: Pros:
Cons:
Pros:
Cons:
I'm open to discussion on this, but the sole benefit of having option to store to uSD as well is a decisive factor for me. I see some use cases where this comes in handy:
|
I find the argument for interchangeable storage backend convincing, but there are some caveats.
|
|
So far, it does seem reasonable to go with the settings API. We can move over chips with either larger internal flash size or more convenient page size layout to use the internal flash with a NVS backend down the road and have the SD card as a fallback. |
We need a way to store configurable parameters, such as filter coefficients, mixer values, default control modes and more.
These are essentially key-value mappings which don't change very often and don't require high speed or low latency access/modification.
We need to figure out both the storage medium as well as the format and API for storing and reading these.
The text was updated successfully, but these errors were encountered: