This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Flash memory for Data storage?

I am finding conflicting information regarding the use of Flash memory.

Some information indicates that all Flash memory is for code only, while other information implys that Flash can be used for code and data both. I get the impression that data storage in Flash is something that can be done on some parts and not others, but can't find any information on manufacturers websites that clarifies the issue.

Is there any good information out there that will tell me what is what? I am looking at 8051 based parts - Atmel & Philips mostly.

Thanks,
Scott Kelley

Parents
  • Eric,

    What I am saying is that The same block of flash memory CANNOT be written/read/erased while the code stored in the same block is executing at the same time. These two actions CANNOT be taken simultaneously.
    What you said is right that code in one sector and data in another. But if there is only one block (block is not a page or a sector, but contains multiple sectors), the execution of the code has to be halt until the erase and write operation finished, which takes rather long, compare to normal data saving. What's more, the interrupts cannot be responsed during this time. These are the limitations for writing data to the same block.
    P89C51RD2 you mentioned also has both IAP and ISP. Thanks for the information. As far as I know now, Philips and SST provide '51s that can treat flash as data memory without restriction.

Reply
  • Eric,

    What I am saying is that The same block of flash memory CANNOT be written/read/erased while the code stored in the same block is executing at the same time. These two actions CANNOT be taken simultaneously.
    What you said is right that code in one sector and data in another. But if there is only one block (block is not a page or a sector, but contains multiple sectors), the execution of the code has to be halt until the erase and write operation finished, which takes rather long, compare to normal data saving. What's more, the interrupts cannot be responsed during this time. These are the limitations for writing data to the same block.
    P89C51RD2 you mentioned also has both IAP and ISP. Thanks for the information. As far as I know now, Philips and SST provide '51s that can treat flash as data memory without restriction.

Children
  • I think this discussion very interesting.
    Can anyone tell me if is it possible to save 32bits data the internal flash (Philips P89C51RD+).Since the P89C51RD is 8 bit data microcontroller, how can I save a 32 bit data? is it possible?
    I am using the assembly routines of IAP system programming.But with that it is only possible to save 8 bit data.I am now triyng to make code in assembly in order to save 32bits data, but its not working. Can someone help me?

  • "Since the P89C51RD is 8 bit data microcontroller, how can I save a 32 bit data?"

    The same way you do anything with 32-bit (or 16-bit) data on an 8051: you have to handle it as 4 (or 2) separate bytes.

    This has nothing whatsoever to do with the data being in Flash!