0

Looking to confirm options to persistently save values on an STM32H7 device.

My understanding of the high level options are:

  1. EEPROM Emulation with eepropm.h/c (which uses the HAL_FLASH/EX drivers)
  2. HAL_FLASH and HAL_FLASH_EX drivers, stm32h7xx_hal_flash.h/c stm32h7xx_hal_flash_ex.h/c
  3. External storage of some kind, EEPROM, FLASH, ect.

Are there any other library options for doing this?

What is the added value of the eeprom library?

As far as I can tell, the eeprom library only provides 3 functions, and is not all that configurable. I see it as more of an example that could be modified than a library that is ready to use.

ST AN4061 App Note For reference the ST app note for STM32F0xx eeprom emulation, suggestions adding wear-leveling yourself, but also in the introduction states:

  • "At least two Flash memory pages to be used, more if possible for wear leveling"

This implies to me there is wear leveling.

Additionally, are these options thread safe? the HAL_FLASH driver does have interrupt options, but the eeprom library does not make it clear how to, if possible make that happen.

Options that provide wear-leveling and are thread safe would be preferred.

plane
  • 31
  • 1
  • 5
  • what do you mean by "thread safe" in this case. To make it thread safe you need exclude access to the memory when it is modified. – 0___________ Aug 01 '20 at 16:04
  • @P__J__ by thread safe I mean using freeRTOS. There is no mention of this in the app note, and was not clear on the extent of implementation required to make usable with freeRTOS. By excluding access that means, to the specific block used for the persistent memory? not the entire flash? i.e. other threads are free to run as usual during the read/write? If I have to momentarily block all the treads for the few times we write/read I can do that, the right approach is unclear. – plane Aug 03 '20 at 13:27
  • Did you read the chip documentation. If yes you should know how much FLASH has to be excluded. If not - any help makes any sense. – 0___________ Aug 03 '20 at 13:30

0 Answers0