Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
09/30/06 18:13
Modified:
  09/30/06 18:36

Read: times


 
#125446 - Flash is Not RAM
Responding to: ???'s previous message
Benjamin Khan wrote:

Is it possible to use the program flash as RAM for temporary storage? Does any microcontroller support such a feature?

Well, you can't really think of flash as RAM. RAM stands for "random access memory". With RAM, you can read or write to any address at any time. Flash memory is different. Generally speaking, you can only write to an address that has been previous erased, and you have to erase the cells in groups called "blocks". The size of each block depends on the device, and a single device may contains blocks of different sizes. Find a data sheet to learn the details.

Now, if we change your question to, "Is it possible to use the program flash as memory for temporary storage?", the answer is "maybe". It depends on a lot of things. Here are some I have thought of:
  • Can the micro execute out of one part of the flash while it erases and/or writes another?
  • Are you updating the temporary data often? Flash memory has a fixed limit on how many times you can erase it, and you might eventually exceed this limit if you are making a lot of frequent changes.
  • Erasing and writing to the flash memory is slower than writing to RAM. Would that be okay in your application?
  • As noted above, to change the contents of one location, you have to erase the entire block that contains that location. Would that be okay in your application?

There may be other considerations that I have not thought of. In order to consider flash for temporary storage, you need to first understand how flash memory works, and then think very carefully about how you are planning to use it.

-- Russ


List of 28 messages in thread
TopicAuthorDate
large amounts of serial data            01/01/70 00:00      
   Need More Information            01/01/70 00:00      
   Use derivative with more ram            01/01/70 00:00      
   some other options            01/01/70 00:00      
      careful now ... what you want ISN'T EPROM            01/01/70 00:00      
      Message validity            01/01/70 00:00      
      A Possible Simplification? Maybe?            01/01/70 00:00      
         Ramifications            01/01/70 00:00      
            Whoops! Corrections!            01/01/70 00:00      
            Ramifications Acknowledged            01/01/70 00:00      
      trouble            01/01/70 00:00      
         scrolling and serial memory            01/01/70 00:00      
            the problem with scrolling            01/01/70 00:00      
   EEPROM writing            01/01/70 00:00      
      SRAM with a battery            01/01/70 00:00      
      Some Options            01/01/70 00:00      
         RAMTRON; FRAM; MRAM            01/01/70 00:00      
      2x 2k            01/01/70 00:00      
         Power fail recovery            01/01/70 00:00      
            options I will use now            01/01/70 00:00      
               But don't forget ...            01/01/70 00:00      
               Power Loss detector            01/01/70 00:00      
         absollutely            01/01/70 00:00      
   one last question            01/01/70 00:00      
      Flash is Not RAM            01/01/70 00:00      
      FLASH <> RAM            01/01/70 00:00      
         My predecessor did just that            01/01/70 00:00      
      options, options....            01/01/70 00:00      

Back to Subject List