Skip to content

Commit

Permalink
[stm32] Fix flash page size for large F103, F105 and F107 devices
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-durand authored and salkinium committed Mar 12, 2024
1 parent 734de07 commit 9d4baa9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/modm/platform/flash/stm32/module.lb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ def build(env):
ftype = "sector"
busy_bit = "FLASH_SR_BSY"
elif target.family in ["f1"]:
block_shift = 10
if target.name in ["05", "07"] or int(flash["size"]) >= 262144:
block_shift = 11
else:
block_shift = 10
ftype = "page"
busy_bit = "FLASH_SR_BSY"
elif target.family in ["g0"]:
Expand Down

0 comments on commit 9d4baa9

Please sign in to comment.