1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

cpu/stm32_common/flashpage: clear EOP bit

This was taken from STM32 Cube generated code
This commit is contained in:
Alexandre Abadie 2018-05-30 14:14:29 +02:00
parent f7b61b6ac1
commit 600727453b

View File

@ -69,6 +69,11 @@ static void _wait_for_pending_operations(void)
{
DEBUG("[flashpage] waiting for any pending operation to finish\n");
while (FLASH->SR & FLASH_SR_BSY) {}
/* Clear 'end of operation' bit in status register */
if (FLASH->SR & FLASH_SR_EOP) {
FLASH->SR &= ~(FLASH_SR_EOP);
}
}
static void _erase_page(void *page_addr)