What are the steps to use internal Flash of the micro-controller as EEPROM instead of using external EEPROM. What cares need to be taken?
Asked
Active
Viewed 654 times
-1
-
StackOverflow is for **programming** questions. Tag your language and show your problematic code / commands. Also try asking at **https://electronics.stackexchange.com/** (can use same account). – VC.One Sep 16 '17 at 15:56
-
This is a pretty broad question Amit, and not really suitable to Stack Overflow. That said there are plenty of issues. Flash has more limited write cycles, you have to erase data in pages, and you have to put the flash into write mode in order to program it so you need to be certain that nothing else is accessing the flash--otherwise you can get some nasty issues. That said, you can use it as a non-volatile storage area, you just need to be careful how you go about it. It's a lot more work that can be stated in a comment or even an answer, if you want to do it right. – John Szakmeister Sep 16 '17 at 16:01
1 Answers
0
Thanks for the efforts @jszakmeister.
I googled & found following answers. Just writing here so that if anyone need, he/she can refer.
- The FLASH memory is typically organized in pages (1 KByte, 2 KByte, 4 KByte, etc). Usually the full page needs to be erased first before writing in. This takes both time and energy. If one wants to do this while the microcontroller is shutting down because of a power loss, it may be critical.
- Interrupts need to be disabled for FLASH programming in many microcontrollers which increases the interrupt latency time.
- The number of erase cycles are less for internal FLASH memory than for EEPROM. FLASH(10k-100k cycles) whereas EEPROM (500k-1M cycles).

harper
- 13,345
- 8
- 56
- 105

Amit Tandel
- 5
- 9