1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-26 23:11:19 +01:00

Merge pull request #11776 from fjmolinas/pr_fix_stm32_flashpage

stm32_common/flashpage: fix stm32l4 erase error
This commit is contained in:
Alexandre Abadie 2019-07-04 10:58:56 +02:00 committed by GitHub
commit 3f984a1128
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -112,6 +112,7 @@ static void _erase_page(void *page_addr)
}
pn = (uint8_t)page;
#endif
CNTRL_REG &= ~FLASH_CR_PNB;
CNTRL_REG |= (uint32_t)(pn << FLASH_CR_PNB_Pos);
CNTRL_REG |= FLASH_CR_STRT;
#else /* CPU_FAM_STM32F0 || CPU_FAM_STM32F1 || CPU_FAM_STM32F3 */