From 549d864305bab83e5e955625b00d6e5ea7e44577 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: Fri, 5 Mar 2021 11:07:46 +0330 Subject: [PATCH] ADD F411 --- ee.c | 30 +++++++++++++++++++++++++++++- ee.h | 7 +++++-- 2 files changed, 34 insertions(+), 3 deletions(-) diff --git a/ee.c b/ee.c index 57ade3d..6fa673e 100644 --- a/ee.c +++ b/ee.c @@ -107,7 +107,7 @@ #define _EE_ADDR_INUSE (((uint32_t)0x08020000) | (_EE_SIZE*(_EE_USE_FLASH_PAGE_OR_SECTOR - 5))) #define _EE_FLASH_BANK FLASH_BANK_1 #define _EE_VOLTAGE_RANGE _EE_VOLTAGE -#define _EE_PAGE_OR_SECTOR PAGE +#define _EE_PAGE_OR_SECTOR SECTOR #if (_EE_USE_FLASH_PAGE_OR_SECTOR > 11) #error "Please Enter correct address, maximum is (11)" #endif @@ -116,6 +116,34 @@ #endif #endif +#if defined(STM32F411xC) +#define _EE_SIZE (1024 * 128) +#define _EE_ADDR_INUSE (((uint32_t)0x08020000) | (_EE_SIZE*(_EE_USE_FLASH_PAGE_OR_SECTOR - 5))) +#define _EE_FLASH_BANK FLASH_BANK_1 +#define _EE_VOLTAGE_RANGE _EE_VOLTAGE +#define _EE_PAGE_OR_SECTOR SECTOR +#if (_EE_USE_FLASH_PAGE_OR_SECTOR > 5) +#error "Please Enter correct address, maximum is (5)" +#endif +#if (_EE_USE_FLASH_PAGE_OR_SECTOR < 5) +#error "Please Enter correct address, minimum is (5)" +#endif +#endif + +#if defined(STM32F411xE) +#define _EE_SIZE (1024 * 128) +#define _EE_ADDR_INUSE (((uint32_t)0x08020000) | (_EE_SIZE*(_EE_USE_FLASH_PAGE_OR_SECTOR - 5))) +#define _EE_FLASH_BANK FLASH_BANK_1 +#define _EE_VOLTAGE_RANGE _EE_VOLTAGE +#define _EE_PAGE_OR_SECTOR SECTOR +#if (_EE_USE_FLASH_PAGE_OR_SECTOR > 7) +#error "Please Enter correct address, maximum is (7)" +#endif +#if (_EE_USE_FLASH_PAGE_OR_SECTOR < 5) +#error "Please Enter correct address, minimum is (5)" +#endif +#endif + #if defined(STM32L433xx) #define _EE_SIZE 2048 #define _EE_ADDR_INUSE (((uint32_t)0x08000000) | (_EE_SIZE * _EE_USE_FLASH_PAGE_OR_SECTOR)) diff --git a/ee.h b/ee.h index 81d7e2a..46d1c66 100644 --- a/ee.h +++ b/ee.h @@ -7,10 +7,13 @@ Instagram: http://instagram.com/github.NimaLTD Youtube: https://www.youtube.com/channel/UCUhY7qY1klJm1d2kulr9ckw - Version: 2.0.2 + Version: 2.0.3 + (2.0.3) + Add F411. + (2.0.2) - Add L4(). + Add L4. (2.0.1) Change function name to ee_commit().