cancel
Showing results for 
Search instead for 
Did you mean: 

EEPROM Emulation

pretoriandave
Associate II

A while ago a member of ST staff kindly helped me on this forum with adding EEPROM emulation to my design (at the time based on Nucleo-F401RE) by directing me to here....

https://github.com/STMicroelectronics/STM32CubeF4/tree/master/Projects/STM32F4-Discovery/Applications/EEPROM/EEPROM_Emulation

That worked immediately and perfectly.

Having now completed my application I need to port the design to a smaller processor for production and I have chosen STM32G031. I was hoping that I could simply change the included header from stm32f4xx_hal.h to stm32g0xx_hal.h and it would just work but sadly it didn't. Instead I got a large number of errors in the hal driver files.

I wasn't able to find a similar set of files in any repository for the g0xx devices and I don't really have the expeince in the platform yet to be able to modify the files that worked so well with the f4xx devices to get them working on g0xx.

Does anyone know of the existance of similar files for the g0xx devices?

Many thanks in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
2 REPLIES 2

I might suggest generating a donor project on the target architecture and then merging in the content of the old project.

Check for EEPROM Emulation libraries targeting the new hardware, the size of the array and sectors is apt to be quite different from F4's, so consider parking the sectors being used at the end of the array.

Consider also if they are now uniformly sized, and how many you might need for your specific application/use-case

If possible move to a method that uses flash in a more normative sense

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

For G0 series, you'd use the X-CUBE-EEPROM package:

https://www.st.com/en/embedded-software/x-cube-eeprom.html

That superseded the specific packages for earlier families like F4:

https://community.st.com/t5/stm32-mcus-embedded-software/x-cube-eeprom-not-for-stm32f0/m-p/684685/highlight/true#M48486