Skip to main content
Lukasz Przenioslo
Associate III
August 19, 2015
Question

STM32F4 EEPROM emulation HAL library

  • August 19, 2015
  • 4 replies
  • 3068 views
Posted on August 19, 2015 at 10:41

Hello there,

I am trying to find any resources on how to emulate eeprom inside flash of an STM32F4 MCU using the HAL library, but I cannot find anything. Could anyone please point me out any resources, examples or tutorials?

Also, what are those in stm32_hal_legacy.h, i dont get it:

/** @defgroup HAL_FLASH_Aliased_Functions HAL FLASH Aliased Functions maintained for legacy purpose

  * @{

  */

&sharpdefine FLASH_HalfPageProgram      HAL_FLASHEx_HalfPageProgram

&sharpdefine FLASH_EnableRunPowerDown   HAL_FLASHEx_EnableRunPowerDown

&sharpdefine FLASH_DisableRunPowerDown  HAL_FLASHEx_DisableRunPowerDown

&sharpdefine HAL_DATA_EEPROMEx_Unlock   HAL_FLASHEx_DATAEEPROM_Unlock

&sharpdefine HAL_DATA_EEPROMEx_Lock     HAL_FLASHEx_DATAEEPROM_Lock

&sharpdefine HAL_DATA_EEPROMEx_Erase    HAL_FLASHEx_DATAEEPROM_Erase

&sharpdefine HAL_DATA_EEPROMEx_Program  HAL_FLASHEx_DATAEEPROM_Program

#eeprom #flash
This topic has been closed for replies.

4 replies

stm32forum
Associate III
August 19, 2015
Posted on August 19, 2015 at 11:02

Here you have an example with the ''old'' spl library's http://www.st.com/web/en/catalog/tools/PF257902#.

Amel NASRI
Technical Moderator
August 19, 2015
Posted on August 19, 2015 at 13:26

Hi Bremen,

There is an application note that provides the EEPROM emulation driver (

http://www.st.com/st-web-ui/static/active/en/resource/technical/document/application_note/DM00036065.pdf

 and its associated 

http://www.st.com/web/en/catalog/tools/FM147/CL1794/SC961/SS1743/LN1734/PF257902

).

But it is not developed based on HAL drivers.

Regarding the file stm32_hal_legacy.h, it was added in order to let the migration from one STM32CubeF4 version to another easier for variables that were renamed in the aim of having compatible Cube packages independent of the used family.

-Mayla-

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
Lukasz Przenioslo
Associate III
September 10, 2015
Posted on September 10, 2015 at 08:20

Are there any HAL examples for this? Does HAL lib even support this?

MB JS
Visitor II
January 27, 2018
Posted on January 27, 2018 at 13:22

check this 

https://community.st.com/0D50X00009Xke9FSAR