cancel
Showing results for 
Search instead for 
Did you mean: 

Eeprom Emulation on STM32H723

mazotcu16
Associate II

Hello, i am trying to implement Eeprom Emulation on STM32H723 using the code that ST provided in STM32CubeH7-Master for STM32H743 series. In the EE_Init function, first thing that function does is this line of code:

 

 

 

PageStatus0 = (*(__IO uint16_t*)PAGE0_BASE_ADDRESS); 
#define PAGE0_BASE_ADDRESS    ((uint32_t)(EEPROM_START_ADDRESS + 0x0000))

 

 

when i look at the value of PAGE0_BASE_ADDRESS, it corresponds to 6U+0x000. Is that normal? Doesnt this mean that we are reading from ITCM RAM?

1 ACCEPTED SOLUTION

Accepted Solutions
SofLit
ST Employee

Hello @mazotcu16 ,


@mazotcu16 wrote:

when i look at the value of PAGE0_BASE_ADDRESS, it corresponds to 6U+0x000. Is that normal? Doesnt this mean that we are reading from ITCM RAM?


Sorry, but how? I don't know which example you are referring to, but from the example provided in STM32CubeH7 here the value seems correct:

In eeprom.h :

#define EEPROM_START_ADDRESS  ADDR_FLASH_SECTOR_6_BANK2 /* sector6 of bank 2 */

In main.h:

#define ADDR_FLASH_SECTOR_6_BANK2     ((uint32_t)0x081C0000) /* Base @ of Sector 6, 128 Kbytes */

So PAGE0_BASE_ADDRESS = 0x081C0000

 

 

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.
PS: This is NOT an online support (https://ols.st.com) but a collaborative space. So please be polite in your reply. Otherwise, it will be reported as inappropriate and you will be permanently blacklisted from my help/support.

View solution in original post

2 REPLIES 2
SofLit
ST Employee

Hello @mazotcu16 ,


@mazotcu16 wrote:

when i look at the value of PAGE0_BASE_ADDRESS, it corresponds to 6U+0x000. Is that normal? Doesnt this mean that we are reading from ITCM RAM?


Sorry, but how? I don't know which example you are referring to, but from the example provided in STM32CubeH7 here the value seems correct:

In eeprom.h :

#define EEPROM_START_ADDRESS  ADDR_FLASH_SECTOR_6_BANK2 /* sector6 of bank 2 */

In main.h:

#define ADDR_FLASH_SECTOR_6_BANK2     ((uint32_t)0x081C0000) /* Base @ of Sector 6, 128 Kbytes */

So PAGE0_BASE_ADDRESS = 0x081C0000

 

 

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.
PS: This is NOT an online support (https://ols.st.com) but a collaborative space. So please be polite in your reply. Otherwise, it will be reported as inappropriate and you will be permanently blacklisted from my help/support.
LCE
Principal

My advice: don't use flash as eeprom on that H7.

It has 128 kB flash blocks, and even when overwriting only 1 bit you must erase the complete block.

That takes some time (which halts basically everything), and you will always need some RAM buffer to backup the rest.