We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 802000b commit 5803bddCopy full SHA for 5803bdd
targets/TARGET_STM/TARGET_STM32L1/flash_api.c
@@ -50,9 +50,7 @@ int32_t flash_erase_sector(flash_t *obj, uint32_t address)
50
return -1;
51
}
52
53
- /* Clear OPTVERR bit set on virgin samples */
54
- __HAL_FLASH_CLEAR_FLAG(FLASH_FLAG_OPTVERR);
55
-
+ __HAL_FLASH_CLEAR_FLAG(FLASH_FLAG_EOP | FLASH_FLAG_PGAERR | FLASH_FLAG_WRPERR);
56
/* MBED HAL erases 1 sector at a time */
57
/* Fill EraseInit structure*/
58
EraseInitStruct.TypeErase = FLASH_TYPEERASE_PAGES;
0 commit comments