cancel
Showing results for 
Search instead for 
Did you mean: 

Virtual EEPROM for F0

retro
Associate III

Hello,

Please be patient, I am quite new to this. So, I would like to implement a virtual EEPROM for my F042k6 mcu, i saw that there is the https://www.st.com/en/embedded-software/x-cube-eeprom.html but it only seems to cover STM32G0 Series, STM32G4 Series, STM32L4 Series, STM32L4+ Series, STM32L5 Series, and STM32WB Series. Is there any other way of doing this? with the Hal Driver? does it still work with x-cube? Do you guys know any good examples?

Thank you 🙂

6 REPLIES 6
TDK
Guru

There is also "EEPROM emulation in STM32F0xx microcontrollers (AN4061)" but it predates HAL quite a bit. Probably still works just fine.

https://www.st.com/en/embedded-software/stsw-stm32117.html

I don't know of anything pre-built for this with the HAL library for the F0. It would be a good first project for someone to learn on.

If you feel a post has answered your question, please click "Accept as Solution".

>>Is there any other way of doing this?

Figure out how you're using EEPROM, if you are continually writing values you should probably add an external device, or think about NVRAM/BKPRAM

For user configuration, changed relatively infrequently, consider just using a FLASH sector, and journalling a configuration parameter structure across the entire sector, erasing only when it is exhausted.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

I only need to store some calibrations and some settings for the communication bus. Would not be more than 40bytes - it would only be written to rarely and read each time the device is turned on.

retro
Associate III

Thank you for this, I will have a look over it

retro
Associate III

I downloaded it, and I can't compile because of static FLASH_Status EE_Format(void); error: unknown type name 'FLASH_Status'. In the example I cannot find where FLASH_Status is defined

Hi retro.

have you found the soloution ?

I'm facing the same problem with stm32f412RET.

'FLASH_Status' doesn't seem to be ceclared.