From 752a52b992fdfb4c53950218888de6ac3f336a49 Mon Sep 17 00:00:00 2001 From: "XPS\\Micro" Date: Sun, 4 Aug 2024 07:26:05 +0200 Subject: [PATCH] Uploaded --- EEE4STM32.c | 394 --- EEE4STM32.h | 82 - STM32-PACK/Files/LICENSE.txt | 674 ++++++ .../Third_Party/EEE4STM32/eeprom_emul.c | 2129 +++++++++++++++++ .../Third_Party/EEE4STM32/eeprom_emul.h | 152 ++ .../Third_Party/EEE4STM32/eeprom_emul_conf.h | 92 + .../Third_Party/EEE4STM32/eeprom_emul_types.h | 118 + .../Third_Party/EEE4STM32/flash_interface.c | 207 ++ .../Third_Party/EEE4STM32/flash_interface.h | 134 ++ STM32-PACK/Files/RainerWieland.EEE4STM32.pdsc | 31 + STM32-PACK/RWD-EEE4STM32.1.0.0.pack | Bin 16785 -> 0 bytes STM32-PACK/RWD-EEE4STM32.pdsc | 26 - STM32-PACK/RainerWieland.EEE4STM32.1.0.0.pack | Bin 0 -> 34790 bytes 13 files changed, 3537 insertions(+), 502 deletions(-) delete mode 100644 EEE4STM32.c delete mode 100644 EEE4STM32.h create mode 100644 STM32-PACK/Files/LICENSE.txt create mode 100644 STM32-PACK/Files/Middlewares/Third_Party/EEE4STM32/eeprom_emul.c create mode 100644 STM32-PACK/Files/Middlewares/Third_Party/EEE4STM32/eeprom_emul.h create mode 100644 STM32-PACK/Files/Middlewares/Third_Party/EEE4STM32/eeprom_emul_conf.h create mode 100644 STM32-PACK/Files/Middlewares/Third_Party/EEE4STM32/eeprom_emul_types.h create mode 100644 STM32-PACK/Files/Middlewares/Third_Party/EEE4STM32/flash_interface.c create mode 100644 STM32-PACK/Files/Middlewares/Third_Party/EEE4STM32/flash_interface.h create mode 100644 STM32-PACK/Files/RainerWieland.EEE4STM32.pdsc delete mode 100644 STM32-PACK/RWD-EEE4STM32.1.0.0.pack delete mode 100644 STM32-PACK/RWD-EEE4STM32.pdsc create mode 100644 STM32-PACK/RainerWieland.EEE4STM32.1.0.0.pack diff --git a/EEE4STM32.c b/EEE4STM32.c deleted file mode 100644 index e811638..0000000 --- a/EEE4STM32.c +++ /dev/null @@ -1,394 +0,0 @@ -/************************************************************************************************************ -************** Include Headers -************************************************************************************************************/ - -#include "EEE4STM32.h" -#include - -/************************************************************************************************************ -************** Private Definitions -************************************************************************************************************/ - -#define EE_ERASE_PAGE_ADDRESS 0 -#define EE_ERASE_PAGE_NUMBER 1 -#define EE_ERASE_SECTOR_NUMBER 2 - -#ifdef STM32F0 -#define EE_ERASE EE_ERASE_PAGE_ADDRESS -#define FLASH_SIZE ((((uint32_t)(*((uint16_t *)FLASHSIZE_BASE)) & (0xFFFFU))) * 1024) -#endif - -#ifdef STM32F1 -#define EE_ERASE EE_ERASE_PAGE_ADDRESS -#define FLASH_SIZE ((((uint32_t)(*((uint16_t *)FLASHSIZE_BASE)) & (0xFFFFU))) * 1024) -#endif - -#ifdef STM32F2 -#define EE_ERASE EE_ERASE_SECTOR_NUMBER -#define FLASH_SIZE ((((uint32_t)(*((uint16_t *)FLASHSIZE_BASE)) & (0xFFFFU))) * 1024) -#endif - -#ifdef STM32F3 -#define EE_ERASE EE_ERASE_PAGE_ADDRESS -#define FLASH_SIZE ((((uint32_t)(*((uint16_t *)FLASHSIZE_BASE)) & (0xFFFFU))) * 1024) -#endif - -#ifdef STM32F4 -#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 -#define EE_ERASE EE_ERASE_SECTOR_NUMBER -#define EE_SIZE 0x20000 -#endif - -#ifdef STM32H5 -#define EE_ERASE EE_ERASE_SECTOR_NUMBER -#endif - -#ifdef STM32H7 -#define EE_ERASE EE_ERASE_SECTOR_NUMBER -#endif - -#ifdef STM32G0 -#define EE_ERASE EE_ERASE_PAGE_NUMBER -#endif - -#ifdef STM32G4 -#define EE_ERASE EE_ERASE_PAGE_NUMBER -#endif - -#ifdef STM32U0 -#define EE_ERASE EE_ERASE_PAGE_NUMBER -#endif - -#ifdef STM32U5 -#define EE_ERASE EE_ERASE_PAGE_NUMBER -#endif - -#ifdef STM32L0 -#define EE_ERASE EE_ERASE_PAGE_NUMBER -#endif - -#ifdef STM32L1 -#define EE_ERASE EE_ERASE_PAGE_NUMBER -#endif - -#ifdef STM32L4 -#define EE_ERASE EE_ERASE_PAGE_NUMBER -#endif - -#ifdef STM32L5 -#define EE_ERASE EE_ERASE_PAGE_NUMBER -#endif - -#ifdef STM32WB -#define EE_ERASE EE_ERASE_PAGE_NUMBER -#endif - -#ifdef STM32W0 -#define EE_ERASE EE_ERASE_PAGE_NUMBER -#endif - -#ifdef STM32WBA -#define EE_ERASE EE_ERASE_PAGE_NUMBER -#undef FLASH_BANK_1 -#endif - -#ifdef STM32WL -#define EE_ERASE EE_ERASE_PAGE_NUMBER -#endif - -#ifdef STM32C0 -#define EE_ERASE EE_ERASE_PAGE_NUMBER -#endif - -#ifndef EE_SIZE -#if (EE_ERASE == EE_ERASE_PAGE_NUMBER) || (EE_ERASE == EE_ERASE_PAGE_ADDRESS) -#define EE_SIZE FLASH_PAGE_SIZE -#elif (EE_ERASE == EE_ERASE_SECTOR_NUMBER) -#define EE_SIZE FLASH_SECTOR_SIZE -#endif -#endif - -#if defined FLASH_BANK_2 -#define EE_BANK_SELECT FLASH_BANK_2 -#elif defined FLASH_BANK_1 -#define EE_BANK_SELECT FLASH_BANK_1 -#endif - -#ifndef EE_PAGE_SECTOR -#if (EE_BANK_SELECT == FLASH_BANK_2) -#define EE_PAGE_SECTOR ((FLASH_SIZE / EE_SIZE / 2) - 1) -#else -#define EE_PAGE_SECTOR ((FLASH_SIZE / EE_SIZE) - 1) -#endif -#endif - - -#ifndef EE_ADDRESS -#if (EE_BANK_SELECT != FLASH_BANK_2) -#define EE_ADDRESS (FLASH_BASE + EE_SIZE * EE_PAGE_SECTOR) -#else -#define EE_ADDRESS (FLASH_BASE + EE_SIZE * (EE_PAGE_SECTOR * 2 + 1)) -#endif -#endif - -#ifndef FLASH_F4_OFFSET -#define FLASH_F4_OFFSET 0 -#endif - -#ifndef EE_ERASE -#error "Not Supported MCU!" -#endif - -/************************************************************************************************************ -************** Private Variables -************************************************************************************************************/ - -EE_HandleTypeDef eeHandle; - -/************************************************************************************************************ -************** Private Functions -************************************************************************************************************/ - -/************************************************************************************************************ -************** Public Functions -************************************************************************************************************/ - -/** - * @brief Initializes the EEPROM emulation module. - * @note This function initializes the EEPROM emulation module to enable read and write operations. - * @param StoragePointer: Pointer to the start address of the EEPROM emulation area. - * @param Size: Size of the EEPROM emulation area in bytes. - * @return Boolean value indicating the success of the initialization: - * - true: Initialization successful. - * - false: Initialization failed. - */ -bool EE_Init(void *StoragePointer, uint32_t Size) -{ - bool answer = false; - do - { - /* checking size of eeprom area*/ - if (Size > EE_SIZE) - { - eeHandle.Size = 0; - eeHandle.DataPointer = NULL; - break; - } - eeHandle.Size = Size; - eeHandle.DataPointer = (uint8_t*)StoragePointer; - answer = true; - - } while (0); - - return answer; -} - -/***********************************************************************************************************/ - -/** - * @brief Retrieves the capacity of the EEPROM emulation area. - * @note This function returns the total capacity of the EEPROM emulation area in bytes. - * @return Capacity of the EEPROM emulation area in bytes. - */ -uint32_t EE_Capacity(void) -{ - return EE_SIZE; -} - -/***********************************************************************************************************/ - -/** - * @brief Formats the EEPROM emulation area. - * @note This function formats the EEPROM emulation area, - * @return bool Boolean value indicating the success of the operation: - * - true: Formatting successful. - * - false: Formatting failed. - */ -bool EE_Format(void) -{ - bool answer = false; - uint32_t error; - FLASH_EraseInitTypeDef flashErase; - do - { - HAL_FLASH_Unlock(); -#ifdef HAL_ICACHE_MODULE_ENABLED - /* disabling ICACHE if enabled*/ - HAL_ICACHE_Disable(); -#endif -#if EE_ERASE == EE_ERASE_PAGE_ADDRESS - flashErase.TypeErase = FLASH_TYPEERASE_PAGES; - flashErase.PageAddress = EE_ADDRESS; - flashErase.NbPages = 1; -#elif EE_ERASE == EE_ERASE_PAGE_NUMBER - flashErase.TypeErase = FLASH_TYPEERASE_PAGES; - flashErase.Page = EE_PAGE_SECTOR; - flashErase.NbPages = 1; -#else - flashErase.TypeErase = FLASH_TYPEERASE_SECTORS; - flashErase.Sector = EE_PAGE_SECTOR + FLASH_F4_OFFSET; - flashErase.NbSectors = 1; -#endif -#ifdef EE_BANK_SELECT - flashErase.Banks = EE_BANK_SELECT; -#endif -#ifdef FLASH_VOLTAGE_RANGE_3 - flashErase.VoltageRange = FLASH_VOLTAGE_RANGE_3; -#endif - /* erasing page/sector */ - if (HAL_FLASHEx_Erase(&flashErase, &error) != HAL_OK) - { - break; - } - /* checking result */ - if (error != 0xFFFFFFFF) - { - break; - } - answer = true; - - } while (0); - - HAL_FLASH_Lock(); -#ifdef HAL_ICACHE_MODULE_ENABLED - HAL_ICACHE_Enable(); -#endif - return answer; -} - -/***********************************************************************************************************/ - -/** - * @brief Reads data from the EEPROM emulation area. - * @note This function reads data from the EEPROM emulation area - * and loads it into the specified storage pointer. - */ -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 */ - for (uint32_t i = 0; i < eeHandle.Size; i++) - { - *data = (*(__IO uint8_t*) (EE_ADDRESS + i)); - data++; - } - } -#ifdef HAL_ICACHE_MODULE_ENABLED - /* disabling ICACHE if enabled*/ - HAL_ICACHE_Enable(); -#endif -} - -/***********************************************************************************************************/ - -/** - * @brief Writes data to the EEPROM emulation area. - * @note This function writes data to the EEPROM emulation area. - * @retval true if the write operation is successful, false otherwise. - */ -bool EE_Write(void) -{ - bool answer = true; - uint8_t *data = eeHandle.DataPointer; - do - { - /* checking eeprom is initialize correctly */ - if (data == NULL) - { - answer = false; - break; - } - /* formating flash area before writing */ - if (EE_Format() == false) - { - answer = false; - break; - } - HAL_FLASH_Unlock(); -#ifdef HAL_ICACHE_MODULE_ENABLED - /* disabling ICACHE if enabled*/ - HAL_ICACHE_Disable(); -#endif -#if (defined FLASH_TYPEPROGRAM_HALFWORD) - /* writing buffer to flash */ - for (uint32_t i = 0; i < eeHandle.Size ; i += 2) - { - uint64_t halfWord; - memcpy((uint8_t*)&halfWord, data, 2); - if (HAL_FLASH_Program(FLASH_TYPEPROGRAM_HALFWORD, EE_ADDRESS + i, halfWord) != HAL_OK) - { - answer = false; - break; - } - data += 2; - } -#elif (defined FLASH_TYPEPROGRAM_DOUBLEWORD) - /* writing buffer to flash */ - for (uint32_t i = 0; i < eeHandle.Size; i += 8) - { - uint64_t doubleWord; - memcpy((uint8_t*)&doubleWord, data, 8); - if (HAL_FLASH_Program(FLASH_TYPEPROGRAM_DOUBLEWORD, EE_ADDRESS + i, doubleWord) != HAL_OK) - { - answer = false; - break; - } - data += 8; - } -#elif (defined FLASH_TYPEPROGRAM_QUADWORD) - /* writing buffer to flash */ - for (uint32_t i = 0; i < eeHandle.Size; i += 16) - { - if (HAL_FLASH_Program(FLASH_TYPEPROGRAM_QUADWORD, EE_ADDRESS + i, (uint32_t)data) != HAL_OK) - { - answer = false; - break; - } - data += 16; - } -#elif (defined FLASH_TYPEPROGRAM_FLASHWORD) - /* writing buffer to flash */ - for (uint32_t i = 0; i < eeHandle.Size; i += FLASH_NB_32BITWORD_IN_FLASHWORD * 4) - { - if (HAL_FLASH_Program(FLASH_TYPEPROGRAM_FLASHWORD, EE_ADDRESS + i, (uint32_t)data) != HAL_OK) - { - answer = false; - break; - } - data += FLASH_NB_32BITWORD_IN_FLASHWORD * 4; - } -#endif - /* verifying Flash content */ - data = eeHandle.DataPointer; - for (uint32_t i = 0; i < eeHandle.Size; i++) - { - if (*data != (*(__IO uint8_t*) (EE_ADDRESS + i))) - { - answer = false; - break; - } - data++; - } - - } while (0); - - HAL_FLASH_Lock(); -#ifdef HAL_ICACHE_MODULE_ENABLED - HAL_ICACHE_Enable(); -#endif - return answer; -} - -/***********************************************************************************************************/ diff --git a/EEE4STM32.h b/EEE4STM32.h deleted file mode 100644 index 6f7771e..0000000 --- a/EEE4STM32.h +++ /dev/null @@ -1,82 +0,0 @@ -#ifndef _EEE4STM32_H_ -#define _EEE4STM32_H_ - -/*********************************************************************************************************** - - Author: Nima Askari - Github: https://www.github.com/NimaLTD - LinkedIn: https://www.linkedin.com/in/nimaltd - Youtube: https://www.youtube.com/@nimaltd - Instagram: https://instagram.com/github.NimaLTD - - Version: 3.1.3 - - History: - 3.1.3 - - Fixed L0, L1 configuration - - 3.1.2 - - Fixed H5 configuration - - 3.1.1 - - Fixed formatting F4 - - 3.1.0 - - Added Verify after Writing - - Added Checking Pointer in Reading/Writing - - Removed erasing buffer and formating before write - - 3.0.2 - - Fixed Writing for H7B - - 3.0.1 - - Added comments - - 3.0.0 - - Rewrite again - - Support STM32CubeMx Packet installer - -***********************************************************************************************************/ - -#ifdef __cplusplus -extern "C" -{ -#endif - -/************************************************************************************************************ -************** Include Headers -************************************************************************************************************/ - -#include -#include "main.h" - -/************************************************************************************************************ -************** Public Definitions -************************************************************************************************************/ - - -/************************************************************************************************************ -************** Public struct/enum -************************************************************************************************************/ - -typedef struct -{ - uint8_t *DataPointer; - uint32_t Size; - -} EE_HandleTypeDef; - -/************************************************************************************************************ -************** Public Functions -************************************************************************************************************/ - -bool EE_Init(void *StoragePointer, uint32_t Size); -uint32_t EE_Capacity(void); -bool EE_Format(void); -void EE_Read(void); -bool EE_Write(void); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/STM32-PACK/Files/LICENSE.txt b/STM32-PACK/Files/LICENSE.txt new file mode 100644 index 0000000..f288702 --- /dev/null +++ b/STM32-PACK/Files/LICENSE.txt @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/STM32-PACK/Files/Middlewares/Third_Party/EEE4STM32/eeprom_emul.c b/STM32-PACK/Files/Middlewares/Third_Party/EEE4STM32/eeprom_emul.c new file mode 100644 index 0000000..f618c92 --- /dev/null +++ b/STM32-PACK/Files/Middlewares/Third_Party/EEE4STM32/eeprom_emul.c @@ -0,0 +1,2129 @@ +/** + ****************************************************************************** + * @file EEPROM_Emul/Core/eeprom_emul.c + * @author MCD Application Team + * @brief This file provides all the EEPROM emulation firmware functions. + @verbatim + ============================================================================== + ##### How to use this driver ##### + ============================================================================== + [..] + This driver provides functions to initialize EEPROM emulation, to read and + write EEPROM variables, and to cleanup FLASH pages used by EEPROM emulation. + + (#) EEPROM emulation initialization functions: + (++) Format the FLASH pages used by EEPROM emulation using EE_Format(). + This function is optionally used, it can be called the very first + time EEPROM emulation is used, to prepare FLASH pages for EEPROM + emulation with empty EEPROM variables. It can also be called at + any time, to flush all EEPROM variables. + (++) Initialize EEPROM emulation, and restore the FLASH pages used by + EEPROM emulation to a known good state in case of power loss + using EE_Init(). It must be performed at system start up. + + (#) EEPROM variables access functions: + (++) Write EEPROM variable using EE_WriteVariableXbits() functions + A Clean Up request can be raised as return parameter in case + FLASH pages used by EEPROM emulation, are full. + (++) Read EEPROM variable using EE_ReadVariableXbits() functions + + (#) Clean up functions of FLASH pages, used by EEPROM emulation: + (++) There Two modes of erasing: + (+++) Polling mode using EE_CleanUp() function + (+++) Interrupt mode using EE_CleanUp_IT() function + (++) Callback function called when the clean up operation in interrupt + mode, is finished: EE_EndOfCleanup_UserCallback() + + @endverbatim + ****************************************************************************** + * @attention + * + *

