Skip to content
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 headers to NVM data structures #17

Open
janakj opened this issue Mar 21, 2022 · 1 comment
Open

Add headers to NVM data structures #17

janakj opened this issue Mar 21, 2022 · 1 comment
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@janakj
Copy link
Collaborator

janakj commented Mar 21, 2022

At the moment, LoRaMac structures are restored from NVM if their CRC32 checksums match. We should also add a header to each data structure with the name of the structure, version, and size. This would make it possible to create NVM parts with sizes that are independent of the size of the LoRaMac NVM structure stored in it. This would essentially become a rudimentary filesystem.

If the header is updated if and only if the entire structure has been saved, we could implement atomic NVM structure writes. This would require that each such structure has two independent locations within the EEPROM.

@janakj janakj self-assigned this Mar 21, 2022
@janakj
Copy link
Collaborator Author

janakj commented Mar 21, 2022

The first part of this is implemented: fixed EEPROM partition so that all data structures have some wiggle room and it all fits into a single EEPROM bank.

In the future, support for atomic writes will be added. We will use both EEPROM banks to implement that. Writes will go into the part in the inactive bank and upon a successful write the active/inactive status of the two parts will be switched.

@janakj janakj added the enhancement New feature or request label Mar 26, 2022
@janakj janakj added this to the Release 1.5.0 milestone Jun 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant