cancel
Showing results for 
Search instead for 
Did you mean: 

How to solve EE_INVALID_PAGE_SEQUENCE using STM32Cube X-CUBE-EEPROM package.

manto.1
Senior

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_SEQUENCE

Why 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 */
 
/**

1 ACCEPTED SOLUTION

Accepted Solutions
StéphaneM
ST Employee

the XCUBE-EEPROM software is designed to work with the MCU internal Flash. It has to be adapted for the external Flash characteristics (Flash line size, Flash page size...).

View solution in original post

3 REPLIES 3
StéphaneM
ST Employee

Hello Manto,

could you please tell us if this issue is systematic or happens only on some devices.

Which STM32 (or board are you using ?)

Best regards,

Stéphane

manto.1
Senior

We are using STM32H750 with external flash W25Q128JV. Cube-EEPROM library is used for writing some parameters into external flash. Recently I figured that It works If I write into different region. But still I would like to know why I was not able to initialize and how to handle this error.

StéphaneM
ST Employee

the XCUBE-EEPROM software is designed to work with the MCU internal Flash. It has to be adapted for the external Flash characteristics (Flash line size, Flash page size...).