© Copyright (c) 2020 STMicroelectronics. + * All rights reserved.

+ * + * This software component is licensed by ST under BSD 3-Clause license, + * the "License"; You may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * opensource.org/licenses/BSD-3-Clause + * + ****************************************************************************** + */ + +/* Includes ------------------------------------------------------------------*/ +#include "eeprom_emul.h" +/** @defgroup EEPROM_Emulation EEPROM_Emulation + * @{ + */ + +/* Private define -----------------------------------------------------------*/ +#ifdef DUALCORE_FLASH_SHARING +#define HSEM_PROCESS_1 12U /* Number taken randomly to identify the process locking a semaphore in the driver context */ +#endif +/* Private typedef -----------------------------------------------------------*/ +/** @defgroup EEPROM_Private_Structures EEPROM Private Structures + * @{ + */ + +/** + * @brief EE Find Type structure definition. + */ +/* Type of find requested : + READ --> page in active state + WRITE --> page in receive state or active state + ERASE --> page in erased state */ +typedef enum { + FIND_READ_PAGE, + FIND_WRITE_PAGE, + FIND_ERASE_PAGE +} EE_Find_type; + +/** + * @brief EE State Type structure definition. + */ +/* Type of state requested : + ERASED --> page is erased + RECEIVE --> page used during data transfer when no more space available in the system + ACTIVE --> page contains valid data and is not full + VALID --> page contains valid data and is full + ERASING --> page used during transfer, should be erased after transfer + INVALID --> page invalid state */ +typedef enum { + STATE_PAGE_ERASED, + STATE_PAGE_RECEIVE, + STATE_PAGE_ACTIVE, + STATE_PAGE_VALID, + STATE_PAGE_ERASING, + STATE_PAGE_INVALID +} EE_State_type; + +/** + * @brief EE Transfer Type structure definition. + */ +/* Definition of the different type of page transfer + NORMAL -> copy data page source to page destination + RECOVER -> resume page transfer that has been interrupted */ +typedef enum { + EE_TRANSFER_NORMAL, + EE_TRANSFER_RECOVER +} EE_Transfer_type; + +/** + * @brief EE State Reliability structure definition. + */ +/* Reliability of page state: + RELIABLE -> header of page is not corrupted, state is reliable + CORRUPTED -> header of page is corrupted, state is corrupted */ +typedef enum { + STATE_RELIABLE, + STATE_CORRUPTED +} EE_State_Reliability; + + + +/** + * @} + */ + +/* Private variables ---------------------------------------------------------*/ +/** @defgroup EEPROM_Private_Variables EEPROM Private Variables + * @{ + */ + +/* Global variables used to store eeprom status */ +uint16_t uhNbWrittenElements = 0U; /*!< Nb of elements written in valid and active pages */ +uint8_t ubCurrentActivePage = 0U; /*!< Current active page (can be active or receive state) */ +uint32_t uwAddressNextWrite = PAGE_HEADER_SIZE; /*!< Initialize write position just after page header */ + +/* During the cleanup phase in EE_Init, AddressRead is the address being read */ +__IO uint32_t AddressRead = 0; +/* Flag equal to 1 when the cleanup phase is in progress, 0 if not */ +__IO uint8_t CleanupPhase = 0; + +/** + * @} + */ + +/* Private function prototypes -----------------------------------------------*/ +/** @defgroup EEPROM_Private_Functions EEPROM Private Functions + * @{ + */ + +#ifndef FLASH_LINES_128B +static EE_Status ReadVariable(uint16_t VirtAddress, EE_DATA_TYPE* pData); +static EE_Status WriteVariable(uint16_t VirtAddress, EE_DATA_TYPE Data); +static EE_Status PagesTransfer(uint16_t VirtAddress, EE_DATA_TYPE Data, EE_Transfer_type type); +uint16_t CalculateCrc(EE_DATA_TYPE Data, uint16_t VirtAddress); +#else +static EE_Status ReadVariable(uint16_t VirtAddress, EE_DATA_TYPE* pData); +static EE_Status WriteVariable(uint16_t VirtAddress, EE_DATA_TYPE* Data); +static EE_Status PagesTransfer(uint16_t VirtAddress, EE_DATA_TYPE* Data, EE_Transfer_type type); +uint16_t CalculateCrc(EE_DATA_TYPE Data1, EE_DATA_TYPE Data2); +#endif +static EE_Status VerifyPageFullyErased(uint32_t Address, uint32_t PageSize); +static uint32_t FindPage(EE_Find_type Operation); +#if defined (DUALCORE_FLASH_SHARING) +static EE_Status VerifyPagesFullWriteVariable(uint16_t VirtAddress, EE_DATA_TYPE Data, EE_Write_type Write_type); +#elif defined (FLASH_LINES_128B) +static EE_Status VerifyPagesFullWriteVariable(uint16_t VirtAddress, EE_DATA_TYPE* Data, EE_Write_type Write_type); +#else +static EE_Status VerifyPagesFullWriteVariable(uint16_t VirtAddress, EE_DATA_TYPE Data); +#endif +static EE_Status SetPageState(uint32_t Page, EE_State_type State); +static EE_State_type GetPageState(uint32_t Address); +void ConfigureCrc(void); + +/** + * @} + */ + +/* Exported functions -------------------------------------------------------*/ +/** @addtogroup EEPROM_Exported_Functions + * @{ + */ + +/** + * @brief Restore the pages to a known good state in case of power loss. + * If a page is in RECEIVE state, resume transfer. + * Then if some pages are ERASING state, erase these pages. + * @param EraseType: Type of erase to apply on page requiring to be erased. + * This parameter can be one of the following values: + * @arg @ref EE_FORCED_ERASE pages to erase are erased unconditionnally + * @arg @ref EE_CONDITIONAL_ERASE pages to erase are erased only if not fully erased + * @retval EE_Status + * - EE_OK in case of success + * - EE error code in case of error + */ +EE_Status EE_Init(EE_Erase_type EraseType) +{ + EE_State_type pagestatus = STATE_PAGE_INVALID; + uint32_t page = 0U, pageaddress = 0U, varidx = 0U, + nbactivepage = 0U, nbactivereceivepage = 0U, nbvalidpage = 0U, + lastvalidpage = 0U, firstvalidpage = 0U, + recoverytransfer = 0U; + EE_ELEMENT_TYPE addressvalue = 0U; +#ifdef FLASH_LINES_128B + uint32_t Address = 0U; + EE_ELEMENT_TYPE addressvalue2 = 0U; + EE_DATA_TYPE dummy_data[2] = {0, 0}; +#endif + EE_State_Reliability pagestate = STATE_RELIABLE; + + EE_Status status = EE_OK; + + /* Check if the configuration is 128-bits bank or 2*64-bits bank */ + if (FI_CheckBankConfig() != EE_OK) + { + return EE_INVALID_BANK_CFG; + } + + /***************************************************************************/ + /* Step 0: Perform initial configuration */ + /***************************************************************************/ + /* Configure CRC peripheral for eeprom emulation usage */ + + ConfigureCrc(); + + /***************************************************************************/ + /* Step 1: Read all lines of the flash pages of eeprom emulation to */ + /* delete corrupted lines detectable through NMI */ + /***************************************************************************/ + /* We set the flag indicating the cleanup phase is operating to 1 */ + + CleanupPhase = 1; + +#ifndef STM32C031xx + for (page = START_PAGE; page < (START_PAGE + PAGES_NUMBER); page++) + { + pageaddress = PAGE_ADDRESS(page); + for (varidx = 0U; varidx < PAGE_SIZE; varidx += EE_ELEMENT_SIZE) + { + /* + During the cleanup phase and only during it, + we save the address read to set its content to 0 in case it triggered an NMI (see NMI_Handler in stm32lxxx_it.c). + In the rest of the program, we do nothing in case a NMI is triggers by a reading because no NMI should be triggered + since we have cleanup the EEPROM emulated. By the way, there is still the CRC code associated to each EEPROM line + that allows to verify its valid state. + */ + AddressRead = pageaddress + varidx; + addressvalue = (*(__IO EE_ELEMENT_TYPE*)(pageaddress + varidx)); + +#ifdef FLASH_LINES_128B + AddressRead = pageaddress + varidx + 8; + addressvalue = (*(__IO EE_ELEMENT_TYPE*)(pageaddress + varidx + 8)); +#endif + + } + } +#ifdef FLASH_LINES_128B + //If a reset occured when an ECCC was detected but not corrected + if (__HAL_FLASH_GET_FLAG(FLASH_FLAG_ECCC)) + { + +#ifdef STM32H563xx + Address=(0x8000000|(FLASH->ECCDR & 0x000FFFFF)); //Recovery of address where ECC error occured +#else + Address=(0x8000000|(FLASH->ECCR & 0x000FFFFF)); //Recovery of address where ECC error occured +#endif + EE_DeleteCorruptedFlashAddress(Address); //Delete corrupted address + } +#endif +#endif + /* We set the flag indicating the cleanup phase is operating to 0 because it just ended */ + CleanupPhase = 0; + + /***************************************************************************/ + /* Step 2: Handle case of reset during transfer with no receive page */ + /* present, by setting missing receive page state */ + /***************************************************************************/ + /* Check if no active page and no receive page present */ + /* Browse all pages */ + + for (page = START_PAGE; page < (START_PAGE + PAGES_NUMBER); page++) + { + pageaddress = PAGE_ADDRESS(page); + pagestatus = GetPageState(pageaddress); + + /* Search for active and receive page */ + if ((pagestatus == STATE_PAGE_ACTIVE) || (pagestatus == STATE_PAGE_RECEIVE)) + { + nbactivereceivepage++; + } + /* Keep index of first valid page, and last valid page */ + else if (pagestatus == STATE_PAGE_VALID) + { + if (nbvalidpage == 0U) + { + firstvalidpage = page; + } + lastvalidpage = page; + nbvalidpage++; + } + } + + /* Check if no active and no receive page have been detected */ + if (nbactivereceivepage == 0U) + { + /* Check if valid pages have been detected */ + if (nbvalidpage > 0U) + { + /* Check state of page just before first valid page. + If it is erasing page, then page after last valid page shall be set + to receiving state */ + if (GetPageState(PAGE_ADDRESS(PREVIOUS_PAGE(firstvalidpage))) == STATE_PAGE_ERASING) + { + if (SetPageState(FOLLOWING_PAGE(lastvalidpage), STATE_PAGE_RECEIVE) != EE_OK) + { + return EE_WRITE_ERROR; + } + } + } + /* Format flash pages used for eeprom emulation in case no active, no receive, no valid pages are found */ + else + { + return EE_Format(EE_FORCED_ERASE); + } + } + + /*********************************************************************/ + /* Step 3: Handle case of reset during transfer, by performing */ + /* transfer recovery */ + /*********************************************************************/ + + /* Browse all pages */ + for (page = START_PAGE; page < (START_PAGE + PAGES_NUMBER); page++) + { + pageaddress = PAGE_ADDRESS(page); + pagestatus = GetPageState(pageaddress); + + /* Check if there is receive page, meaning transfer has been interrupted */ + if (pagestatus == STATE_PAGE_RECEIVE) + { + /* Verify that receive page is a true one, not a corrupted page state */ + /* Check if page is not the first page of a bloc */ + if ((page != START_PAGE) && (page != (uint32_t)(START_PAGE + (PAGES_NUMBER / 2U)))) + { + /* Check that previous page is valid state */ + if (GetPageState(PAGE_ADDRESS(PREVIOUS_PAGE(page))) == STATE_PAGE_VALID) + { + /* The receive page is a true receive page */ + pagestate = STATE_RELIABLE; + } + else /* Previous page is not valid state */ + { + /* The receive page is false receive page due to header corruption */ + pagestate = STATE_CORRUPTED; + } + } + else /* The receive page is the first page of a bloc */ + { + /* Check that following page is erased state */ + if (GetPageState(PAGE_ADDRESS(FOLLOWING_PAGE(page))) == STATE_PAGE_ERASED) + { + /* The receive page is a true receive page */ + pagestate = STATE_RELIABLE; + } + else /* Following page is not erased state */ + { + /* The receive page is false receive page due to header corruption */ + pagestate = STATE_CORRUPTED; + } + } + + /* If the receive page is a true receive page, resume pages transfer */ + if (pagestate == STATE_RELIABLE) + { + /* Initialize current active page */ + ubCurrentActivePage = page; + + /* Resume the interrupted page transfer, using dummy new data */ +#ifndef FLASH_LINES_128B + if (PagesTransfer(0U, 0U, EE_TRANSFER_RECOVER) != EE_CLEANUP_REQUIRED) + { + return EE_TRANSFER_ERROR; + } +#else + if (PagesTransfer(0U, dummy_data, EE_TRANSFER_RECOVER) != EE_CLEANUP_REQUIRED) + { + return EE_TRANSFER_ERROR; + } +#endif + /* Memorize transfer recovery occured */ + recoverytransfer = 1U; + + /* transfer recovery is done, then stop searching receive page */ + break; + } + } + } + + /*********************************************************************/ + /* Step 4: Verify presence of one unique active page */ + /* If more than one active page, raise error */ + /* If no active page present, set missing active page */ + /*********************************************************************/ + + /* Browse all pages to search for active pages */ + nbactivepage = 0U; + for (page = START_PAGE; page < (START_PAGE + PAGES_NUMBER); page++) + { + pageaddress = PAGE_ADDRESS(page); + pagestatus = GetPageState(pageaddress); + + /* Search for active page */ + if (pagestatus == STATE_PAGE_ACTIVE) + { + /* Verify that active page is a true one, not a corrupted page state */ + /* Check if page is not the first page of a bloc */ + if ((page != START_PAGE) && (page != (uint32_t)(START_PAGE + (PAGES_NUMBER / 2U)))) + { + /* Check that previous page is valid state */ + if (GetPageState(PAGE_ADDRESS(PREVIOUS_PAGE(page))) == STATE_PAGE_VALID) + { + /* The active page is a true active page */ + pagestate = STATE_RELIABLE; + } + else /* Previous page is not valid state */ + { + /* The active page is false active page due to header corruption */ + pagestate = STATE_CORRUPTED; + } + } + else /* The active page is the first page of a bloc */ + { + /* Check that following page is erased state */ + if (GetPageState(PAGE_ADDRESS(FOLLOWING_PAGE(page))) == STATE_PAGE_ERASED) + { + /* The active page is a true active page */ + pagestate = STATE_RELIABLE; + } + else /* Following page is not erased state */ + { + /* The active page is false active page due to header corruption */ + pagestate = STATE_CORRUPTED; + } + } + + /* If the active page is a true active page, initialize global variables */ + if (pagestate == STATE_RELIABLE) + { + if (nbactivepage == 0U) + { + ubCurrentActivePage = page; + nbactivepage++; + } + else + { + /* Error: More than one reliable active page is present */ + return EE_INVALID_PAGE_SEQUENCE; + } + } + } + /* Keep index of last valid page, will be required in case no active page is found */ + else if (pagestatus == STATE_PAGE_VALID) + { + lastvalidpage = page; + } + } + + /* In case no active page is found, set page after last valid page to active state */ + if (nbactivepage == 0U) + { + ubCurrentActivePage = FOLLOWING_PAGE(lastvalidpage); + if (SetPageState(ubCurrentActivePage, STATE_PAGE_ACTIVE) != EE_OK) + { + return EE_WRITE_ERROR; + } + } + + /*********************************************************************/ + /* Step 5: Initialize eeprom emulation global variables relative */ + /* to active page */ + /*********************************************************************/ + + /* Initialize global variables, with elements detected in active page */ + uhNbWrittenElements = 0U; + uwAddressNextWrite = PAGE_HEADER_SIZE; + + for (varidx = PAGE_HEADER_SIZE; varidx < PAGE_SIZE; varidx += EE_ELEMENT_SIZE) + { + /* Check elements present in active page */ + addressvalue = (*(__IO EE_ELEMENT_TYPE*)(PAGE_ADDRESS(ubCurrentActivePage) + varidx)); +#ifdef FLASH_LINES_128B + addressvalue2 = (*(__IO EE_ELEMENT_TYPE*)(PAGE_ADDRESS(ubCurrentActivePage) + varidx + 8)); + if ((addressvalue != EE_MASK_FULL) || (addressvalue2 != EE_MASK_FULL)) +#else + if (addressvalue != EE_MASK_FULL) +#endif + { + /* Then increment uhNbWrittenElements and uwAddressNextWrite */ + uhNbWrittenElements++; + uwAddressNextWrite += EE_ELEMENT_SIZE; + } + else /* no more element in the page */ + { + break; + } + } + + /*********************************************************************/ + /* Step 6: Finalize eeprom emulation global variables relative */ + /* to valid pages, and check consistency of pages sequence */ + /*********************************************************************/ + + /* Check consistency of pages sequence: one active page, optionnally some valid pages before */ + /* Update global variable uhNbWrittenElements if valid pages are found */ + page = ubCurrentActivePage; + firstvalidpage = ubCurrentActivePage; + while ((page != START_PAGE) && (page != (uint32_t)(START_PAGE + (PAGES_NUMBER / 2U)))) + { + /* Decrement page index among circular pages list */ + page = PREVIOUS_PAGE(page); + pagestatus = GetPageState(PAGE_ADDRESS(page)); + + /* Check if page is valid state */ + if (pagestatus == STATE_PAGE_VALID) + { + /* Update uhNbWrittenElements with number of elements in full page */ + uhNbWrittenElements += NB_MAX_ELEMENTS_BY_PAGE; + + /* Keep index of first valid page */ + firstvalidpage = page; + } + else + { + /* Error: Pages sequence is not consistent */ + return EE_INVALID_PAGE_SEQUENCE; + } + } + + /*********************************************************************/ + /* Step 7: Ensure empty pages are erased */ + /*********************************************************************/ + + /* Ensure all pages after active page, until first valid page, are erased */ + page = FOLLOWING_PAGE(ubCurrentActivePage); + pageaddress = PAGE_ADDRESS(page); + + while (page != firstvalidpage) + { + /* Check if page erase has to be forced unconditionally (default case) */ + if (EraseType == EE_FORCED_ERASE) + { + /* Force page erase independently of its content */ + if (FI_PageErase(page, 1U) != EE_OK) + { + return EE_ERASE_ERROR; + } + } + else /* EraseType == EE_CONDITIONAL_ERASE */ + { + /* Check if page is fully erased */ + if (VerifyPageFullyErased(pageaddress, PAGE_SIZE) == EE_PAGE_NOTERASED) + { + /* Erase pages if not fully erased */ + if (FI_PageErase(page, 1U) != EE_OK) + { + return EE_ERASE_ERROR; + } + } + } + + /* Increment page index among circular pages list, to get first page to erased */ + page = FOLLOWING_PAGE(page); + pageaddress = PAGE_ADDRESS(page); + } + + /* To keep their coherency, flush the caches if needed depending on the product */ + FI_CacheFlush(); + + /*********************************************************************/ + /* Step 8: Perform dummy write '0' to get rid of potential */ + /* instability of line value 0xFFFFFFFF consecutive to a */ + /* reset during write here */ + /* Only needed if recovery transfer did not occured */ + /*********************************************************************/ + +if (recoverytransfer == 0U) + { + +#ifdef DUALCORE_FLASH_SHARING + status = VerifyPagesFullWriteVariable(0U, 0U, EE_INIT_WRITE); + + // The dummy write can be skipped in case pages are full + // because in this case potential instability can not happen + if ((status != EE_OK) && (status != EE_PAGE_FULL)) + { + return EE_WRITE_ERROR; + } +#else +#ifdef FLASH_LINES_128B + uint64_t to_write[2] = {0}; + status = VerifyPagesFullWriteVariable(0U, to_write, EE_INIT_WRITE); +#else + status = VerifyPagesFullWriteVariable(0U, 0U); +#endif + // The dummy write can be skipped in case pages are full + // because in this case potential instability can not happen + if ((status != EE_OK) && (status != EE_PAGE_FULL)) + { + return EE_WRITE_ERROR; + } +#endif + } + + return EE_OK; +} + +/** + * @brief Erases all flash pages of eeprom emulation, and set first page + * header as ACTIVE. + * @note This function can be called the very first time eeprom emulation is + * used, to prepare flash pages for eeprom emulation with empty eeprom + variables. It can also be called at any time, to flush all eeprom + * variables. + * @param EraseType: Type of erase to apply on page requiring to be erased. + * This parameter can be one of the following values: + * @arg @ref EE_FORCED_ERASE pages to erase are erased unconditionnally + * @arg @ref EE_CONDITIONAL_ERASE pages to erase are erased only if not fully erased + * @retval EE_Status + * - EE_OK: on success + * - EE error code: if an error occurs + */ +EE_Status EE_Format(EE_Erase_type EraseType) +{ + uint32_t page = 0U; + + /* Check if the configuration is 128-bits bank or 2*64-bits bank */ + if (FI_CheckBankConfig() != EE_OK) + { + return EE_INVALID_BANK_CFG; + } + +#ifdef DUALCORE_FLASH_SHARING + /* Inform CPU2 about Erase Activity */ + SHCI_C2_FLASH_EraseActivity(ERASE_ACTIVITY_ON); +#endif + + /* Erase All Pages */ + for (page = START_PAGE; page < (START_PAGE + PAGES_NUMBER); page++) + { + /* Check if page erase has to be forced unconditionally (default case) */ + if (EraseType == EE_FORCED_ERASE) + { + /* Force page erase independently of its content */ + if (FI_PageErase(page, 1U) != EE_OK) + { +#ifdef DUALCORE_FLASH_SHARING + /* Inform CPU2 about end of Erase Activity */ + SHCI_C2_FLASH_EraseActivity(ERASE_ACTIVITY_OFF); +#endif + return EE_ERASE_ERROR; + } + } + else /* EraseType == EE_CONDITIONAL_ERASE */ + { + /* Check if Page is not yet fully erased */ + if (VerifyPageFullyErased(PAGE_ADDRESS(page), PAGE_SIZE) == EE_PAGE_NOTERASED) + { + /* Erase the page */ + /* If Erase operation was failed, a Flash error code is returned */ + if (FI_PageErase(page, 1U) != EE_OK) + { +#ifdef DUALCORE_FLASH_SHARING + /* Inform CPU2 about end of Erase Activity */ + SHCI_C2_FLASH_EraseActivity(ERASE_ACTIVITY_OFF); +#endif + return EE_ERASE_ERROR; + } + } + } + } + + /* To keep their coherency, flush the caches if needed depending on the product */ + FI_CacheFlush(); + +#ifdef DUALCORE_FLASH_SHARING + /* Inform CPU2 about end of Erase Activity */ + SHCI_C2_FLASH_EraseActivity(ERASE_ACTIVITY_OFF); +#endif + + /* Set first Page in Active State */ + /* If program operation was failed, a Flash error code is returned */ + if (SetPageState(START_PAGE, STATE_PAGE_ACTIVE) != EE_OK) + { + return EE_WRITE_ERROR; + } + + /* Reset global variables */ + uhNbWrittenElements = (uint16_t)0U; + ubCurrentActivePage = START_PAGE; + uwAddressNextWrite = PAGE_HEADER_SIZE; /* Initialize write position just after page header */ + + return EE_OK; +} + +#if defined(FLASH_LINES_128B) +/** + * @brief Returns the last stored variable data, if found, which correspond to + * the passed virtual address + * @param VirtAddress Variable virtual address on 16 bits (can't be 0x0000 or 0xFFFF) + * @param Data 96bits data to be written pointed by a uin64_t pointer + * @retval EE_Status + * - EE_OK: if variable was found + * - EE error code: if an error occurs + */ +EE_Status EE_ReadVariable96bits(uint16_t VirtAddress, uint64_t* pData) +{ + if((VirtAddress != 0x0000) && (VirtAddress != 0xFFFF)) + { + EE_Status status = EE_OK; + + /* Read variable of size EE_DATA_TYPE */ + status = ReadVariable(VirtAddress, pData); + + return status; + } + else + { + return EE_INVALID_VIRTUALADDRESS; + } +} +#endif + +#if defined(EE_ACCESS_32BITS) +/** + * @brief Returns the last stored variable data, if found, which correspond to + * the passed virtual address + * @param VirtAddress Variable virtual address on 16 bits (can't be 0x0000 or 0xFFFF) + * @param pData Variable containing the 32bits read variable value + * @retval EE_Status + * - EE_OK: if variable was found + * - EE error code: if an error occurs + */ +EE_Status EE_ReadVariable32bits(uint16_t VirtAddress, uint32_t* pData) +{ + if((VirtAddress != 0x0000) && (VirtAddress != 0xFFFF)) + { + EE_DATA_TYPE datatmp = 0U; + EE_Status status = EE_OK; + + /* Read variable of size EE_DATA_TYPE, then cast it to 32bits */ + status = ReadVariable(VirtAddress, &datatmp); + *pData = (uint32_t) datatmp; + + return status; + } + else + { + return EE_INVALID_VIRTUALADDRESS; + } +} +#endif + +/** + * @brief Returns the last stored variable data, if found, which correspond to + * the passed virtual address + * @param VirtAddress Variable virtual address on 16 bits (can't be 0x0000 or 0xFFFF) + * @param pData Variable containing the 16bits read variable value + * @retval EE_Status + * - EE_OK: if variable was found + * - EE error code: if an error occurs + */ +EE_Status EE_ReadVariable16bits(uint16_t VirtAddress, uint16_t* pData) +{ + if((VirtAddress != 0x0000) && (VirtAddress != 0xFFFF)) + { + EE_DATA_TYPE datatmp = 0U; + EE_Status status = EE_OK; + + /* Read variable of size EE_DATA_TYPE, then cast it to 16bits */ + status = ReadVariable(VirtAddress, &datatmp); + *pData = (uint16_t) datatmp; + + return status; + } + else + { + return EE_INVALID_VIRTUALADDRESS; + } +} + +/** + * @brief Returns the last stored variable data, if found, which correspond to + * the passed virtual address + * @param VirtAddress Variable virtual address on 16 bits (can't be 0x0000 or 0xFFFF) + * @param pData Variable containing the 8bits read variable value + * @retval EE_Status + * - EE_OK: if variable was found + * - EE error code: if an error occurs + */ +EE_Status EE_ReadVariable8bits(uint16_t VirtAddress, uint8_t* pData) +{ + if((VirtAddress != 0x0000) && (VirtAddress != 0xFFFF)) + { + EE_DATA_TYPE datatmp = 0U; + EE_Status status = EE_OK; + + /* Read variable of size EE_DATA_TYPE, then cast it to 8bits */ + status = ReadVariable(VirtAddress, &datatmp); + *pData = (uint8_t) datatmp; + + return status; + } + else + { + return EE_INVALID_VIRTUALADDRESS; + } +} + +#if defined(FLASH_LINES_128B) +/** + * @brief Writes/updates variable data in EEPROM. + * Trig internal Pages transfer if half of the pages are full. + * @warning This function is not reentrant + * @param VirtAddress Variable virtual address on 16 bits (can't be 0x0000 or 0xFFFF) + * @param Data 96bits data to be written pointed by a uin64_t pointer + * @retval EE_Status + * - EE_OK: on success + * - EE_CLEANUP_REQUIRED: success and user has to trig flash pages cleanup + * - EE error code: if an error occurs + */ +EE_Status EE_WriteVariable96bits(uint16_t VirtAddress, uint64_t* Data) +{ + if((VirtAddress != 0x0000) && (VirtAddress != 0xFFFF)) + { + return WriteVariable(VirtAddress, (EE_DATA_TYPE*)Data); + } + else + { + return EE_INVALID_VIRTUALADDRESS; + } +} +#endif + +#if defined(EE_ACCESS_32BITS) +/** + * @brief Writes/updates variable data in EEPROM. + * Trig internal Pages transfer if half of the pages are full. + * @warning This function is not reentrant + * @param VirtAddress Variable virtual address on 16 bits (can't be 0x0000 or 0xFFFF) + * @param Data 32bits data to be written + * @retval EE_Status + * - EE_OK: on success + * - EE_CLEANUP_REQUIRED: success and user has to trig flash pages cleanup + * - EE error code: if an error occurs + */ +EE_Status EE_WriteVariable32bits(uint16_t VirtAddress, uint32_t Data) +{ + if((VirtAddress != 0x0000) && (VirtAddress != 0xFFFF)) + { +#ifndef FLASH_LINES_128B + return WriteVariable(VirtAddress, (EE_DATA_TYPE) Data); +#else + return WriteVariable(VirtAddress, (EE_DATA_TYPE*) &Data); +#endif + } + else + { + return EE_INVALID_VIRTUALADDRESS; + } +} +#endif + +/** + * @brief Writes/updates variable data in EEPROM. + * Trig internal Pages transfer if half of the pages are full. + * @warning This function is not reentrant + * @param VirtAddress Variable virtual address on 16 bits (can't be 0x0000 or 0xFFFF) + * @param Data 16bits data to be written + * @retval EE_Status + * - EE_OK: on success + * - EE_CLEANUP_REQUIRED: success and user has to trig flash pages cleanup + * - EE error code: if an error occurs + */ +EE_Status EE_WriteVariable16bits(uint16_t VirtAddress, uint16_t Data) +{ + if((VirtAddress != 0x0000) && (VirtAddress != 0xFFFF)) + { +#ifndef FLASH_LINES_128B + return WriteVariable(VirtAddress, (EE_DATA_TYPE) Data); +#else + return WriteVariable(VirtAddress, (EE_DATA_TYPE*) &Data); +#endif + } + else + { + return EE_INVALID_VIRTUALADDRESS; + } +} + +/** + * @brief Writes/updates variable data in EEPROM. + * Trig internal Pages transfer if half of the pages are full. + * @warning This function is not reentrant + * @param VirtAddress Variable virtual address on 16 bits (can't be 0x0000 or 0xFFFF) + * @param Data 8bits data to be written + * @retval EE_Status + * - EE_OK: on success + * - EE_CLEANUP_REQUIRED: success and user has to trig flash pages cleanup + * - EE error code: if an error occurs + */ +EE_Status EE_WriteVariable8bits(uint16_t VirtAddress, uint8_t Data) +{ + if((VirtAddress != 0x0000) && (VirtAddress != 0xFFFF)) + { +#ifndef FLASH_LINES_128B + return WriteVariable(VirtAddress, (EE_DATA_TYPE) Data); +#else + return WriteVariable(VirtAddress, (EE_DATA_TYPE*) &Data); +#endif + } + else + { + return EE_INVALID_VIRTUALADDRESS; + } +} + +/** + * @brief Erase group of pages which are erasing state, in polling mode. + * Could be either first half or second half of total pages number. + * @note This function should be called when EE_WriteVariableXXbits has + * returned EE_CLEANUP_REQUIRED status (and only in that case) + * @retval EE_Status + * - EE_OK: in case of success + * - EE error code: if an error occurs + */ +EE_Status EE_CleanUp(void) +{ + uint32_t firstpage = 0U, page = 0U; + uint32_t firstpageaddress = 0U, pageaddress = 0U; + EE_State_type firstpagestatus = STATE_PAGE_INVALID, pagestatus = STATE_PAGE_INVALID; + + /* Check first half and second half page group */ + for (firstpage = START_PAGE; firstpage < (START_PAGE + PAGES_NUMBER); firstpage += (PAGES_NUMBER / 2U)) + { + /* Check status of first page of the group */ + firstpageaddress = PAGE_ADDRESS(firstpage); + firstpagestatus = GetPageState(firstpageaddress); + + /* If first page of the group is erasing state, check that all other pages + of the group are also erasing state */ + if (firstpagestatus == STATE_PAGE_ERASING) + { + for (page = (firstpage + 1U); page < (firstpage + (PAGES_NUMBER / 2U)); page++) + { + pageaddress = PAGE_ADDRESS(page); + pagestatus = GetPageState(pageaddress); + + /* If page is not erasing, return error */ + if (pagestatus != STATE_PAGE_ERASING) + { + return EE_ERROR_NOERASING_PAGE; + } + } + +#ifdef DUALCORE_FLASH_SHARING + /* Inform CPU2 about Erase Activity */ + SHCI_C2_FLASH_EraseActivity(ERASE_ACTIVITY_ON); +#endif + + /* Erase all the pages of the group */ + /* If erase operation fails, a Flash error code is returned */ + if (FI_PageErase(firstpage, PAGES_NUMBER / 2U) != EE_OK) + { +#ifdef DUALCORE_FLASH_SHARING + /* Inform CPU2 about end of Erase Activity */ + SHCI_C2_FLASH_EraseActivity(ERASE_ACTIVITY_OFF); +#endif + return EE_ERASE_ERROR; + } + else + { +#ifdef DUALCORE_FLASH_SHARING + /* Inform CPU2 about end of Erase Activity */ + SHCI_C2_FLASH_EraseActivity(ERASE_ACTIVITY_OFF); +#endif + + /* To keep their coherency, flush the caches if needed depending on the product */ + FI_CacheFlush(); + + return EE_OK; + } + } + } + + /* Error if no erasing pages group is found */ + return EE_ERROR_NOERASING_PAGE; +} + +/** + * @brief Erase group of pages which are erasing state, in IT mode. + * Could be either first half or second half of total pages number. + * @note This function should be called when EE_WriteVariableXXbits has + * returned EE_CLEANUP_REQUIRED status (and only in that case) + * @retval EE_Status + * - EE_OK: in case of success + * - EE error code: if an error occurs + */ +EE_Status EE_CleanUp_IT(void) +{ + uint32_t firstpage = 0U, page = 0U; + uint32_t firstpageaddress = 0U, pageaddress = 0U; + EE_State_type firstpagestatus = STATE_PAGE_INVALID, pagestatus = STATE_PAGE_INVALID; + + /* Check first half and second half page group */ + for (firstpage = START_PAGE; firstpage < (START_PAGE + PAGES_NUMBER); firstpage += (PAGES_NUMBER / 2U)) + { + /* Check status of first page of the group */ + firstpageaddress = PAGE_ADDRESS(firstpage); + firstpagestatus = GetPageState(firstpageaddress); + + /* If first page of the group is erasing state, check that all other pages + of the group are also erasing state */ + if (firstpagestatus == STATE_PAGE_ERASING) + { + for (page = (firstpage + 1U); page < (firstpage + (PAGES_NUMBER / 2U)); page++) + { + pageaddress = PAGE_ADDRESS(page); + pagestatus = GetPageState(pageaddress); + + /* If page is not erasing, return error */ + if (pagestatus != STATE_PAGE_ERASING) + { + return EE_ERROR_NOERASING_PAGE; + } + } + +#ifdef DUALCORE_FLASH_SHARING + /* Inform CPU2 about Erase Activity */ + SHCI_C2_FLASH_EraseActivity(ERASE_ACTIVITY_ON); +#endif + + /* Erase all the pages of the group */ + /* If erase operation fails, a Flash error code is returned */ + if (FI_PageErase_IT(firstpage, PAGES_NUMBER / 2U) != EE_OK) + { + return EE_ERASE_ERROR; + } + else + { + /* To keep their coherency, flush the caches if needed depending on the product */ + FI_CacheFlush(); + return EE_OK; + } + } + } + + /* Error if no erasing pages group is found */ + return EE_ERROR_NOERASING_PAGE; +} + +/** + * @brief Delete corrupted Flash address, can be called under NMI. + * @param Address Address of the FLASH Memory to delete + * @retval EE_Status + * - EE_OK: on success + * - EE error code: if an error occurs + */ +EE_Status EE_DeleteCorruptedFlashAddress(uint32_t Address) +{ + return FI_DeleteCorruptedFlashAddress(Address); +} + +/** + * @brief Clean Up end of operation interrupt callback. + * @retval None + */ +__weak void EE_EndOfCleanup_UserCallback(void) +{ + /* NOTE : This function should not be modified, when the callback is needed, + the EE_EndOfCleanup_UserCallback could be implemented in the user file + */ +} + +/** + * @} + */ + +/* Private functions ---------------------------------------------------------*/ +/** @addtogroup EEPROM_Private_Functions + * @{ + */ + +/** + * @brief Returns the last stored variable data, if found, which correspond to + * the passed virtual address + * @param VirtAddress Variable virtual address on 16 bits (can't be 0x0000 or 0xFFFF) + * @param pData Variable containing the EE_DATA_TYPE read variable value + * @retval EE_Status + * - EE_OK: if variable was found + * - EE error code: if an error occurs + */ +#ifndef FLASH_LINES_128B +static EE_Status ReadVariable(uint16_t VirtAddress, EE_DATA_TYPE* pData) +#else +static EE_Status ReadVariable(uint16_t VirtAddress, EE_DATA_TYPE* pData) +#endif +{ + EE_ELEMENT_TYPE addressvalue = 0U; +#ifdef FLASH_LINES_128B + EE_ELEMENT_TYPE addressvalue2 = 0U; +#endif + uint32_t page = 0U, pageaddress = 0U, counter = 0U, crc = 0U; + EE_State_type pagestate = STATE_PAGE_INVALID; + + /* Get active Page for read operation */ + page = FindPage(FIND_READ_PAGE); + + /* Check if there is no active page */ + if (page == EE_NO_PAGE_FOUND) + { + return EE_ERROR_NOACTIVE_PAGE; + } + pageaddress = PAGE_ADDRESS(page); + pagestate = GetPageState(pageaddress); + + /* Search variable in active page and valid pages until erased page is found + or in erasing pages until erased page is found */ + while ((pagestate == STATE_PAGE_ACTIVE) || (pagestate == STATE_PAGE_VALID) || (pagestate == STATE_PAGE_ERASING)) + { + /* Set counter index to last element position in the page */ + counter = PAGE_SIZE - EE_ELEMENT_SIZE; + + /* Check each page address starting from end */ + while (counter >= PAGE_HEADER_SIZE) + { + /* Get the current location content to be compared with virtual address */ + addressvalue = (*(__IO EE_ELEMENT_TYPE*)(pageaddress + counter)); +#ifndef FLASH_LINES_128B + if (addressvalue != EE_PAGESTAT_ERASED) + { + /* Compare the read address with the virtual address */ + if (EE_VIRTUALADDRESS_VALUE(addressvalue) == VirtAddress) + { + /* Calculate crc of variable data and virtual address */ + crc = CalculateCrc(EE_DATA_VALUE(addressvalue), EE_VIRTUALADDRESS_VALUE(addressvalue)); + + /* if crc verification pass, data is correct and is returned. + if crc verification fails, data is corrupted and has to be skip */ + if (crc == EE_CRC_VALUE(addressvalue)) + { + /* Get content of variable value */ + *pData = EE_DATA_VALUE(addressvalue); + + return EE_OK; + } + } + } +#else + addressvalue2 = (*(__IO EE_ELEMENT_TYPE*)(pageaddress + counter+8U)); + if ((addressvalue != EE_PAGESTAT_ERASED) || (addressvalue2 != EE_PAGESTAT_ERASED)) + { + /* Compare the read address with the virtual address */ + if (EE_VIRTUALADDRESS_VALUE(addressvalue) == VirtAddress) + { + /* Calculate crc of variable data and virtual address */ + crc = CalculateCrc((uint64_t)addressvalue2,(uint64_t)addressvalue); + + /* if crc verification pass, data is correct and is returned. + if crc verification fails, data is corrupted and has to be skip */ + if (crc == EE_CRC_VALUE(addressvalue)) + { + /* Get content of variable value */ + pData[0] = (uint64_t)addressvalue2; + pData[1] = (uint64_t)(addressvalue >> EE_DATA_SHIFT); + + return EE_OK; + } + } + } +#endif + /* Next address location */ + counter -= EE_ELEMENT_SIZE; + } + + /* Decrement page index circularly, among pages allocated to eeprom emulation */ + page = PREVIOUS_PAGE(page); + pageaddress = PAGE_ADDRESS(page); + pagestate = GetPageState(pageaddress); + } + + /* Variable is not found */ + return EE_NO_DATA; +} + +/** + * @brief Writes/updates variable data in EEPROM + * Trig internal Pages transfer if half of the pages are full + * @param VirtAddress Variable virtual address on 16 bits (can't be 0x0000 or 0xFFFF) + * @param Data EE_DATA_TYPE data to be written + * @retval EE_Status + * - EE_OK: on success, without page transfer + * - EE_CLEANUP_REQUIRED: on success, with page transfer occured + * - EE_FLASH_USED: flash currently used by CPU2 + * - EE error code: if an error occurs + */ +#ifndef FLASH_LINES_128B +static EE_Status WriteVariable(uint16_t VirtAddress, EE_DATA_TYPE Data) +#else +static EE_Status WriteVariable(uint16_t VirtAddress, EE_DATA_TYPE* Data) +#endif +{ + EE_Status status = EE_OK; + + /* Write the variable virtual address and value in the EEPROM, if not full */ +#if defined (DUALCORE_FLASH_SHARING) || defined (FLASH_LINES_128B) + status = VerifyPagesFullWriteVariable(VirtAddress, Data, EE_SIMPLE_WRITE); +#else + status = VerifyPagesFullWriteVariable(VirtAddress, Data); +#endif + if (status == EE_PAGE_FULL) + { + /* In case the EEPROM pages are full, perform Pages transfer */ + return PagesTransfer(VirtAddress, Data, EE_TRANSFER_NORMAL); + } + + /* Return last operation status */ + return status; +} + +/** + * @brief Verify if specified page is fully erased. + * @param Address page address + * @param PageSize page size + * @retval EE_Status + * - EE_PAGE_NOTERASED : if Page not erased + * - EE_PAGE_ERASED : if Page erased + */ +static EE_Status VerifyPageFullyErased(uint32_t Address, uint32_t PageSize) +{ + EE_Status readstatus = EE_PAGE_ERASED; + uint32_t counter = 0U; + + /* Check each element in the page */ + while (counter < PageSize) + { + /* Compare the read address with the virtual address */ +#ifndef FLASH_LINES_128B + if ((*(__IO EE_ELEMENT_TYPE*)(Address+counter)) != EE_PAGESTAT_ERASED) +#else + if ( ((*(__IO EE_ELEMENT_TYPE*)(Address+counter)) != EE_PAGESTAT_ERASED) && ((*(__IO EE_ELEMENT_TYPE*)(Address+counter+8U)) != EE_PAGESTAT_ERASED) ) +#endif + { + /* In case one element is not erased, reset readstatus flag */ + readstatus = EE_PAGE_NOTERASED; + } + /* Next address location */ + counter = counter + EE_ELEMENT_SIZE; + } + + /* Return readstatus value */ + return readstatus; +} + +/** + * @brief Find suitable page for read/write/erase operation. + * It also update pages state if current page is full. + * And it force cleanup if all pages are full. + * @param Operation Type of page to be requested. + * This parameter can be one of the following values: + * @arg @ref FIND_READ_PAGE return the active page index + * @arg @ref FIND_WRITE_PAGE return the write page index + * @arg @ref FIND_ERASE_PAGE return the erase page index + * @retval Page_Index + * - Page Index: on success + * - @ref EE_NO_PAGE_FOUND : if an error occurs + */ +static uint32_t FindPage(EE_Find_type Operation) +{ + EE_State_type currentpagestatus = STATE_PAGE_INVALID, followingpagestatus = STATE_PAGE_INVALID; + uint32_t currentpage = 0U, followingpage = 0U, previouspage = 0U; + + /* Get currentpage status */ + currentpage = ubCurrentActivePage; + currentpagestatus = GetPageState(PAGE_ADDRESS(currentpage)); + + /* Get followingpage status */ + followingpage = FOLLOWING_PAGE(currentpage); + followingpagestatus = GetPageState(PAGE_ADDRESS(followingpage)); + + /* Get previouspage status */ + previouspage = PREVIOUS_PAGE(currentpage); + + /* Write, read or erase operation */ + switch (Operation) + { + case FIND_WRITE_PAGE: /* ---- Write operation ---- */ + /* Normal operation, no page transfer on going */ + if (currentpagestatus == STATE_PAGE_ACTIVE) + { + /* Check if active page is not full */ + if (uwAddressNextWrite < PAGE_SIZE) + { + /* Return current Active page */ + return currentpage; + } + else + /* No more space in current active page */ + { + /* Check if following page is erasing state */ + if (followingpagestatus == STATE_PAGE_ERASING) + { + /* Force Cleanup, as not yet performed by user */ + if (EE_CleanUp() != EE_OK) + { + return EE_NO_PAGE_FOUND; + } + } + + /* Set current active page in valid state */ + if (SetPageState(currentpage, STATE_PAGE_VALID) != EE_OK) + { + return EE_NO_PAGE_FOUND; + } + + /* Set following page as active */ + if (SetPageState(followingpage, STATE_PAGE_ACTIVE) != EE_OK) + { + return EE_NO_PAGE_FOUND; + } + uwAddressNextWrite = PAGE_HEADER_SIZE; /* Skip page header */ + return followingpage; /* Following page is now active one */ + } + } + /* Transfer is on going, page receiving data */ + else + { + if (currentpagestatus == STATE_PAGE_RECEIVE) + { + /* Check if receive page is not full */ + if (uwAddressNextWrite < PAGE_SIZE) + { + /* Return current receive page */ + return currentpage; + } + else + /* No more space in current receive page */ + { + /* Check if following page is erasing state */ + if (followingpagestatus == STATE_PAGE_ERASING) + { + /* Force Cleanup, as not yet performed by user */ + if (EE_CleanUp() != EE_OK) + { + return EE_NO_PAGE_FOUND; + } + } + + /* Set current receive page in valid state */ + if (SetPageState(currentpage, STATE_PAGE_VALID) != EE_OK) + { + return EE_NO_PAGE_FOUND; + } + + /* Set following page as receive */ + if (SetPageState(followingpage, STATE_PAGE_RECEIVE) != EE_OK) + { + return EE_NO_PAGE_FOUND; + } + uwAddressNextWrite = PAGE_HEADER_SIZE; /* Skip page header */ + return followingpage; /* Following page is now active one */ + } + } + else + { + return EE_NO_PAGE_FOUND; /* No active Page */ + } + } + + case FIND_READ_PAGE: /* ---- Read operation ---- */ + if (currentpagestatus == STATE_PAGE_ACTIVE) + { + return currentpage; + } + else + { + if (currentpagestatus == STATE_PAGE_RECEIVE) + { + return previouspage; + } + else + { + return EE_NO_PAGE_FOUND; /* No active Page */ + } + } + + case FIND_ERASE_PAGE: /* ---- Return the erased page */ + if (followingpagestatus == STATE_PAGE_ERASED) + { + return followingpage; + } + else + { + return EE_NO_PAGE_FOUND; /* No erased Page */ + } + + default: + ; + } + + return EE_NO_PAGE_FOUND; +} + +/** + * @brief Writes a new variable data in fresh new page in case of normal + * transfer, and transfers last updated elements from full pages to + * empty pages in any cases. + * @param VirtAddress 16 bit virtual address of the new variable data + * @param Data @ref EE_DATA_TYPE data value of the new variable data + * @param Type Type of transfer. + * This parameter can be one of the EE_Transfer_type enum values. + * @arg @ref EE_TRANSFER_NORMAL Pages transfer during normal processing + * @arg @ref EE_TRANSFER_RECOVER Recovering pages transfer at Init + * @retval EE_Status + * - EE_CLEANUP_REQUIRED: on success + * - EE error code: if an error occurs + */ +#ifndef FLASH_LINES_128B +static EE_Status PagesTransfer(uint16_t VirtAddress, EE_DATA_TYPE Data, EE_Transfer_type Type) +#else +static EE_Status PagesTransfer(uint16_t VirtAddress, EE_DATA_TYPE* Data, EE_Transfer_type Type) +#endif +{ + EE_State_type pagestatus = STATE_PAGE_INVALID; + uint32_t pageaddress = 0U; + uint32_t page = 0U; + uint32_t varidx = 0U; + EE_ELEMENT_TYPE addressvalue = 0U; +#ifdef FLASH_LINES_128B + EE_ELEMENT_TYPE addressvalue2 = 0U; + uint16_t nb_dummy_lines=0U; +#endif + EE_Status status = EE_OK; + EE_DATA_TYPE DataValue = 0U; + + + /* Get receive Page for transfer operation */ + page = FindPage((Type == EE_TRANSFER_NORMAL?FIND_ERASE_PAGE:FIND_WRITE_PAGE)); + if (page == EE_NO_PAGE_FOUND) + { + return EE_ERROR_NOERASE_PAGE; + } + + /* Reinitialize number of data written in the pages, and current active page */ + uhNbWrittenElements = 0U; + ubCurrentActivePage = page; + uwAddressNextWrite = PAGE_HEADER_SIZE; + + /* Mark the erased page at receive state in case of normal transfer */ + /* It is already the case in recover transfer case */ + /* If program operation was failed, a Flash error code is returned */ + if (Type == EE_TRANSFER_NORMAL) + { + if (SetPageState(page, STATE_PAGE_RECEIVE) != EE_OK) + { + return EE_WRITE_ERROR; + } + } + + /* Set the previous active page and all previous valid pages to erasing state */ + /* In case of recover transfer, some of these pages may already be marked erasing */ + page = PREVIOUS_PAGE(page); + pageaddress = PAGE_ADDRESS(page); + pagestatus = GetPageState(pageaddress); + + if ((pagestatus == STATE_PAGE_ACTIVE) || (pagestatus == STATE_PAGE_ERASING)) + { + /* Set active page to erasing */ + if (pagestatus == STATE_PAGE_ACTIVE) + { + if (SetPageState(page, STATE_PAGE_ERASING) != EE_OK) + { + return EE_WRITE_ERROR; + } + } + + /* Inspect the previous pages to set all valid pages to erasing state */ + /* In case of recover, some valid pages may be already erasing state */ + page = PREVIOUS_PAGE(page); + pageaddress = PAGE_ADDRESS(page); + pagestatus = GetPageState(pageaddress); + + while ((pagestatus == STATE_PAGE_VALID) || (pagestatus == STATE_PAGE_ERASING)) + { + /* Set valid page to erasing */ + if (pagestatus == STATE_PAGE_VALID) + { + if (SetPageState(page, STATE_PAGE_ERASING) != EE_OK) + { + return EE_WRITE_ERROR; + } + } + + /* decrement page index */ + page = PREVIOUS_PAGE(page); + pageaddress = PAGE_ADDRESS(page); + pagestatus = GetPageState(pageaddress); + } + } + else + { + if ((Type == EE_TRANSFER_RECOVER) && (pagestatus == STATE_PAGE_VALID)) + { + /* This can happen in case of recover transfer. It indicates that previous */ + /* transfer goes far enough to fill a complete receive page at least */ + /* (valid state). Then erasing state marking was already completed */ + } + else + { + /* Inconsistent previous page state */ + return EE_INVALID_PAGE_SEQUENCE; + } + } + + /* In case of recover transfer, transfer must be resumed where it has been stopped */ + /* Update global variables to reflect current transfer status */ + if (Type == EE_TRANSFER_RECOVER) + { +#ifdef FLASH_LINES_128B + nb_dummy_lines=0; +#endif + /* Count number of elements already transferred in current receive page */ + for (varidx = PAGE_HEADER_SIZE; varidx < PAGE_SIZE; varidx += EE_ELEMENT_SIZE) + { + /* Get next element in receive page */ + addressvalue = (*(__IO EE_ELEMENT_TYPE*)(PAGE_ADDRESS(ubCurrentActivePage) + varidx)); + +#ifdef FLASH_LINES_128B + addressvalue2 = (*(__IO EE_ELEMENT_TYPE*)(PAGE_ADDRESS(ubCurrentActivePage) + varidx + 8)); + + /* Check if element is valid */ + if((addressvalue == 0x0000000000000000U)&& (addressvalue2 == 0x0000000000000000U)) + { + nb_dummy_lines++; + uhNbWrittenElements++; + uwAddressNextWrite += EE_ELEMENT_SIZE; + } + else if ((addressvalue != EE_PAGESTAT_ERASED) || (addressvalue2 != EE_PAGESTAT_ERASED)&&(addressvalue != 0x0000000000000000U)|| (addressvalue2 != 0x0000000000000000U)) +#else + if (addressvalue != EE_PAGESTAT_ERASED) +#endif + { + /* Update global variables accordingly */ + uhNbWrittenElements++; + uwAddressNextWrite += EE_ELEMENT_SIZE; + } + else + { + break; + } + } + + /* Count number of elements already transferred in previous valid pages */ + page = ubCurrentActivePage; + for (varidx = 0U; varidx < PAGES_NUMBER; varidx++) + { + /* Decrement page index among circular pages list */ + page = PREVIOUS_PAGE(page); + pagestatus = GetPageState(PAGE_ADDRESS(page)); + + /* Check if page is valid state */ + if (pagestatus == STATE_PAGE_VALID) + { + /* Update uhNbWrittenElements with number of elements in page */ + uhNbWrittenElements += NB_MAX_ELEMENTS_BY_PAGE; +#ifdef FLASH_LINES_128B + nb_dummy_lines=nb_dummy_lines+2; +#endif + } + else + { + break; + } + } + } + +#if defined (DUALCORE_FLASH_SHARING) || defined (FLASH_LINES_128B) + if (VerifyPagesFullWriteVariable(VirtAddress, Data, EE_TRANSFER) != EE_OK) + { + return EE_WRITE_ERROR; + } + #ifdef FLASH_LINES_128B + else + { + if ((Data[0]==0)&&(Data[1]==0)) + { + nb_dummy_lines++; //One 128bit line of zeros has been written + } + } + #endif +#else + + // Write the variable passed as parameter in the new active page + // If program operation was failed, a Flash error code is returned + if (VerifyPagesFullWriteVariable(VirtAddress, Data) != EE_OK) + { + return EE_WRITE_ERROR; + } + +#endif + + + /* Transfer process: transfer variables from old to the new active page */ + /* First element in receive page can be any one, the following elements are */ + /* ordered from the beginning. */ + /* In case of recovery, Pre-Last element in receive page could be */ + /* corrupted if reset occured during write of this element, */ + /* and last element is dummy value that we have just written. */ + /* Transfer shall then resume from (uhNbWrittenElements-3) variable index */ + + +#ifdef FLASH_LINES_128B + varidx = (uhNbWrittenElements >= 3U?(uhNbWrittenElements-3U+1U):1U); + for (varidx = (varidx >= nb_dummy_lines?(varidx-nb_dummy_lines):1U); varidx < NB_OF_VARIABLES+1; varidx++) +#else + for (varidx = (uhNbWrittenElements >= 3U?(uhNbWrittenElements-3U+1U):1U); varidx < NB_OF_VARIABLES+1; varidx++) +#endif + { + /* Check each variable except the one passed as parameter */ + if (varidx != VirtAddress) + { + /* Read the last variable updates */ + status = ReadVariable(varidx, &DataValue); + if (status == EE_OK) + { + /* In case variable corresponding to the virtual address was found */ + /* Transfer the variable to the new active page */ + /* If program operation was failed, a Flash error code is returned */ + #if defined (DUALCORE_FLASH_SHARING) + status = VerifyPagesFullWriteVariable(varidx, DataValue, EE_TRANSFER); + #elif defined (FLASH_LINES_128B) + status = VerifyPagesFullWriteVariable(varidx, &DataValue, EE_TRANSFER); + #else + status = VerifyPagesFullWriteVariable(varidx, DataValue); + #endif + if (status != EE_OK) + { + return status; + } + } + else + { + if (status != EE_NO_DATA) + { + /* In case variable is not found , do nothing */ + /* Any other status is error code occurs during variable read */ + return status; + } + } + } + } + + /* Transfer is now done, mark the receive state page as active */ + if (SetPageState(ubCurrentActivePage, STATE_PAGE_ACTIVE) != EE_OK) + { + return EE_WRITE_ERROR; + } + + /* Return last operation flash status */ + return EE_CLEANUP_REQUIRED; +} + +/** + * @brief Verify if pages are full + * then if not the case, writes variable in EEPROM. + * @param VirtAddress 16 bit virtual address of the variable + * @param Data @ref EE_DATA_TYPE data to be written as variable value + * @param Write_type Type of writing on going (see EE_Write_type) + * @retval EE_Status + * - EE_OK: on success + * - EE_FULL: if half pages are full + * - EE_FLASH_USED: flash currently used by CPU2 + * - EE error code: if an error occurs + */ +#if defined (DUALCORE_FLASH_SHARING) +static EE_Status VerifyPagesFullWriteVariable(uint16_t VirtAddress, EE_DATA_TYPE Data, EE_Write_type Write_type) +#elif defined (FLASH_LINES_128B) +static EE_Status VerifyPagesFullWriteVariable(uint16_t VirtAddress, EE_DATA_TYPE* Data, EE_Write_type Write_type) +#else +static EE_Status VerifyPagesFullWriteVariable(uint16_t VirtAddress, EE_DATA_TYPE Data) +#endif +{ +#ifndef FLASH_LINES_128B + uint32_t crc = 0U; +#else + uint64_t pData64[2] = {0,0}; + uint64_t crc = 0U; +#endif + + /* Check if pages are full, i.e. max number of written elements achieved */ + if (uhNbWrittenElements >= NB_MAX_WRITTEN_ELEMENTS) + { + return EE_PAGE_FULL; + } + + /* Get active Page for write operation */ + uint32_t activepage = FindPage(FIND_WRITE_PAGE); + uint32_t activepageaddress = 0U; + + /* Check if there is no active page */ + if (activepage == EE_NO_PAGE_FOUND) + { + return EE_ERROR_NOACTIVE_PAGE; + } + + activepageaddress = PAGE_ADDRESS(activepage); + + /* Force crc to 0 in case of Data/VirtAddress are 0*/ +#ifndef FLASH_LINES_128B + if ((Data == 0U) && (VirtAddress == 0U)) +#else + if ((Data[0] == 0U) && (Data[1] == 0U) && (VirtAddress == 0U)) + +#endif + { + crc = 0U; + } + else + { +#ifndef FLASH_LINES_128B + /* Calculate crc of variable data and virtual address */ + crc = CalculateCrc(Data, VirtAddress); +#else + pData64[0] = (uint64_t)((Data[1] << EE_DATA_SHIFT) | VirtAddress); + /* Calculate crc of variable data and virtual address */ + crc = CalculateCrc(Data[0], pData64[0]); +#endif + } + + +#if defined (DUALCORE_FLASH_SHARING) + /* Program variable data + virtual address + crc */ + /* If program operation was failed, a Flash error code or the information + about the semaphore monitoring flash being taken is returned */ + EE_Status ee_status = FI_WriteDoubleWord(activepageaddress+uwAddressNextWrite, EE_ELEMENT_VALUE(VirtAddress,Data,crc), Write_type); + if (ee_status != EE_OK) return ee_status; +#elif defined (FLASH_LINES_128B) + pData64[0] = 0; + pData64[1] = 0; + pData64[0] = (uint64_t)((Data[1]<< EE_DATA_SHIFT) | (crc << EE_CRC_SHIFT) | VirtAddress); + pData64[1] = (uint64_t)Data[0]; + + EE_Status ee_status = FI_WriteDoubleWord(activepageaddress+uwAddressNextWrite, pData64, Write_type); + if (ee_status != EE_OK) return ee_status; +#elif defined (EDATA_ENABLED) + /* Program variable data + virtual address + crc */ + /* If program operation was failed, a Flash error code is returned */ + if (FI_WriteDoubleWord(activepageaddress+uwAddressNextWrite, EE_ELEMENT_VALUE(VirtAddress,Data,crc)) != EE_OK) + { + return EE_WRITE_ERROR; + } +#else + /* Program variable data + virtual address + crc */ + /* If program operation was failed, a Flash error code is returned */ + if (FI_WriteDoubleWord(activepageaddress+uwAddressNextWrite, EE_ELEMENT_VALUE(VirtAddress,Data,crc)) != HAL_OK) + { + return EE_WRITE_ERROR; + } +#endif + + /* Increment global variables relative to write operation done*/ + uwAddressNextWrite += EE_ELEMENT_SIZE; + uhNbWrittenElements++; + + return EE_OK; +} + +/** + * @brief Set page state in page header + * @param Page Index of the page + * @param State State of the page + * @retval EE_Status + * - EE_OK: on success + * - EE error code: if an error occurs + */ +static EE_Status SetPageState(uint32_t Page, EE_State_type State) +{ + uint32_t header1 = 0U, header2 = 0U, header3 = 0U, header4 = 0U; + + header1 = PAGE_ADDRESS(Page); + header2 = PAGE_ADDRESS(Page) + EE_ELEMENT_SIZE; + header3 = PAGE_ADDRESS(Page) + (EE_ELEMENT_SIZE*2U); + header4 = PAGE_ADDRESS(Page) + (EE_ELEMENT_SIZE*3U); + +#if defined (DUALCORE_FLASH_SHARING) + EE_Status ee_status; + switch(State) + { + case STATE_PAGE_RECEIVE: + { + /* Set new Page status to STATE_PAGE_RECEIVE status */ + ee_status = FI_WriteDoubleWord(header1, EE_PAGESTAT_RECEIVE, EE_SET_PAGE); + if (ee_status != EE_OK) return ee_status; + ubCurrentActivePage = Page; + } + break; + case STATE_PAGE_ACTIVE: + { + /* Set new Page status to STATE_PAGE_ACTIVE status */ + ee_status = FI_WriteDoubleWord(header2, EE_PAGESTAT_ACTIVE, EE_SET_PAGE); + if (ee_status != EE_OK) return ee_status; + ubCurrentActivePage = Page; + } + break; + case STATE_PAGE_VALID: + { + /* Set new Page status to STATE_PAGE_VALID status */ + ee_status = FI_WriteDoubleWord(header3, EE_PAGESTAT_VALID, EE_SET_PAGE); + if (ee_status != EE_OK) return ee_status; + } + break; + case STATE_PAGE_ERASING: + { + /* Set new Page status to STATE_PAGE_ERASING status */ + ee_status = FI_WriteDoubleWord(header4, EE_PAGESTAT_ERASING, EE_SET_PAGE); + if (ee_status != EE_OK) return ee_status; + } + break; + default: + break; + } +#elif defined (FLASH_LINES_128B) + EE_Status ee_status; + uint64_t pagestat = 0; + switch(State) + { + case STATE_PAGE_RECEIVE: + { + /* Set new Page status to STATE_PAGE_RECEIVE status */ + pagestat = EE_PAGESTAT_RECEIVE; + ee_status = FI_WriteDoubleWord(header1, &pagestat, EE_SET_PAGE); + if (ee_status != EE_OK) return ee_status; + ubCurrentActivePage = Page; + } + break; + case STATE_PAGE_ACTIVE: + { + /* Set new Page status to STATE_PAGE_ACTIVE status */ + pagestat = EE_PAGESTAT_ACTIVE; + ee_status = FI_WriteDoubleWord(header2, &pagestat, EE_SET_PAGE); + if (ee_status != EE_OK) return ee_status; + ubCurrentActivePage = Page; + } + break; + case STATE_PAGE_VALID: + { + /* Set new Page status to STATE_PAGE_VALID status */ + pagestat = EE_PAGESTAT_VALID; + ee_status = FI_WriteDoubleWord(header3, &pagestat, EE_SET_PAGE); + if (ee_status != EE_OK) return ee_status; + } + break; + case STATE_PAGE_ERASING: + { + /* Set new Page status to STATE_PAGE_ERASING status */ + pagestat = EE_PAGESTAT_ERASING; + ee_status = FI_WriteDoubleWord(header4, &pagestat, EE_SET_PAGE); + if (ee_status != EE_OK) return ee_status; + } + break; + default: + break; + } +#elif defined (EDATA_ENABLED) + switch(State) + { + case STATE_PAGE_RECEIVE: + { + /* Set new Page status to STATE_PAGE_RECEIVE status */ + if (FI_WriteDoubleWord(header1, EE_PAGESTAT_RECEIVE) != EE_OK) + { + return EE_WRITE_ERROR; + } + ubCurrentActivePage = Page; + } + break; + case STATE_PAGE_ACTIVE: + { + /* Set new Page status to STATE_PAGE_ACTIVE status */ + if (FI_WriteDoubleWord(header2, EE_PAGESTAT_ACTIVE) != EE_OK) + { + return EE_WRITE_ERROR; + } + ubCurrentActivePage = Page; + } + break; + case STATE_PAGE_VALID: + { + /* Set new Page status to STATE_PAGE_VALID status */ + if (FI_WriteDoubleWord(header3, EE_PAGESTAT_VALID) != EE_OK) + { + return EE_WRITE_ERROR; + } + } + break; + case STATE_PAGE_ERASING: + { + /* Set new Page status to STATE_PAGE_ERASING status */ + if (FI_WriteDoubleWord(header4, EE_PAGESTAT_ERASING) != EE_OK) + { + return EE_WRITE_ERROR; + } + } + break; + default: + break; + } +#else + switch(State) + { + case STATE_PAGE_RECEIVE: + { + /* Set new Page status to STATE_PAGE_RECEIVE status */ + if (FI_WriteDoubleWord(header1, EE_PAGESTAT_RECEIVE) != HAL_OK) + { + return EE_WRITE_ERROR; + } + ubCurrentActivePage = Page; + } + break; + case STATE_PAGE_ACTIVE: + { + /* Set new Page status to STATE_PAGE_ACTIVE status */ + if (FI_WriteDoubleWord(header2, EE_PAGESTAT_ACTIVE) != HAL_OK) + { + return EE_WRITE_ERROR; + } + ubCurrentActivePage = Page; + } + break; + case STATE_PAGE_VALID: + { + /* Set new Page status to STATE_PAGE_VALID status */ + if (FI_WriteDoubleWord(header3, EE_PAGESTAT_VALID) != HAL_OK) + { + return EE_WRITE_ERROR; + } + } + break; + case STATE_PAGE_ERASING: + { + /* Set new Page status to STATE_PAGE_ERASING status */ + if (FI_WriteDoubleWord(header4, EE_PAGESTAT_ERASING) != HAL_OK) + { + return EE_WRITE_ERROR; + } + } + break; + default: + break; + } +#endif + + /* Return last operation flash status */ + return EE_OK; +} + +/** + * @brief Get page state in page header + * @param Address Address of the FLASH Memory page + * @retval State State of the page + */ +#ifndef FLASH_LINES_128B +static EE_State_type GetPageState(uint32_t Address) +{ + EE_ELEMENT_TYPE status1 = 0U, status2 = 0U, status3 = 0U, status4 = 0U; + + /* Get page state information from page header (3 first elements) */ + status1 = (*(__IO EE_ELEMENT_TYPE*)Address); + status2 = (*(__IO EE_ELEMENT_TYPE*)(Address + EE_ELEMENT_SIZE)); + status3 = (*(__IO EE_ELEMENT_TYPE*)(Address + (EE_ELEMENT_SIZE*2U))); + status4 = (*(__IO EE_ELEMENT_TYPE*)(Address + (EE_ELEMENT_SIZE*3U))); + + /* Return erasing status, if element4 is not EE_PAGESTAT_ERASED value */ + if (status4 != EE_PAGESTAT_ERASED) + { + return STATE_PAGE_ERASING; + } + + /* Return valid status, if element3 is not EE_PAGESTAT_ERASED value */ + if (status3 != EE_PAGESTAT_ERASED) + { + return STATE_PAGE_VALID; + } + + /* Return active status, if element2 is not EE_PAGESTAT_ERASED value */ + if (status2 != EE_PAGESTAT_ERASED) + { + return STATE_PAGE_ACTIVE; + } + + /* Return receive status, if element1 is not EE_PAGESTAT_ERASED value */ + if (status1 != EE_PAGESTAT_ERASED) + { + return STATE_PAGE_RECEIVE; + } + + /* Return erased status, if 4 first elements are EE_PAGESTAT_ERASED value */ + return STATE_PAGE_ERASED; +} +#else +static EE_State_type GetPageState(uint32_t Address) +{ + EE_ELEMENT_TYPE status1 = 0U, status2 = 0U, status3 = 0U, status4 = 0U; + EE_ELEMENT_TYPE status1bis = 0U, status2bis = 0U, status3bis = 0U, status4bis = 0U; + + /* Get page state information from page header (3 first elements) */ + status1 = (*(__IO EE_ELEMENT_TYPE*)Address); + status2 = (*(__IO EE_ELEMENT_TYPE*)(Address + EE_ELEMENT_SIZE)); + status3 = (*(__IO EE_ELEMENT_TYPE*)(Address + (EE_ELEMENT_SIZE*2U))); + status4 = (*(__IO EE_ELEMENT_TYPE*)(Address + (EE_ELEMENT_SIZE*3U))); + status1bis = (*(__IO EE_ELEMENT_TYPE*)(Address + 8)); + status2bis = (*(__IO EE_ELEMENT_TYPE*)(Address + EE_ELEMENT_SIZE + 8)); + status3bis = (*(__IO EE_ELEMENT_TYPE*)(Address + (EE_ELEMENT_SIZE*2U) + 8)); + status4bis = (*(__IO EE_ELEMENT_TYPE*)(Address + (EE_ELEMENT_SIZE*3U) + 8)); + + /* Return erasing status, if element4 is not EE_PAGESTAT_ERASED value */ + if ((status4 != EE_PAGESTAT_ERASED) && (status4bis != EE_PAGESTAT_ERASED)) + { + return STATE_PAGE_ERASING; + } + + /* Return valid status, if element3 is not EE_PAGESTAT_ERASED value */ + if ((status3 != EE_PAGESTAT_ERASED) && (status3bis != EE_PAGESTAT_ERASED)) + { + return STATE_PAGE_VALID; + } + + /* Return active status, if element2 is not EE_PAGESTAT_ERASED value */ + if ((status2 != EE_PAGESTAT_ERASED) && (status2bis != EE_PAGESTAT_ERASED)) + { + return STATE_PAGE_ACTIVE; + } + + /* Return receive status, if element1 is not EE_PAGESTAT_ERASED value */ + if ((status1 != EE_PAGESTAT_ERASED) && (status1bis != EE_PAGESTAT_ERASED)) + { + return STATE_PAGE_RECEIVE; + } + + /* Return erased status, if 4 first elements are EE_PAGESTAT_ERASED value */ + return STATE_PAGE_ERASED; +} +#endif + +/** + * @brief This function configures CRC Instance. + * @note This function is used to : + * -1- Enable peripheral clock for CRC. + * -2- Configure CRC functional parameters. + * @note Peripheral configuration is minimal configuration from reset values. + * Thus, some useless LL unitary functions calls below are provided as + * commented examples - setting is default configuration from reset. + * @param None + * @retval None + */ +void ConfigureCrc(void) +{ + /* (1) Enable peripheral clock for CRC */ + LL_AHB1_GRP1_EnableClock(LL_AHB1_GRP1_PERIPH_CRC); + + /* (2) Configure CRC functional parameters */ + + /* Configure CRC calculation unit with user defined polynomial */ + LL_CRC_SetPolynomialCoef(CRC, CRC_POLYNOMIAL_VALUE); + LL_CRC_SetPolynomialSize(CRC, CRC_POLYNOMIAL_LENGTH); + + /* Initialize default CRC initial value */ + /* Reset value is LL_CRC_DEFAULT_CRC_INITVALUE */ + /* LL_CRC_SetInitialData(CRC, LL_CRC_DEFAULT_CRC_INITVALUE);*/ + + /* Set input data inversion mode : No inversion*/ + /* Reset value is LL_CRC_INDATA_REVERSE_NONE */ + /* LL_CRC_SetInputDataReverseMode(CRC, LL_CRC_INDATA_REVERSE_NONE); */ + + /* Set output data inversion mode : No inversion */ + /* Reset value is LL_CRC_OUTDATA_REVERSE_NONE */ + /* LL_CRC_SetOutputDataReverseMode(CRC, LL_CRC_OUTDATA_REVERSE_NONE); */ +} + +/** + * @brief This function performs CRC calculation on Data and Virtual Address. + * @param Data value of the eeprom variable. + * @param VirtAddress address of the eeprom variable. + * @retval 16-bit CRC value computed on Data and Virtual Address. + */ +#ifndef FLASH_LINES_128B +uint16_t CalculateCrc(EE_DATA_TYPE Data, uint16_t VirtAddress) +#else +uint16_t CalculateCrc(EE_DATA_TYPE Data1, EE_DATA_TYPE Data2) +#endif +{ + /* Reset CRC calculation unit */ + LL_CRC_ResetCRCCalculationUnit(CRC); + + /* Feed Data and Virtual Address */ +#ifndef FLASH_LINES_128B + LL_CRC_FeedData32(CRC, Data); + LL_CRC_FeedData16(CRC, VirtAddress); +#else + LL_CRC_FeedData32(CRC, ((uint32_t)Data1)); + LL_CRC_FeedData32(CRC, ((uint32_t)(Data1>>32))); + LL_CRC_FeedData32(CRC, ((uint32_t)((Data2 & 0xFFFFFFFF00000000)>>32))); + LL_CRC_FeedData16(CRC, ((uint16_t)Data2)); + +#endif + + /* Return computed CRC value */ + return(LL_CRC_ReadData16(CRC)); +} + +/** + * @} + */ + +/** + * @} + */ + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/STM32-PACK/Files/Middlewares/Third_Party/EEE4STM32/eeprom_emul.h b/STM32-PACK/Files/Middlewares/Third_Party/EEE4STM32/eeprom_emul.h new file mode 100644 index 0000000..4efba1b --- /dev/null +++ b/STM32-PACK/Files/Middlewares/Third_Party/EEE4STM32/eeprom_emul.h @@ -0,0 +1,152 @@ +/** + ****************************************************************************** + * @file EEPROM_Emul/Core/eeprom_emul.h + * @author MCD Application Team + * @brief This file contains all the functions prototypes for the EEPROM + * emulation firmware library. + ****************************************************************************** + * @attention + * + *

