-
Notifications
You must be signed in to change notification settings - Fork 13.7k
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
Component: flash parameter storage on stm32h7. Fixes #15331. #19838
Conversation
FYI @spiderkeys @taileron |
Thank you @taylornelms15 I am OOO until 7/5 I will look at it as soon as I can when I get back |
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.
@taylornelms15 - This looks good. I raised a minor nit in naming to match the reference manual.
What testing was done?
Also @davids5 let me know if there's anything I'm messing up procedurally with this request, I haven't gone through the pull request process in the past so I'm willing to take notes on process mistakes. |
@taylornelms15 - you have some CI failures
Once you fix it. Please rebase on main and fixup the commits
Then change the then This will fixup the commits. making one clean commit with the comment from 5813198 |
As per the discussion in PX4#15331, fixed issue where stm32h7 chips use hardware ECC bits in program memory that disallow overwriting 32-byte flash line that has already been written. As such, this change allows for a variant implementation of the flashfs system that uses more space in the flash entry header in order to allow an entire line to be reserved for erasing an entry. Signed-off-by: Taylor Nelms <[email protected]>
72e469d
to
71e937b
Compare
@taylornelms15 - will you be following up on this? |
@davids5 I thought I put the edits into the code and pushed it; did it not go through? I'm happy to follow up on whatever parts are missing. |
@taylornelms15 - Sorry my bad. I missed the last commit. Let see how CI likes it. |
I can't tell from the logs whether the |
@davids5 would love to wrap this up so we can use it in actual environments; is there anything else I should change? I can't tell if something on my end is blocking |
Having a build using the Flash parameters on an H7 and run on the test rack would help test this. There have been some issues with the test rack that are unrelated. @dagar - do you have a way of testing this? |
@taylornelms15 Thank you for your fix on the H743 flash params I've tested the |
…H7 board with the relevant changes to flash params
Signed-off-by: Taylor Nelms [email protected]
Describe problem solved by this pull request
Fixed #15331 allowing for onboard-flash parameter storage on STM32H7 chips
Describe your solution
I added padding to the flash entry structure such that "erasing" an entry could be done by writing an entire flash line, avoiding the issue with hardware ECC bits causing issues in overwriting the flag on each entry.
Describe possible alternatives
I looked into other flash filesystems as potential drop-in alternatives, but did not find any that, out-of-the-box, met the limitations of the STM32H7.
Test data / coverage
Tests were admittedly minimal; application target was custom board for Robotic Research, LLC applications. Parameter reading/writing confirmed functional across reboots when configured to use two or one sectors of flash program memory.
Additional context
No additional context.