2024-10-03 10:17 PM
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?
Solved! Go to Solution.
2024-10-04 1:32 AM
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
2024-10-04 1:32 AM
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
2024-10-04 6:18 AM
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.
We’re moving the ST Community to a new platform to give you a better and more reliable community experience.