© Copyright (c) 2020 STMicroelectronics. + * All rights reserved.

+ * + * This software component is licensed by ST under BSD 3-Clause license, + * the "License"; You may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * opensource.org/licenses/BSD-3-Clause + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __EEPROM_EMUL_H +#define __EEPROM_EMUL_H + +/* Includes ------------------------------------------------------------------*/ +#include "eeprom_emul_conf.h" +#include "eeprom_emul_types.h" +#include "flash_interface.h" + +/** @addtogroup EEPROM_Emulation + * @{ + */ + +/* Private constants ---------------------------------------------------------*/ +/** @defgroup EEPROM_Private_Constants EEPROM Private Constants + * @{ + */ + +/** @defgroup Private_Other_Constants Private Other Constants + * @{ + */ + +/* Page definitions */ +#define PAGE_SIZE FLASH_PAGE_SIZE /*!< Page size */ +#define PAGE_HEADER_SIZE EE_ELEMENT_SIZE * 4U /*!< Page Header is 4 elements to save page state */ +#define NB_MAX_ELEMENTS_BY_PAGE ((PAGE_SIZE - PAGE_HEADER_SIZE) / EE_ELEMENT_SIZE) /*!< Max number of elements by page */ +#define PAGES_NUMBER (((((NB_OF_VARIABLES + NB_MAX_ELEMENTS_BY_PAGE - 1U) / NB_MAX_ELEMENTS_BY_PAGE) * 2U) * CYCLES_NUMBER) + GUARD_PAGES_NUMBER ) + /*!< Number of consecutives pages used by the application */ +#define NB_MAX_WRITTEN_ELEMENTS ((NB_MAX_ELEMENTS_BY_PAGE * PAGES_NUMBER) / 2U) /*!< Max number of elements written before triggering pages transfer */ +#define START_PAGE PAGE(START_PAGE_ADDRESS) /*!< Page index of the 1st page used for EEPROM emul, in the bank */ +#define END_EEPROM_ADDRESS (START_PAGE_ADDRESS + (PAGES_NUMBER * FLASH_PAGE_SIZE) - 1) /*!< Last address of EEPROM emulation flash pages */ + +/* No page define */ +#define EE_NO_PAGE_FOUND ((uint32_t)0xFFFFFFFFU) + +/** + * @} + */ + +/** + * @} + */ + +/* Private macro -------------------------------------------------------------*/ +/** @defgroup EEPROM_Private_Macros EEPROM Private Macros + * @{ + */ + +/** @defgroup Macros_Pages Macros to manipulate pages + * @{ + */ + +/* Macros to manipulate pages */ +#ifdef SECURE_FEATURES +#ifdef EDATA_ENABLED + #define PAGE_ADDRESS(__PAGE__) (uint32_t)(FLASH_EDATA_BASE_NS + (__PAGE__) * PAGE_SIZE + ((START_PAGE_ADDRESS - FLASH_EDATA_BASE_NS) / BANK_SIZE) * BANK_SIZE) /*!< Get page address from page index */ + #define PAGE(__ADDRESS__) (uint32_t)((((__ADDRESS__) - FLASH_EDATA_BASE_NS) % BANK_SIZE) / FLASH_PAGE_SIZE) /*!< Get page index from page address */ +#else + #define PAGE_ADDRESS(__PAGE__) (uint32_t)(FLASH_BASE_NS + (__PAGE__) * PAGE_SIZE + ((START_PAGE_ADDRESS - FLASH_BASE_NS) / BANK_SIZE) * BANK_SIZE) /*!< Get page address from page index */ + #define PAGE(__ADDRESS__) (uint32_t)((((__ADDRESS__) - FLASH_BASE_NS) % BANK_SIZE) / FLASH_PAGE_SIZE) /*!< Get page index from page address */ +#endif +#else +#ifdef EDATA_ENABLED + #define PAGE_ADDRESS(__PAGE__) (uint32_t)(FLASH_EDATA_BASE + (__PAGE__) * PAGE_SIZE + ((START_PAGE_ADDRESS - FLASH_EDATA_BASE) / BANK_SIZE) * BANK_SIZE) /*!< Get page address from page index */ + #define PAGE(__ADDRESS__) (uint32_t)((((__ADDRESS__) - FLASH_EDATA_BASE) % BANK_SIZE) / FLASH_PAGE_SIZE) /*!< Get page index from page address */ +#else + #define PAGE_ADDRESS(__PAGE__) (uint32_t)(FLASH_BASE + (__PAGE__) * PAGE_SIZE + ((START_PAGE_ADDRESS - FLASH_BASE) / BANK_SIZE) * BANK_SIZE) /*!< Get page address from page index */ + #define PAGE(__ADDRESS__) (uint32_t)((((__ADDRESS__) - FLASH_BASE) % BANK_SIZE) / FLASH_PAGE_SIZE) /*!< Get page index from page address */ +#endif +#endif +#define PREVIOUS_PAGE(__PAGE__) (uint32_t)((((__PAGE__) - START_PAGE - 1U + PAGES_NUMBER) % PAGES_NUMBER) + START_PAGE) /*!< Get page index of previous page, among circular page list */ +#define FOLLOWING_PAGE(__PAGE__) (uint32_t)((((__PAGE__) - START_PAGE + 1U) % PAGES_NUMBER) + START_PAGE) /*!< Get page index of following page, among circular page list */ + +/** + * @} + */ + +/** @defgroup Macros_Elements Macros to manipulate elements + * @{ + */ + +/* Macros to manipulate elements */ +#define EE_VIRTUALADDRESS_VALUE(__ELEMENT__) (EE_VIRTUALADDRESS_TYPE)((__ELEMENT__) & EE_MASK_VIRTUALADDRESS) /*!< Get virtual address value from element value */ +#define EE_DATA_VALUE(__ELEMENT__) (EE_DATA_TYPE)(((__ELEMENT__) & EE_MASK_DATA) >> EE_DATA_SHIFT) /*!< Get Data value from element value */ +#define EE_CRC_VALUE(__ELEMENT__) (EE_CRC_TYPE)(((__ELEMENT__) & EE_MASK_CRC) >> EE_CRC_SHIFT) /*!< Get Crc value from element value */ +#define EE_ELEMENT_VALUE(__VIRTADDR__,__DATA__,__CRC__) (((EE_ELEMENT_TYPE)(__DATA__) << EE_DATA_SHIFT) | (__CRC__) << EE_CRC_SHIFT | (__VIRTADDR__)) /*!< Get element value from virtual addr, data and crc values */ + +/** + * @} + */ + +/** + * @} + */ + +/* Exported constants --------------------------------------------------------*/ +/* Exported types ------------------------------------------------------------*/ +/* Exported macro ------------------------------------------------------------*/ +/* Exported functions ------------------------------------------------------- */ +/** @defgroup EEPROM_Exported_Functions EEPROM Exported Functions + * @{ + */ +EE_Status EE_Format(EE_Erase_type EraseType); +EE_Status EE_Init(EE_Erase_type EraseType); +#if defined(EE_ACCESS_32BITS) +EE_Status EE_ReadVariable32bits(uint16_t VirtAddress, uint32_t* pData); +EE_Status EE_WriteVariable32bits(uint16_t VirtAddress, uint32_t Data); +#endif +#if defined(FLASH_LINES_128B) +EE_Status EE_ReadVariable96bits(uint16_t VirtAddress, uint64_t* pData); +EE_Status EE_WriteVariable96bits(uint16_t VirtAddress, uint64_t* Data); +#endif +EE_Status EE_ReadVariable16bits(uint16_t VirtAddress, uint16_t* pData); +EE_Status EE_WriteVariable16bits(uint16_t VirtAddress, uint16_t Data); +EE_Status EE_ReadVariable8bits(uint16_t VirtAddress, uint8_t* pData); +EE_Status EE_WriteVariable8bits(uint16_t VirtAddress, uint8_t Data); +EE_Status EE_CleanUp(void); +EE_Status EE_CleanUp_IT(void); +EE_Status EE_DeleteCorruptedFlashAddress(uint32_t Address); +void EE_EndOfCleanup_UserCallback(void); + +/** + * @} + */ + +/** + * @} + */ + +#endif /* __EEPROM_EMUL_H */ + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/STM32-PACK/Files/Middlewares/Third_Party/EEE4STM32/eeprom_emul_conf.h b/STM32-PACK/Files/Middlewares/Third_Party/EEE4STM32/eeprom_emul_conf.h new file mode 100644 index 0000000..35c610a --- /dev/null +++ b/STM32-PACK/Files/Middlewares/Third_Party/EEE4STM32/eeprom_emul_conf.h @@ -0,0 +1,92 @@ +/** + ****************************************************************************** + * @file eeprom_emul_conf.h + * @author MCD Application Team + * @brief EEPROM emulation configuration file. + * This file should be copied to the application folder and renamed + * to eeprom_emul_conf.h. + ****************************************************************************** + * @attention + * + *

