From d1ecc316e8812d293b59fee10cccc2a8e227d099 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nima=20Askari=20=28=D9=86=DB=8C=D9=85=D8=A7=20=D8=B9=D8=B3?= =?UTF-8?q?=DA=A9=D8=B1=DB=8C=29?= Date: Mon, 3 Apr 2023 12:26:32 +0330 Subject: [PATCH] ADD g030, g050, g070 --- ee.c | 15 ++++++++++++--- ee.h | 5 ++++- eeConfig.h | 2 +- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/ee.c b/ee.c index eb9312e..5b5837a 100644 --- a/ee.c +++ b/ee.c @@ -18,8 +18,8 @@ #endif #if defined(STM32F103x8) -#define _EE_MAX_SIZE 1024 -#define _EE_ADDR_INUSE (((uint32_t)0x08000000) | (_EE_MAX_SIZE * _EE_USE_FLASH_PAGE_OR_SECTOR)) +#define _EE_SIZE 1024 +#define _EE_ADDR_INUSE (((uint32_t)0x08000000) | (_EE_SIZE * _EE_USE_FLASH_PAGE_OR_SECTOR)) #define _EE_FLASH_BANK FLASH_BANK_1 #define _EE_PAGE_OR_SECTOR PAGE #if (_EE_USE_FLASH_PAGE_OR_SECTOR > 63) @@ -144,7 +144,7 @@ #endif #endif -#if defined(STM32G030xx_H) +#if defined(STM32G030xx) || defined(STM32G050xx) #define _EE_SIZE 2048 #define _EE_ADDR_INUSE (((uint32_t)0x08000000) | (_EE_SIZE * _EE_USE_FLASH_PAGE_OR_SECTOR)) #define _EE_PAGE_OR_SECTOR PAGE_NUM @@ -153,6 +153,15 @@ #endif #endif +#if defined(STM32G070xx) +#define _EE_SIZE 2048 +#define _EE_ADDR_INUSE (((uint32_t)0x08000000) | (_EE_SIZE * _EE_USE_FLASH_PAGE_OR_SECTOR)) +#define _EE_PAGE_OR_SECTOR PAGE_NUM +#if (_EE_USE_FLASH_PAGE_OR_SECTOR > 63) +#error "Please Enter correct address, maximum is (63)" +#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 46d1c66..9f2979b 100644 --- a/ee.h +++ b/ee.h @@ -7,8 +7,11 @@ Instagram: http://instagram.com/github.NimaLTD Youtube: https://www.youtube.com/channel/UCUhY7qY1klJm1d2kulr9ckw - Version: 2.0.3 + Version: 2.0.4 + (2.0.4) + Add G030, G050, G070. + (2.0.3) Add F411. diff --git a/eeConfig.h b/eeConfig.h index 31087cd..4a9a5c5 100644 --- a/eeConfig.h +++ b/eeConfig.h @@ -1,7 +1,7 @@ #ifndef __EECONFIG_H #define __EECONFIG_H -#define _EE_USE_FLASH_PAGE_OR_SECTOR (127) +#define _EE_USE_FLASH_PAGE_OR_SECTOR (31) #define _EE_USE_RAM_BYTE (1024) #define _EE_VOLTAGE FLASH_VOLTAGE_RANGE_3 // use in some devices #endif