From 7d23e14f854370178b6ccf916265733ccac42636 Mon Sep 17 00:00:00 2001 From: subashchandar Date: Thu, 24 Aug 2023 11:46:05 +0530 Subject: [PATCH] Tools: Change erase sectors size Stm32L4r5 flash has 512 sectors in dual bank configuration -tested --- Tools/AP_Bootloader/bl_protocol.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tools/AP_Bootloader/bl_protocol.cpp b/Tools/AP_Bootloader/bl_protocol.cpp index 28004b66aa..69364b101b 100644 --- a/Tools/AP_Bootloader/bl_protocol.cpp +++ b/Tools/AP_Bootloader/bl_protocol.cpp @@ -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