© Copyright (c) 2020 STMicroelectronics. + * All rights reserved.

+ * + * This software component is licensed by ST under BSD 3-Clause license, + * the "License"; You may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * opensource.org/licenses/BSD-3-Clause + * + ****************************************************************************** + */ + +/** @addtogroup EEPROM_Emulation + * @{ + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __EEPROM_EMUL_CONF_H +#define __EEPROM_EMUL_CONF_H + +#ifdef __cplusplus + extern "C" { +#endif + +/* Private constants ---------------------------------------------------------*/ +/** @addtogroup EEPROM_Private_Constants + * @{ + */ + +/** @defgroup Private_Configuration_Constants Private Configuration Constants + * @{ + */ + +/* Configuration of eeprom emulation in flash, can be custom */ +#define START_PAGE_ADDRESS 0x08080000U /*!< Start address of the 1st page in flash, for EEPROM emulation */ +#define CYCLES_NUMBER 1U /*!< Number of 10Kcycles requested, minimum 1 for 10Kcycles (default), + for instance 10 to reach 100Kcycles. This factor will increase + pages number */ +#define GUARD_PAGES_NUMBER 2U /*!< Number of guard pages avoiding frequent transfers (must be multiple of 2): 0,2,4.. */ + +/* Configuration of crc calculation for eeprom emulation in flash */ +#define CRC_POLYNOMIAL_LENGTH LL_CRC_POLYLENGTH_16B /* CRC polynomial lenght 16 bits */ +#define CRC_POLYNOMIAL_VALUE 0x8005U /* Polynomial to use for CRC calculation */ + +/** + * @} + */ + +/** + * @} + */ + +/* Exported types ------------------------------------------------------------*/ +/* Exported constants --------------------------------------------------------*/ +/** @defgroup EEPROM_Exported_Constants EEPROM Exported Constants + * @{ + */ + +/** @defgroup Exported_Configuration_Constants Exported Configuration Constants + * @{ + */ +#define NB_OF_VARIABLES 1000U /*!< Number of variables to handle in eeprom */ + +/** + * @} + */ + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +/** + * @} + */ + +#endif /* __EEPROM_EMUL_CONF_H */ + + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/STM32-PACK/Files/Middlewares/Third_Party/EEE4STM32/eeprom_emul_types.h b/STM32-PACK/Files/Middlewares/Third_Party/EEE4STM32/eeprom_emul_types.h new file mode 100644 index 0000000..5676a18 --- /dev/null +++ b/STM32-PACK/Files/Middlewares/Third_Party/EEE4STM32/eeprom_emul_types.h @@ -0,0 +1,118 @@ +/** + ****************************************************************************** + * @file EEPROM_Emul/Core/eeprom_emul_types.h + * @author MCD Application Team + * @brief This file contains all the functions prototypes for the EEPROM + * emulation firmware library. + ****************************************************************************** + * @attention + * + *

