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
Added parameter backup region on H7 with 32k FRAM #16304
Conversation
.... how did you manage to get this to conflict already? :-) |
Thanks Tridge! |
when HAL_STORAGE_SIZE == 32768 then add: - 1280 more bytes for params - double waypoint space - add a parameter backup area
if header on primary parameter storage is corrupt then restore from backup
63fbd95
to
bf4f630
Compare
yeah ... forgot to rebase first :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good in terms of what it is trying to accomplish.
IMO the extra space allocations for fence and mission do not belong in this PR. They might be good changes but they're unrelated and deserve discussion.
happy to discuss, but I think given the structure of StorageManager that allocating some more space for params and mission is worthwhile now if we are going to start using the 2nd half of the FRAM |
in the one example of a STRG_BAK that we have showing this issue, I've confirmed that the corruption is confined to the first 48 bytes of the parameter storage. |
When can it be merged? Will be a life saver. Reset have been such a PITA. |
Is it valid for f7 based like cuav v5+ |
You always need more. (it doesn't matter what you are talking about, whenever there is a hard limit - you always need more). |
This expands the FRAM storage region for H7 boards to 32k, and adds the following:
This fixes issue #13134
The backup param storage area is continuously updated along with the main param storage. On startup if the primary storage area has a corrupt header then the backup is used, copying it over the primary.
Confirmed OK on:
I've also tested that setting FORMAT_VERSION=0 does reset properly, so no user visible behaviour change
I've confirmed with @pkocmoud that mRo use 32k FRAM