Skip to main content
Associate
Oct 4, 2024 5:17 AM UTC
Solved

Eeprom Emulation on STM32H723

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.
mƎALLEm
mƎALLEmBest answer
ST Technical Moderator
Oct 4, 2024 8:32 AM UTC

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.

2 replies

mƎALLEm
mƎALLEmBest answer
ST Technical Moderator
Oct 4, 2024 8:32 AM UTC

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 III
Oct 4, 2024 1:18 PM UTC

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.