cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F031K6: Storing 16-bits variable in a non-volatile memory. Which solution is preferred internal Flash / external EEPROM?

S.Kamath
Associate II

I'm using STM32F031K6 in my design.

I want to store 16-bits variable (Timer's AutoReload Register) in a non-volatile memory. What is best solution for this application? Internal Flash or external 128b EEPROM ?

Any STM32 example code available to store it in internal Flash?

4 REPLIES 4
TDK
Guru

Depends on your requirements, but generally I'd lean towards internal storage as it reduces the BOM count.

https://www.st.com/en/embedded-software/stsw-stm32117.html

If you feel a post has answered your question, please click "Accept as Solution".

Depends how frequently you plan on changing the value over the product life span.

Surely the CubeF0 HAL example trees have something showing FLASH usage

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
S.Ma
Principal

if you can use i2c eeprom which is few cents, you can store data very easiy, and if you want to later on optimize cost vs dev timw, migrate to internal mcu flash memory.

Flash is written max. 10 times in 1-day (during manufacturing/calibration) only. Flash is only read afterwards i.e., remaining part of product life span. STM32F031K6T6 has 32KB Flash memory. What is possible smallest Flash memory block that can be erased? Is min. FLASH_PAGE_SIZE is 1KB for STM32F031K6T6?

Flash Memory Address: 0x0800 0000 to 0x800 8000