Fix F4 erase

This commit is contained in:
Nima Askari ----- نیما عسکری 2022-11-29 11:50:13 +03:30 committed by GitHub
parent 98126ce83b
commit c8be90be0d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

2
ee.c
View File

@ -193,7 +193,7 @@ bool ee_format(bool keepRamData)
flashErase.TypeErase = FLASH_TYPEERASE_PAGES;
#elif _EE_PAGE_OR_SECTOR == SECTOR
flashErase.NbSectors = 1;
flashErase.Sector = _EE_ADDR_INUSE;
flashErase.Sector = _EE_USE_FLASH_PAGE_OR_SECTOR;
flashErase.TypeErase = FLASH_TYPEERASE_SECTORS;
#elif _EE_PAGE_OR_SECTOR == PAGE_NUM
flashErase.NbPages = 1;