mirror of https://github.com/ARMmbed/mbed-os.git
STM32H7: flash issue while erasing sector in Bank 1
parent
a4738fa9a8
commit
58994d88cd
|
@ -79,12 +79,6 @@ int32_t flash_erase_sector(flash_t *obj, uint32_t address)
|
|||
if (HAL_FLASHEx_Erase(&EraseInitStruct, &SectorError) != HAL_OK) {
|
||||
status = -1;
|
||||
}
|
||||
/* Mass erase of second bank */
|
||||
EraseInitStruct.TypeErase = FLASH_TYPEERASE_MASSERASE;
|
||||
EraseInitStruct.Banks = FLASH_BANK_2;
|
||||
if (HAL_FLASHEx_Erase(&EraseInitStruct, &SectorError) != HAL_OK) {
|
||||
status = -1;
|
||||
}
|
||||
} else {
|
||||
EraseInitStruct.TypeErase = FLASH_TYPEERASE_SECTORS;
|
||||
EraseInitStruct.Banks = FLASH_BANK_2;
|
||||
|
|
Loading…
Reference in New Issue