From 9475169bdcf819994fddb0b1330c8106c19fd1c6 Mon Sep 17 00:00:00 2001 From: Daniele Lacamera Date: Mon, 7 Sep 2026 14:43:15 +0200 Subject: [PATCH] F-12875: stm32f7 fix non-dual-bank sector 11 start address Sector 11 was at 0x818C000, inside sector 10's 256 KB range (0x8180000-0x81C0000), so hal_flash_erase mapped the upper part of sector 10 to sector 11 and erased the wrong sector. Sector 11 is 0x81C0000, contiguous after sector 10 and ending at FLASH_TOP. --- hal/stm32f7.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hal/stm32f7.c b/hal/stm32f7.c index 07d22fd5..38b60bb6 100644 --- a/hal/stm32f7.c +++ b/hal/stm32f7.c @@ -177,7 +177,7 @@ void fork_bootloader(void); # define FLASH_SECTOR_8 0x8100000 /* 256 Kb */ # define FLASH_SECTOR_9 0x8140000 /* 256 Kb */ # define FLASH_SECTOR_10 0x8180000 /* 256 Kb */ -# define FLASH_SECTOR_11 0x818C000 /* 256 Kb */ +# define FLASH_SECTOR_11 0x81C0000 /* 256 Kb */ #endif # define FLASH_TOP 0x8200000