cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F401CCU6 EEPROM Emulation

Anil3
Associate III

Hi!!!

I am want to implement Emulation of EEPROM for STM32F401CCU6 Controller which is having 256kb of flash memory. but not sure of how exactly that i have to use it. I have downloaded X-CUBE-EEPROM software but in that there is no any project related to STMF4 series for reference. 

Can anyone provide me an example code for STM32F401 series controller.

Thank you,

regards,

ANIL.

1 ACCEPTED SOLUTION

Accepted Solutions

The so-called "Virtual Addresses" are just arbitrary tags to identify the data items:

https://community.st.com/t5/stm32-mcus-embedded-software/eeprom-emulation-virtual-addresses/m-p/675788#M47886

The data items are a fixed size.

EDIT:

In the AN3969 code, the data items are 16-bit:

AndrewNeil_0-1720181001139.png

So, if you want to store 32-bit data, you will have to split it across 2 "variables" in the emulated EEPROM - each with its own "Virtual Address".

Or re-write the code. 

 

View solution in original post

4 REPLIES 4
SofLit
ST Employee

Hello,

For F401 case, you can refer to that example:

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

or

https://github.com/STMicroelectronics/STM32CubeF4/tree/master/Projects/STM32F401RE-Nucleo/Applications/EEPROM/EEPROM_Emulation

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.
Andrew Neil
Evangelist III

@Anil3 wrote:

I have downloaded X-CUBE-EEPROM software but in that there is no any project related to STMF4 series for


X-CUBE-EEPROM doesn't support the F4 Series (nor F1, F2, F3 nor WB):

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

There are separate Application Notes & Firmware Packs for those series - for F4, you require AN3969.

Hi @SofLit and @Andrew Neil 

In the application note i have observed that they have assigned 3 virtual address for 3 variable, could you explain me that how these virtual address are to be assigned? and is it like if i am tring to write  32 bit variable then i need to assign 32bit address??

Thank you!!

regards,

ANIL.

The so-called "Virtual Addresses" are just arbitrary tags to identify the data items:

https://community.st.com/t5/stm32-mcus-embedded-software/eeprom-emulation-virtual-addresses/m-p/675788#M47886

The data items are a fixed size.

EDIT:

In the AN3969 code, the data items are 16-bit:

AndrewNeil_0-1720181001139.png

So, if you want to store 32-bit data, you will have to split it across 2 "variables" in the emulated EEPROM - each with its own "Virtual Address".

Or re-write the code.