Skip to content

Commit 563338a

Browse files
committed
STM32F3: reset PGERR flash flag
1 parent b5324ca commit 563338a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

targets/TARGET_STM/TARGET_STM32F3/flash_api.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,8 @@ int32_t flash_erase_sector(flash_t *obj, uint32_t address)
9090
return -1;
9191
}
9292

93-
__HAL_FLASH_CLEAR_FLAG(FLASH_FLAG_EOP | FLASH_FLAG_WRPERR);
93+
// Clear Flash status register's flags
94+
__HAL_FLASH_CLEAR_FLAG(FLASH_FLAG_EOP | FLASH_FLAG_WRPERR | FLASH_FLAG_PGERR);
9495

9596
/* MBED HAL erases 1 sector at a time */
9697
/* Fill EraseInit structure*/

0 commit comments

Comments
 (0)