Skip to main content
TKopp.67
Associate III
May 4, 2022 8:51 AM UTC
Question

How to retain some data in flash memory during appplication running on STM32F405 ?

Hi everyone, 

For some reasons, i need to store 3 uint16 in flash (once) when my application is running. Of course the goal is that those values will remain after a power down / reset. Does someone knows how to do this properly ?

Do i need to define a new area in the linker (located in flash area) ?

Thanks for your answer,

Best Regards,

Thomas

This topic has been closed for replies.

4 replies

TKopp.67
TKopp.67Author
Associate III
May 4, 2022 9:04 AM UTC

Or better a zone in the memory area that would be retain after a reflash of the MCU ?

Andrew Neil
Super User
May 4, 2022 1:38 PM UTC
A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
TDK
May 4, 2022 1:39 PM UTC

You can store memory to flash, which is retained through power resets. There is an EEPROM emulation library you can search for. People often use the last (or last two) pages in flash to do this.

"If you feel a post has answered your question, please click ""Accept as Solution""."
TKopp.67
TKopp.67Author
Associate III
May 4, 2022 2:50 PM UTC

Oh thanks guys,

Will check about that feature right now.

Best Regards,

Thomas