2024-09-11 06:03 AM
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....
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.
2024-09-11 06:20 AM
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
2024-09-11 06:28 AM
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: