diff --git a/ee.c b/ee.c index a04d46a..fcb5325 100644 --- a/ee.c +++ b/ee.c @@ -38,6 +38,7 @@ #define EE_ERASE EE_ERASE_SECTOR_NUMBER #define EE_SIZE 0x20000 #define FLASH_SIZE ((((uint32_t)(*((uint16_t *)FLASHSIZE_BASE)) & (0xFFFFU))) * 1024) +#define FLASH_F4_OFFSET 4 #endif #ifdef STM32F7 @@ -128,6 +129,7 @@ #endif #endif + #ifndef EE_ADDRESS #if (EE_BANK_SELECT != FLASH_BANK_2) #define EE_ADDRESS (FLASH_BASE + EE_SIZE * EE_PAGE_SECTOR) @@ -136,6 +138,10 @@ #endif #endif +#ifndef FLASH_F4_OFFSET +#define FLASH_F4_OFFSET 0 +#endif + #ifndef EE_ERASE #error "Not Supported MCU!" #endif @@ -228,7 +234,7 @@ bool EE_Format(void) flashErase.NbPages = 1; #else flashErase.TypeErase = FLASH_TYPEERASE_SECTORS; - flashErase.Sector = EE_PAGE_SECTOR; + flashErase.Sector = EE_PAGE_SECTOR + FLASH_F4_OFFSET; flashErase.NbSectors = 1; #endif #ifdef EE_BANK_SELECT diff --git a/ee.h b/ee.h index a1a79c4..80e9d3c 100644 --- a/ee.h +++ b/ee.h @@ -9,9 +9,12 @@ Youtube: https://www.youtube.com/@nimaltd Instagram: https://instagram.com/github.NimaLTD - Version: 3.1.0 + Version: 3.1.1 History: + 3.1.1 + - Fixed formating F4 + 3.1.0 - Added Verify after Writing - Added Checking Pointer in Reading/Writing