cancel
Showing results for 
Search instead for 
Did you mean: 

STM32G0 Flash as EEPROM

Karan 123
Senior

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

5 REPLIES 5
KnarfB
Principal III

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

hth

KnarfB

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
Guru

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".

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

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

This can cause all kinds of nasty things.