Skip to content

Conversation

fpistm
Copy link
Member

@fpistm fpistm commented Jul 13, 2021

FLASH_SIZE defined by the CMSIS Device Peripheral Access Layer Header File is the maximum one of a product line.
So depending of the mcu this is not the correct one.

As an example, L432KC have 256 KB while L432Kb has 128 KB.

Using LL_GetFlashSize() allows to get the correct FLASH size.

Fixes #1316

FLASH_SIZE defined by the CMSIS Device Peripheral Access Layer Header File
is the maximum one of a product line.
So depending of the mcu this is not the correct one.

As an example, L432KC have 256 KB while L432Kb has 128 KB.

Using LL_GetFlashSize() allows to get the correct FLASH size.

Fixes stm32duino#1316

Signed-off-by: Frederic Pillon <[email protected]>
@fpistm fpistm added enhancement New feature or request fix 🩹 Bug fix labels Jul 13, 2021
@fpistm fpistm added this to the 2.x.x milestone Jul 13, 2021
@fpistm fpistm requested a review from ABOSTM July 13, 2021 12:54
Copy link
Contributor

@ABOSTM ABOSTM left a comment

Choose a reason for hiding this comment

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

LGTM

@fpistm fpistm merged commit f4f0f81 into stm32duino:master Jul 13, 2021
@fpistm fpistm deleted the EEPROM_Flash_Size branch July 13, 2021 15:19
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.

Wrong flash size for eeprom emulation
2 participants