© Copyright (c) 2020 STMicroelectronics. + * All rights reserved.

+ * + * This software component is licensed by ST under BSD 3-Clause license, + * the "License"; You may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * opensource.org/licenses/BSD-3-Clause + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __EEPROM_EMUL_TYPES_H +#define __EEPROM_EMUL_TYPES_H + +/** @addtogroup EEPROM_Emulation + * @{ + */ + +/* Exported constants --------------------------------------------------------*/ +/** @defgroup EEPROM_Exported_Constants EEPROM Exported Constants + * @{ + */ + +/** @defgroup Exported_Other_Constants Exported Other Constants + * @{ + */ + +/** + * @brief EE Status enum definition. + */ +/* Define of the return value */ +typedef enum { + /* External return codes : ok */ + EE_OK = 0U, + + /* External return codes : errors */ + EE_ERASE_ERROR, + EE_WRITE_ERROR, + EE_ERROR_NOACTIVE_PAGE, + EE_ERROR_NOERASE_PAGE, + EE_ERROR_NOERASING_PAGE, + EE_ERROR_NOACTIVE_NORECEIVE_NOVALID_PAGE, + EE_NO_DATA, + EE_INVALID_VIRTUALADDRESS, + EE_INVALID_PAGE, + EE_INVALID_PAGE_SEQUENCE, + EE_INVALID_ELEMENT, + EE_TRANSFER_ERROR, + EE_DELETE_ERROR, + EE_INVALID_BANK_CFG, + + /* Internal return code */ + EE_NO_PAGE_FOUND, + EE_PAGE_NOTERASED, + EE_PAGE_ERASED, + EE_PAGE_FULL, + + /* External return code : action required */ + EE_CLEANUP_REQUIRED = 0x100U, + +#ifdef DUALCORE_FLASH_SHARING + /* Value returned when a program or erase operation is requested but + * the flash is already used by CPU2 */ + EE_FLASH_USED, + EE_SEM_TIMEOUT, +#endif + +} EE_Status; + +/* Type of page erasing: + EE_FORCED_ERASE --> pages to erase are erased unconditionnally + EE_CONDITONAL_ERASE --> pages to erase are erased only if not fully erased */ +typedef enum { + EE_FORCED_ERASE, + EE_CONDITIONAL_ERASE +} EE_Erase_type; + +#if (defined DUALCORE_FLASH_SHARING) || (defined FLASH_LINES_128B) +/* Type of write operations: + EE_TRANSFER --> Used by WriteDoubleWord to know when the operation ongoing is a transfer + EE_SIMPLE_WRITE --> Used by WriteDoubleWord to know when the operation ongoing is a simple writing */ +typedef enum { + EE_TRANSFER, + EE_SIMPLE_WRITE, + EE_SET_PAGE, + EE_INIT_WRITE +} EE_Write_type; +#endif + +/* Masks of EE_Status return codes */ +#define EE_STATUSMASK_ERROR (uint16_t)0x00FFU /*!< Mask on EE_Status return code, selecting error codes */ +#define EE_STATUSMASK_CLEANUP (uint16_t)0x0100U /*!< Mask on EE_Status return code, selecting cleanup request codes */ + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +#endif /* __EEPROM_EMUL_TYPES_H */ + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/STM32-PACK/Files/Middlewares/Third_Party/EEE4STM32/flash_interface.c b/STM32-PACK/Files/Middlewares/Third_Party/EEE4STM32/flash_interface.c new file mode 100644 index 0000000..f62f24d --- /dev/null +++ b/STM32-PACK/Files/Middlewares/Third_Party/EEE4STM32/flash_interface.c @@ -0,0 +1,207 @@ +/** + ****************************************************************************** + * @file EEPROM_Emul/Porting/STM32WL/flash_interface.c + * @author MCD Application Team + * @brief This file provides all the EEPROM emulation flash interface functions. + ****************************************************************************** + * @attention + * + *

