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

EEPROM emulation: wrong flash sector used for some F7 variants #938

Merged
merged 1 commit into from
Feb 14, 2020

Conversation

ABOSTM
Copy link
Contributor

@ABOSTM ABOSTM commented Feb 13, 2020

Summary
EEPROM emulation: wrong flash sector used for some STM32F7 variants

Default configuration for F76xx and F77xx chip is single bank.
But HAL define FLASH_SECTOR_TOTAL doesn't represent the real number of sector,
instead, it represents the maximum number of sectors (for single and dual bank).
So for variants using F76xx and F77xx chip,
we must define FLASH_BASE_ADDRESS and FLASH_DATA_SECTOR in order to use the last sector of the flash corresponding to the default single bank configuration.

Variants concerned: NUCLEO_F767ZI and REMRAM

Fixes #297

Default configuration for F76xx and F77xx chip is single bank.
But HAL define FLASH_SECTOR_TOTAL doesn't represent the real number of sector,
instead, it represents the maximum number of sectors (for single and dual bank).
So for variants using F76xx and F77xx chip,
we must define FLASH_BASE_ADDRESS and FLASH_DATA_SECTOR in order to use the last sector of the flash corresponding to the default single bank configuration.

Variants concerned: NUCLEO_F767ZI and REMRAM

Fixes stm32duino#297
@ABOSTM ABOSTM force-pushed the EEPROM_FLASH_SECTOR_DEFINITION branch from 0d1c001 to c0cfed9 Compare February 13, 2020 17:41
@fpistm fpistm added enhancement New feature or request fix 🩹 Bug fix labels Feb 13, 2020
@fpistm fpistm added this to the 1.9.0 milestone Feb 13, 2020
Copy link
Member

@fpistm fpistm left a comment

Choose a reason for hiding this comment

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

LGTM
Thanks @ABOSTM

@fpistm fpistm merged commit 89e08d2 into stm32duino:master Feb 14, 2020
Bmooij pushed a commit to Bmooij/Arduino_Core_STM32 that referenced this pull request Jul 14, 2020
…duino#938)

Default configuration for F76xx and F77xx chip is single bank.
But HAL define FLASH_SECTOR_TOTAL doesn't represent the real number of sector,
instead, it represents the maximum number of sectors (for single and dual bank).
So for variants using F76xx and F77xx chip,
we must define FLASH_BASE_ADDRESS and FLASH_DATA_SECTOR in order to use the last sector of the flash corresponding to the default single bank configuration.

Variants concerned: NUCLEO_F767ZI and REMRAM

Fixes stm32duino#297
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request fix 🩹 Bug fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Possible bug when writing to flash using the EEPROM library (F7)
2 participants