2014-11-20 02:38 AM
Hi,
I am using STM32f429 disco FW_upgrade code as bootloader for my application. I had seen it erase only 11 sectors (1MB) of flash memory. I want to erase upto 23 sectors from my application address, So i have modified the code as below. But it hangs on fault handler. /* Erase Flash sectors */ startsector = FLASH_If_GetSectorNumber(Address); sectorindex = startsector; /* Erase FLASH sectors to download image */ while ((erasestatus == FLASH_COMPLETE) && (sectorindex <= FLASH_Sector_22) && (HCD_IsDeviceConnected(&USB_OTG_Core) == 1)) { erasestatus = FLASH_EraseSector(sectorindex, VoltageRange_3); sectorindex += 8; } if ((sectorindex != (FLASH_Sector_22 + 8)) || (erasestatus != FLASH_COMPLETE)) { return 1; } else { return 0; }2014-11-20 06:06 AM
The index is not enumerated linearly.