2007-12-18 11:32 PM
Writing to Bank0 Sectors 5 - 7 of STR71xFR2 without erase
2007-12-18 11:16 PM
Hi all,
I need to be able to write(change) data in the upper part of the flash that I am using as NV storage. The problem is that I cannot afford to erase the sector as I don't have enough RAM to store the contents in while erasing the entire 64K block. I receive the 1 over 0 error when I try to modify the data in flash. (Which is right according to the datasheet) Can anyone advise me on this? Regards :-[2007-12-18 11:32 PM
Correct, you cannot write a 1 over 0 without erasing the whole sector. What you are trying to achieve is called 'EEPROM emulation in flash'. There is an excellent application note on the subject from ST:
http://eu.st.com/stonline/products/literature/an/13455.pdf The main idea is to use two flash sectors: when you are erasing one of them, the data is stored in another. The rest of it is a lot of logic to deal with unexpected power outages.