cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 H533 High Cycle Flash

mahirmahota
Associate II

Hi!

I'm new to this sort of EEPROM emulation that I'm trying to set up and had a few basic (read: dumb) questions:

  1. Why does the high cycle flash not need to be separated in the linker unlike what I would do when using normal flash?
  2. Which EDATA do I use if I'm not utilizing bank switching?
  3. In my codebase, I only see FLASH_EDATA_SIZE instead of a 1 or 2, is this expected?
  4. Is there any sample code I could look at to get the flash set up with proper emulation. I could write a bunch of the functions myself but some boilerplate would be nice to have.
  5. Any general steps you followed if anyone has this running would be great too

I've been researching this all day and would appreciate any help, thanks!

Mahir

1 ACCEPTED SOLUTION

Accepted Solutions
Chaima_M
ST Employee

Hello @mahirmahota ,

  1. The EDATA section is used to store emulated EEPROM data, and its location is often determined by the firmware configuration rather than by the linker.
  2. You can use either the high cycle area in Bank 1 or Bank 2. It is mapped in the last sectors of each (depending on the device's flash size). For further details, please refer to RM0481.
  3. The "FLASH_EDATA_SIZE" macro typically represents the size of the emulated EEPROM data section. It can be defined elsewhere in your project with the required size for the data in your application.
  4. (4&5) Please refer to AN4894, "How to use EEPROM emulation on STM32 MCUs," which provides guidance on implementing EEPROM emulation using the flash memory of STM32 microcontrollers, including STM32H5. And the X-CUBE-EEPROM package, available on st.com, that offers a general guide for using EEPROM emulation.

With best regards.

View solution in original post

3 REPLIES 3
Chaima_M
ST Employee

Hello @mahirmahota ,

  1. The EDATA section is used to store emulated EEPROM data, and its location is often determined by the firmware configuration rather than by the linker.
  2. You can use either the high cycle area in Bank 1 or Bank 2. It is mapped in the last sectors of each (depending on the device's flash size). For further details, please refer to RM0481.
  3. The "FLASH_EDATA_SIZE" macro typically represents the size of the emulated EEPROM data section. It can be defined elsewhere in your project with the required size for the data in your application.
  4. (4&5) Please refer to AN4894, "How to use EEPROM emulation on STM32 MCUs," which provides guidance on implementing EEPROM emulation using the flash memory of STM32 microcontrollers, including STM32H5. And the X-CUBE-EEPROM package, available on st.com, that offers a general guide for using EEPROM emulation.

With best regards.

@Chaima_M Thank you for the help! I just had one quick question from RM0481. From my understanding, using high cycle flash relocates the last few sectors to a different memory location which is what I was confused about. For context, I know that the flash memory in the H533 starts at 0x8000000 but then what is the 0xC000000 right under in the following diagram. Are the hex values after the slashes for some other 512KB model?

mahirmahota_0-1747159521913.png

 

 
Chaima_M
ST Employee

Hello @mahirmahota ,

The address 0x0C00 0000 represents the start of secure flash memory region, while 0x0800 0000 indicates a non-secure region.