Tuesday 30 December 2014

stm32 - Storing settings/data on microcontrollers non-volatile memory (STM32F103)



I want to be able to store values in a non-volatile memory so that the microcontroller can load these settings at start up. These settings might change at run-time and it is important for the systems functionality that these settings are stored.


As far as I know the only non-volatile memory on the STM32F103 is the flash. Is it possible to save values on flash someplace at run-time?


I also have the possibility to use a SD card and the SDIO or SPI interface to store the values there, but if possible it would be best if a SD card can be avoided.


The amount of data is only a few hundred bytes at most.



Answer



From what i know there are two options:



  • Use flash (emulated as EEPROM for ease of use) according to this Appnote

  • Use the backup registers (20 byte of battery backed registers) according to the Reference Manual Pages 67 And 79



By The Way if the you move one of the bigger brothers (F2-F4) of this chip you get a whole part of ram battery backed something like 4k but it depends on the actual chip


No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...