Skip to main content
ihsanoglu
Senior
July 3, 2019
Question

Need to save data to internal flash for the first time. Guidance needed

  • July 3, 2019
  • 0 replies
  • 521 views

Hello everyone,

For the first time now I need to write some data to the flash memory so it doesn't get lost when the board is turned off.

I am using STM32F476-DISCO board. From the data sheet, I see that the main memory block contains 8 different sections. With these sections having different sizes.

Now my questions are the following:

1- The data I need to store consist of few bytes, nothing huge. I need to program it to the memory, and update it during runtime if I need to. Is my flash memory approach the right way to do it ?

2- How can I be sure that the address I am willing to write to is not used by any other functionality (firmware etc...). I am using TouchGFX in my project, I am not sure what memory addresses are used so I can avoid it.

3- As far as I know, when erasing data from any sector on the memory, the entire sector must be erased in the process. Does this mean that my saved data needs to be in a different sector other than those used for booting firmware or by TouchGFX ?

This topic has been closed for replies.