Skip to main content
Associate
October 4, 2024
Solved

Eeprom Emulation on STM32H723

  • October 4, 2024
  • 2 replies
  • 1159 views

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?

This topic has been closed for replies.
Best answer by mƎALLEm

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

 

 

2 replies

mƎALLEm
mƎALLEmBest answer
ST Technical Moderator
October 4, 2024

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 "Best answer" on the reply which solved your issue or answered your question.
LCE
Principal II
October 4, 2024

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.