From c8dd26476a9c18cc20dc9b8e81e2bd5cbf7801db Mon Sep 17 00:00:00 2001 From: leech001 Date: Sun, 1 Jan 2023 12:43:18 +0300 Subject: [PATCH] Added STM32G030xx --- README.md | 1 + ee.c | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/README.md b/README.md index 3d9b9ac..b606a72 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,7 @@ This is the EEPROM emulation STM32 HAL Library You can add your MCU config. * [x] F0 tested. +* [ ] G0 tested. (STM32G030xx) * [ ] L0 tested. * [x] F1 tested. * [ ] L1 tested. diff --git a/ee.c b/ee.c index e5d7591..eb9312e 100644 --- a/ee.c +++ b/ee.c @@ -144,6 +144,15 @@ #endif #endif +#if defined(STM32G030xx_H) +#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 > 31) +#error "Please Enter correct address, maximum is (31)" +#endif +#endif + #if defined(STM32L433xx) #define _EE_SIZE 2048 #define _EE_ADDR_INUSE (((uint32_t)0x08000000) | (_EE_SIZE * _EE_USE_FLASH_PAGE_OR_SECTOR))