From 98126ce83bdcf0e65411d0930b64ef5981a24627 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nima=20Askari=20-----=20=D9=86=DB=8C=D9=85=D8=A7=20=D8=B9?= =?UTF-8?q?=D8=B3=DA=A9=D8=B1=DB=8C?= Date: Tue, 16 Aug 2022 10:39:54 +0430 Subject: [PATCH] Fix erase sector --- ee.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ee.c b/ee.c index e804bae..f048343 100644 --- a/ee.c +++ b/ee.c @@ -189,7 +189,7 @@ bool ee_format(bool keepRamData) FLASH_EraseInitTypeDef flashErase; #if _EE_PAGE_OR_SECTOR == PAGE flashErase.NbPages = 1; - flashErase.PageAddress = _EE_USE_FLASH_PAGE_OR_SECTOR; + flashErase.PageAddress = _EE_ADDR_INUSE; flashErase.TypeErase = FLASH_TYPEERASE_PAGES; #elif _EE_PAGE_OR_SECTOR == SECTOR flashErase.NbSectors = 1;