2020-07-11 07:41 AM
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?
2020-07-11 07:48 AM
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
2020-07-11 07:49 AM
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
2020-07-11 08:28 AM
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.
2020-07-12 01:00 AM
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