cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F4 EEPROM emulation HAL library

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
4 REPLIES 4
stm32forum
Associate II
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
ST Employee
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.

Posted on September 10, 2015 at 08:20

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

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

check this 

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