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

Fix flash error flag clearing #489

Merged
merged 1 commit into from
Jul 16, 2024
Merged

Fix flash error flag clearing #489

merged 1 commit into from
Jul 16, 2024

Conversation

nhpupu
Copy link
Contributor

@nhpupu nhpupu commented Jul 16, 2024

According to the STM32F10xxx Flash programming manual (PM0068, p22), WRPRTERR and PGERR flags are cleared by writing 1. The original code incorrectly attempted to clear these flags by writing 0, causing them to remain set after an error occurred. This prevented further flash operations until reset.

This commit corrects the flag clearing operation, allowing flash operations to continue after recoverable errors.

According to the STM32F10xxx Flash programming manual [(PM0068, p22)](https://www.st.com/resource/en/programming_manual/pm0068-stm32f10xxx-xldensity-flash-programming-stmicroelectronics.pdf),
WRPRTERR and PGERR flags are cleared by writing 1. The original code
incorrectly attempted to clear these flags by writing 0, causing them
to remain set after an error occurred. This prevented further flash
operations until reset.

This commit corrects the flag clearing operation, allowing flash
operations to continue after recoverable errors.
@burrbull burrbull added this pull request to the merge queue Jul 16, 2024
Merged via the queue into stm32-rs:master with commit d50ccba Jul 16, 2024
11 checks passed
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.

2 participants