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

Clear SP flash errors we should never see #1905

Merged
merged 2 commits into from
Oct 24, 2024
Merged

Clear SP flash errors we should never see #1905

merged 2 commits into from
Oct 24, 2024

Conversation

labbott
Copy link
Collaborator

@labbott labbott commented Oct 18, 2024

The STM32H7 is haunted/contains an errata where the CPU may speculate into a system area (0x1ff0_0000) and trigger a flash error normally only seen when security features are enabled. This is not an official errata but seems to be well(?) reported

https://community.st.com/t5/stm32-mcus-products/spurious-rdperr-and-rdserr-when-all-protection-and-security/td-p/279852 zephyrproject-rtos/zephyr#60449

One suggested workaround is to add an extra MPU region which marks The Danger Zone as NX. For the way hubris is designed this isn't plausible. Instead clear any errors before we attempt to write to flash.

Copy link
Collaborator

@cbiffle cbiffle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ugh github won't let me comment on line 136 of update server main.rs, but: how about removing lines 136-142 where rdserr/rdperr are converted into a failure?

Otherwise looks good.

The STM32H7 is haunted/contains an errata where the CPU may
speculate into a system area (`0x1ff0_0000`) and trigger a flash
error normally only seen when security features are enabled.
This is not an official errata but seems to be well(?) reported

https://community.st.com/t5/stm32-mcus-products/spurious-rdperr-and-rdserr-when-all-protection-and-security/td-p/279852
zephyrproject-rtos/zephyr#60449

One suggested workaround is to add an extra MPU region which
marks The Danger Zone as NX. For the way hubris is designed this
isn't plausible. Instead clear any errors before we attempt to
write to flash.
Copy link
Collaborator

@mkeeter mkeeter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved, but is there a reason why we're both clearing the errors and ignoring the errors?

@labbott
Copy link
Collaborator Author

labbott commented Oct 24, 2024

Approved, but is there a reason why we're both clearing the errors and ignoring the errors?

Seemed more comprehensive

@labbott labbott enabled auto-merge (rebase) October 24, 2024 17:41
@labbott labbott merged commit 7fcfe60 into master Oct 24, 2024
106 checks passed
@labbott labbott deleted the clear_err branch October 24, 2024 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants