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

mcu/stm32h7: Fix flash write/erase #3035

Merged
merged 1 commit into from
Jul 14, 2023

Conversation

kasjer
Copy link
Contributor

@kasjer kasjer commented Jul 12, 2023

Flash min write size was incorrectly set to 1 while for most H7 MCUs it has to be 32 bytes.

HAL_FLASH_Program uses different arguments then the reset of MCU with non-linear flash sectors.
Write now respects minimum write size.

STM32H7 hal requires eraseInit.Banks field to be set.

Flash min write size was incorrectly set to 1 while for most
H7 MCUs it has to be 32 bytes.

HAL_FLASH_Program uses different arguments then the reset of
MCU with non-linear flash sectors.
Write now respects minimum write size.

STM32H7 hal requires eraseInit.Banks field to be set.

Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
Copy link

@wes3 wes3 left a comment

Choose a reason for hiding this comment

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

LGTM but I did not test this on a board with an H7xx chip

@kasjer
Copy link
Contributor Author

kasjer commented Jul 14, 2023

@wes3 thanks for a review. You took some burden out of @sjanc shoulders.

@kasjer kasjer merged commit 6e7b35d into apache:master Jul 14, 2023
9 checks passed
@kasjer kasjer deleted the kasjer/stm32h7-fix-flash-write branch July 14, 2023 18:00
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