Tools: Change erase sectors size

Stm32L4r5 flash has 512 sectors in dual bank configuration
-tested
This commit is contained in:
subashchandar 2023-08-24 11:46:05 +05:30 committed by Andrew Tridgell
parent 533bc504c1
commit 7d23e14f85
1 changed files with 1 additions and 1 deletions

View File

@ -630,7 +630,7 @@ bootloader(unsigned timeout)
led_set(LED_OFF);
// erase all sectors
for (uint8_t i = 0; flash_func_sector_size(i) != 0; i++) {
for (uint16_t i = 0; flash_func_sector_size(i) != 0; i++) {
#if defined(STM32F7) || defined(STM32H7)
if (!flash_func_erase_sector(i, c == PROTO_CHIP_FULL_ERASE)) {
#else