How to solve EE_INVALID_PAGE_SEQUENCE using STM32Cube X-CUBE-EEPROM package.
I am trying to initialize EEprom with followin two lines. First line return EE_OK but calling EE_Init() returns EE_INVALID_PAGE_SEQUENCE
ee_status = EE_Format(EE_FORCED_ERASE); // ee_status = EE_OK
ee_status = EE_Init(EE_FORCED_ERASE); // ee_status = EE_INVALID_PAGE_SEQUENCEWhy does this happen and how to solve this issue.
This is my eeprom_emul_conf.h
/* Configuration of eeprom emulation in flash, can be custom */
#define START_PAGE_ADDRESS 0x00ea0000U /*!< 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 */
#define CRC_POLYNOMIAL_LENGTH LL_CRC_POLYLENGTH_32B /* CRC polynomial lenght 16 bits */
#define CRC_POLYNOMIAL_VALUE LL_CRC_DEFAULT_CRC32_POLY /* Polynomial to use for CRC calculation */
#define NB_OF_VARIABLES 100U /*!< Number of variables to handle in eeprom */
/**