STM32H7: flash issue while erasing sector in Bank 1

pull/10697/head
jeromecoutant 2019-05-29 09:31:30 +02:00
parent a4738fa9a8
commit 58994d88cd
1 changed files with 0 additions and 6 deletions

View File

@ -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;