cancel
Showing results for 
Search instead for 
Did you mean: 

Flash as EEPROM with STM32F100XX

ezyreach
Associate II
Posted on June 18, 2011 at 13:50

I am trying to use the Flash as EEPROM and need to store some user datas into the flash.

uint8_t User[]=''1112223332@gmail.com''

May i know how to store the above data in the FLASH?

In the application notes i found that each time before you write into the FLASH the whole block is erased.

Is it necessary to erase the entire block before writing into it?

The total area of the page is defined to be only 1KB.

And also the data can be written either as WORD or Programhalfword? No byte write and read is possible?

2 REPLIES 2
Posted on June 18, 2011 at 14:15

You only need to erase if the section/portion of flash you want to write is not blank. If you want to be writing lots of small things, write them in a list/loop, read the last one, and erase when you fill a page.

The minimum write/program unit is 16-bits, but you can read 8/16/32-bits as you would with normal memory.

To program your string you'd round the length up to a multiple of 2, and program it as a group of 16-bit words. Use standard programming code from ST's library examples.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
vikas_sinha75
Associate II
Posted on July 06, 2011 at 08:22

you can go through example available at

http://www.st.com/stonline/stappl/resourceSelector/app?page=resourceSelector&doctype=FIRMWARE&ClassID=1734

Hope It will help