From 2287e533dc19ed324d2e35f3b6fe8c79116d9bd1 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: Fri, 21 Jun 2024 18:41:49 +0200 Subject: [PATCH] V3.1.2 Fixed H5 configuration --- README.md | 2 +- ee.c | 11 +++++++++-- ee.h | 7 +++++-- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index de6c6d6..4d1b3dc 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ This library facilitates EEPROM emulation on microcontrollers by selecting the l - - [x] STM32G0 - - [x] STM32G4 ### STM32H - - - [ ] STM32H5 + - - [x] STM32H5 - - [x] STM32H7 ### STM32U - - [ ] STM32U0 diff --git a/ee.c b/ee.c index fcb5325..7aca74e 100644 --- a/ee.c +++ b/ee.c @@ -47,7 +47,7 @@ #endif #ifdef STM32H5 -#define EE_ERASE EE_ERASE_PAGE_ADDRESS +#define EE_ERASE EE_ERASE_SECTOR_NUMBER #endif #ifdef STM32H7 @@ -156,7 +156,6 @@ EE_HandleTypeDef eeHandle; ************** Private Functions ************************************************************************************************************/ - /************************************************************************************************************ ************** Public Functions ************************************************************************************************************/ @@ -274,6 +273,10 @@ bool EE_Format(void) void EE_Read(void) { uint8_t *data = eeHandle.DataPointer; +#ifdef HAL_ICACHE_MODULE_ENABLED + /* disabling ICACHE if enabled*/ + HAL_ICACHE_Disable(); +#endif if (data != NULL) { /* reading flash */ @@ -283,6 +286,10 @@ void EE_Read(void) data++; } } +#ifdef HAL_ICACHE_MODULE_ENABLED + /* disabling ICACHE if enabled*/ + HAL_ICACHE_Enable(); +#endif } /***********************************************************************************************************/ diff --git a/ee.h b/ee.h index fccf885..8e1daaf 100644 --- a/ee.h +++ b/ee.h @@ -9,10 +9,13 @@ Youtube: https://www.youtube.com/@nimaltd Instagram: https://instagram.com/github.NimaLTD - Version: 3.1.1 + Version: 3.1.2 History: - 3.1.1 + 3.1.2 + - Fixed H5 configuration + + 3.1.1 - Fixed formatting F4 3.1.0