© Copyright (c) 2020 STMicroelectronics. + * All rights reserved.

+ * + * This software component is licensed by ST under BSD 3-Clause license, + * the "License"; You may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * opensource.org/licenses/BSD-3-Clause + * + ****************************************************************************** + */ + +/* Includes ------------------------------------------------------------------*/ +#include "eeprom_emul.h" +#include "flash_interface.h" +#include "stm32wlxx_nucleo.h" + +/** @addtogroup EEPROM_Emulation + * @{ + */ + +/* Private typedef -----------------------------------------------------------*/ +/* Private constants ---------------------------------------------------------*/ +/* Private macro -------------------------------------------------------------*/ +/* Private variables ---------------------------------------------------------*/ +/* Private function prototypes -----------------------------------------------*/ +/* Exported functions --------------------------------------------------------*/ +/* Private functions ---------------------------------------------------------*/ +/** @addtogroup EEPROM_Private_Functions + * @{ + */ + +/** + * @brief Write a double word at the given address in Flash + * @param Address Where to write + * @param Data What to write + * @retval EE_Status + * - EE_OK: on success + * - EE_WRITE_ERROR: if an error occurs + */ +HAL_StatusTypeDef FI_WriteDoubleWord(uint32_t Address, uint64_t Data) +{ + return HAL_FLASH_Program(FLASH_TYPEPROGRAM_DOUBLEWORD, Address, Data); +} + +/** + * @brief Erase a page in polling mode + * @param Page Page number + * @param NbPages Number of pages to erase + * @retval EE_Status + * - EE_OK: on success + * - EE error code: if an error occurs + */ +EE_Status FI_PageErase(uint32_t Page, uint16_t NbPages) +{ + EE_Status status = EE_OK; + FLASH_EraseInitTypeDef s_eraseinit; + uint32_t page_error = 0U; + + s_eraseinit.TypeErase = FLASH_TYPEERASE_PAGES; + s_eraseinit.NbPages = NbPages; + s_eraseinit.Page = Page; + + /* Erase the Page: Set Page status to ERASED status */ + if (HAL_FLASHEx_Erase(&s_eraseinit, &page_error) != HAL_OK) + { + status = EE_ERASE_ERROR; + } + return status; +} + +/** + * @brief Erase a page with interrupt enabled + * @param Page Page number + * @param NbPages Number of pages to erase + * @retval EE_Status + * - EE_OK: on success + * - EE error code: if an error occurs + */ +EE_Status FI_PageErase_IT(uint32_t Page, uint16_t NbPages) +{ + EE_Status status = EE_OK; + FLASH_EraseInitTypeDef s_eraseinit; + + s_eraseinit.TypeErase = FLASH_TYPEERASE_PAGES; + s_eraseinit.NbPages = NbPages; + s_eraseinit.Page = Page; + + /* Erase the Page: Set Page status to ERASED status */ + if (HAL_FLASHEx_Erase_IT(&s_eraseinit) != HAL_OK) + { + status = EE_ERASE_ERROR; + } + + return status; +} + +/** + * @brief Flush the caches if needed to keep coherency when the flash content is modified + */ +void FI_CacheFlush() +{ + /* To keep its coherency, flush the D-Cache: its content is not updated after a flash erase. */ + __HAL_FLASH_DATA_CACHE_DISABLE(); + __HAL_FLASH_DATA_CACHE_RESET(); + __HAL_FLASH_DATA_CACHE_ENABLE(); +} + +/** + * @brief Delete corrupted Flash address, can be called from NMI. No Timeout. + * @param Address Address of the FLASH Memory to delete + * @retval EE_Status + * - EE_OK: on success + * - EE error code: if an error occurs + */ +EE_Status FI_DeleteCorruptedFlashAddress(uint32_t Address) +{ + EE_Status status = EE_OK; + + /* Set FLASH Programmation bit */ + SET_BIT(FLASH->CR, FLASH_CR_PG); + + /* Program double word of value 0 */ + *(__IO uint32_t*)(Address) = (uint32_t)0U; + *(__IO uint32_t*)(Address+4U) = (uint32_t)0U; + + /* Wait programmation completion */ + while(__HAL_FLASH_GET_FLAG(FLASH_FLAG_BSY)) ; + + /* Check if error occured */ + if((__HAL_FLASH_GET_FLAG(FLASH_FLAG_OPERR)) || (__HAL_FLASH_GET_FLAG(FLASH_FLAG_PROGERR)) || + (__HAL_FLASH_GET_FLAG(FLASH_FLAG_WRPERR)) || (__HAL_FLASH_GET_FLAG(FLASH_FLAG_PGAERR)) || + (__HAL_FLASH_GET_FLAG(FLASH_FLAG_SIZERR)) || (__HAL_FLASH_GET_FLAG(FLASH_FLAG_PGSERR))) + { + status = EE_DELETE_ERROR; + } + + /* Check FLASH End of Operation flag */ + if (__HAL_FLASH_GET_FLAG(FLASH_FLAG_EOP)) + { + /* Clear FLASH End of Operation pending bit */ + __HAL_FLASH_CLEAR_FLAG(FLASH_FLAG_EOP); + } + + /* Clear FLASH Programmation bit */ + CLEAR_BIT(FLASH->CR, FLASH_CR_PG); + + /* Clear FLASH ECCD bit */ + __HAL_FLASH_CLEAR_FLAG(FLASH_FLAG_ECCD); + + return status; +} + +/** + * @brief Check if the configuration is 128-bits bank or 2*64-bits bank + * @param None + * @retval EE_Status + * - EE_OK: on success + * - EE error code: if an error occurs + */ +EE_Status FI_CheckBankConfig(void) +{ +#if defined (FLASH_OPTR_DBANK) + FLASH_OBProgramInitTypeDef sOBCfg; + EE_Status status; + + /* Request the Option Byte configuration : + - User and RDP level are always returned + - WRP and PCROP are not requested */ + sOBCfg.WRPArea = 0xFF; + sOBCfg.PCROPConfig = 0xFF; + HAL_FLASHEx_OBGetConfig(&sOBCfg); + + /* Check the value of the DBANK user option byte */ + if ((sOBCfg.USERConfig & OB_DBANK_64_BITS) != 0) + { + status = EE_OK; + } + else + { + status = EE_INVALID_BANK_CFG; + } + + return status; +#else + /* No feature 128-bits single bank, so always 64-bits dual bank */ + return EE_OK; +#endif +} + + +/** + * @} + */ + +/** + * @} + */ + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/STM32-PACK/Files/Middlewares/Third_Party/EEE4STM32/flash_interface.h b/STM32-PACK/Files/Middlewares/Third_Party/EEE4STM32/flash_interface.h new file mode 100644 index 0000000..2941723 --- /dev/null +++ b/STM32-PACK/Files/Middlewares/Third_Party/EEE4STM32/flash_interface.h @@ -0,0 +1,134 @@ +/** + ****************************************************************************** + * @file EEPROM_Emul/Porting/STM32WL/flash_interface.h + * @author MCD Application Team + * @brief This file contains all the functions prototypes for the EEPROM + * emulation flash interface. + ****************************************************************************** + * @attention + * + *

