Skip to main content
Karan 123
Senior
December 20, 2021
Question

STM32G0 Flash as EEPROM

  • December 20, 2021
  • 5 replies
  • 1635 views

Hi,

I am working on STM32G071RB Nucleo Board and In one of project , I am using same MCU.

In that Project , I don't want to use external I2C or SPI memory for saving the data (logs).

1) How do I can access Flash as EEPROM ?

2) Will this possible with STM32Cube MX ?

3) How the EEPROM Locations (Say 100 Bytes) are separated from Flash Memory Content (Actual Program) ?

Thanks in Advance

--

Karan

This topic has been closed for replies.

5 replies

KnarfB
Super User
December 20, 2021

Check the AN4894 Application note "EEPROM emulation techniques and software for STM32 microcontrollers" and the X-CUBE-EEPROM library.

hth

KnarfB

Karan 123
Karan 123Author
Senior
December 20, 2021

Hi @KnarfB​ ,

Thanks for Update. I have already seen that Application Note and  X-CUBE-EEPROM library.

I am trying to use that (add) Library in my existing project (EEPROM_Emul Folder)

But facing below issue eeprom_emul.h .

../Core/Src/main.c:27:10: fatal error: G:\STM32G0 Cube\Dec 2021\Single Timer - 2\BlinkingG0\EEPROM_Emul\core\eeprom_emul.h: No such file or directory
 
 #include "G:\STM32G0 Cube\Dec 2021\Single Timer - 2\BlinkingG0\EEPROM_Emul\core\eeprom_emul.h"

Please check attach code using that library.

Thanks for your concern..

--

Karan

TDK
December 20, 2021

The compiler says it can't find that file, does that file exist on the drive?

Usually relative directories are used for include files.

"If you feel a post has answered your question, please click ""Accept as Solution""."
Karan 123
Karan 123Author
Senior
December 20, 2021

Hi TDK,

Thanks for update..

1) Have to check attached project.. ?

2) eeprom_emul.h is already present inside the EEPROM_Emul Folder ?

-Usually relative directories are used for include files.

Can you help to compile this attached project..?

--

Karan

Pavel A.
December 21, 2021

Spaces in the path. "G:\STM32G0 Cube\Dec 2021\Single Timer - 2\....."

This can cause all kinds of nasty things.