Electronic – STM32F4 Flash memory programming

flashstm32stm32f4

So I have STM32F4 board and long story short – I am stuck at putting a user defined number (0 – 60) in FLASH memory, so after restarting, I could use last-used-settings.
How do I allocate correct space in flash memory, so it doesn't interfere with my code? How to I store it?

Best Answer

Write data to Flash memory via EEPROM Emulation, as described in Application Note AN3969: EEPROM emulation in STM32F40x/STM32F41x microcontrollers, here.