© Copyright (c) 2020 STMicroelectronics. + * All rights reserved.

+ * + * This software component is licensed by ST under BSD 3-Clause license, + * the "License"; You may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * opensource.org/licenses/BSD-3-Clause + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __FLASH_INTERFACE_H +#define __FLASH_INTERFACE_H + +#ifdef __cplusplus + extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +#include "eeprom_emul.h" +#include "stm32wlxx_hal.h" +#include "stm32wlxx_ll_crc.h" +#include "stm32wlxx_ll_bus.h" + +/** @addtogroup EEPROM_Emulation + * @{ + */ + +/* Exported types ------------------------------------------------------------*/ +/* Exported macro ------------------------------------------------------------*/ +/* Exported functions ------------------------------------------------------- */ + +/* Private types -------------------------------------------------------------*/ +/* Private constants ---------------------------------------------------------*/ +/** @addtogroup EEPROM_Private_Constants + * @{ + */ + +/** @addtogroup Private_Other_Constants + * @{ + */ + +#define BANK_SIZE FLASH_BANK_SIZE /*!< Alias to FLASH_BANK_SIZE definition from HAL STM32L4 */ +#define EE_ACCESS_32BITS /*!< Enable EEPROM 32bits R/W functions, only valid for flash allowing 64bits access*/ + +/* Page state header */ +#define EE_PAGESTAT_ERASED (uint64_t)0xFFFFFFFFFFFFFFFFU /*!< State saved in 1st,2nd,3rd,4th data type of page header */ +#define EE_PAGESTAT_RECEIVE (uint64_t)0xAAAAAAAAAAAAAAAAU /*!< State saved in 1st data type of page header */ +#define EE_PAGESTAT_ACTIVE (uint64_t)0xAAAAAAAAAAAAAAAAU /*!< State saved in 2nd data type of page header */ +#define EE_PAGESTAT_VALID (uint64_t)0xAAAAAAAAAAAAAAAAU /*!< State saved in 3rd data type of page header */ +#define EE_PAGESTAT_ERASING (uint64_t)0xAAAAAAAAAAAAAAAAU /*!< State saved in 4th data type of page header */ + +/* Description of the 8 Bytes (64 bits) element in flash */ +/* Bit: 63 32 31 16 15 0 */ +/* <--- Data Value -----> <-unused-> <-VirtAddr-> */ +#define EE_ELEMENT_SIZE 8U /*!< Size of element in Bytes */ +#define EE_ELEMENT_TYPE uint64_t /*!< Type of element */ +#define EE_VIRTUALADDRESS_TYPE uint16_t /*!< Type of Virtual Address */ +#define EE_VIRTUALADDRESS_SHIFT 0U /*!< Bits Shifting to get Virtual Address in element */ +#define EE_CRC_TYPE uint16_t /*!< Type of Crc */ +#define EE_CRC_SHIFT 16U /*!< Bits Shifting to get Crc in element */ +#define EE_DATA_TYPE uint32_t /*!< Type of Data */ +#define EE_DATA_SHIFT 32U /*!< Bits Shifting to get Data value in element */ +#define EE_MASK_VIRTUALADDRESS (uint64_t)0x000000000000FFFFU +#define EE_MASK_CRC (uint64_t)0x00000000FFFF0000U +#define EE_MASK_DATA (uint64_t)0xFFFFFFFF00000000U +#define EE_MASK_FULL (uint64_t)0xFFFFFFFFFFFFFFFFU + +/** + * @} + */ + +/** + * @} + */ + +/* Private macro -------------------------------------------------------------*/ +/** @addtogroup EEPROM_Private_Macros + * @{ + */ + +/** @defgroup Macros_Flash Macros to access flash + * @{ + */ + +/** + * @} + */ + +/** + * @} + */ + +/* Private functions ---------------------------------------------------------*/ +/** @addtogroup EEPROM_Private_Functions + * @{ + */ +#ifdef DUALCORE_FLASH_SHARING +EE_Status FI_WriteDoubleWord(uint32_t Address, uint64_t Data, EE_Write_type Write_type); +#else +HAL_StatusTypeDef FI_WriteDoubleWord(uint32_t Address, uint64_t Data); +#endif +EE_Status FI_PageErase(uint32_t Page, uint16_t NbPages); +EE_Status FI_PageErase_IT(uint32_t Page, uint16_t NbPages); +EE_Status FI_DeleteCorruptedFlashAddress(uint32_t Address); +EE_Status FI_CheckBankConfig(void); +void FI_CacheFlush(void); + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +/** + * @} + */ + +#endif /* __FLASH_INTERFACE_H */ + + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/STM32-PACK/Files/RainerWieland.EEE4STM32.pdsc b/STM32-PACK/Files/RainerWieland.EEE4STM32.pdsc new file mode 100644 index 0000000..557fd9e --- /dev/null +++ b/STM32-PACK/Files/RainerWieland.EEE4STM32.pdsc @@ -0,0 +1,31 @@ + + + RainerWieland + EEE4STM32 + EEPROM Emulation Driver + https://gitea.iotxs.de/RainerWieland/EEE4STM32/src/branch/master/STM32-PACK/ + LICENSE.txt + Rainer.Wieland@ChirpStack.de + + Initial Setup for EEPROM Emulation on STM32WLE5Cxxx + + + CUBE_RULES_COMPLIANT + + + Driver + + + + EEPROM EMULATION Library for stm§"wle%cXXX + + + + + + + + + + + diff --git a/STM32-PACK/RWD-EEE4STM32.1.0.0.pack b/STM32-PACK/RWD-EEE4STM32.1.0.0.pack deleted file mode 100644 index 246430c58a2879875d8b6441f732807adbf036c2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 16785 zcmb`ubC4%Nn>E^;wrz9Twrz9TzqW1Lw(V)#wr$()p4K;e_wM`dZtQ-sarb8aky#Z{ z=VWC)k@=jcJPOjFV5mSqK#)K-k)WE1+|$!03_w6Pkw8GCfA1=(i_nUSin1uH$TBn0 zG14*ot#$@Rmh>``!lH7@qI6DfPD9?>jyU28*W4tp1k|_0j35QHp2OR9lsi_s`KLog+k2qY6MCv=JfBvM`)2&!<+xq@${W$ze z)0wuJrrUffZNYeO6#wS$=*-3=xN^t+_I{StUQB*>Klk|)`p)ltv?b5~^?GrK)Mc-0 z+bnDUJ=>OgLh)hw(tWqRwOn~kW!dSe_oABP{P?vvRe4nYej>bLy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3*z!c)!Ed z9RgT>mfMp!BIA*lzLX{u;=^$Fx!Uj*UoCppJ+Bc?HLc$mwtBfcW#(w)6-*7r7Dri+ - - RainerWieland - I-CUBE-EEE4STM32 - EEPROM Emulation Driver for STM32 - https://gitea.iotxs.de/RainerWieland/EEE4STM32/src/branch/master/STM32-PACK/ - LICENSE.txt - - - First Version - - - CUBE_RULES_COMPLIANT - - - Driver - - - - EEPROM Emulation Driver - - - - - - - diff --git a/STM32-PACK/RainerWieland.EEE4STM32.1.0.0.pack b/STM32-PACK/RainerWieland.EEE4STM32.1.0.0.pack new file mode 100644 index 0000000000000000000000000000000000000000..94a4bedd5a1712909da12867b3f575aa1e74c894 GIT binary patch literal 34790 zcmb4qL$EMh4BfMB+qP}nw%_+`+qP}nwr$(C`?srZ+G(@M+&h_b7Rg=YPI45afk99J zARr(B);K^k0sc3G{_iX!DJ&|dEK29>?mXh7?X;zqdfQd`jIZF`pdw1`u$Ut=rdv^H z%5`d~xhUbd?aPhOKxqgAgriez@B5><*Le*sK~>?wS&?BS4fLw#b>q@UIOY2Hb@S-- zy7leo%iJ|y%iq_fk!}9`_cXQj@vx9P_ON$Xdox)&>zi%H|4sbGFMQL8-~0D_c0}xX z)V*P|^?1-QCpRnqv9=Mm+Hu{g`7-Bm)d)YMfbJoGC*LI6!!z~!vHq5In|9Z$?NZfL z>hpf9u4VRnylE>8ou=FBaMOA1rEcPrL~Hp&Qx{cD(bY?P7q)Bqe9c?aK8i2Bws18= zb%lSiQmNC~>7= zaeKP}`KxoY**#es=C#S#HLq)V!=t@$Q3m6BqSg~;vC=#yoU*hunyl%SF)ftcNh4IK%mbc?B&GqLl-wC!& zRvwiQzZ8)f#-`urD@$Di=*>P)?d(vaeMZU~@b3@?oZoc(JgmJ0w1JRkI6eFEOu1cju1~PkQgyXNvJu;Aev| zSvM0;`;?hBxaW>3mT{P0q|6eNIGiS~ZaxahaYaUMF$8+!Ubc0@pMI*T)EdKhVWnijD`&HNXGr!#B)n3z`edxoCv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