5 years ago.

Can i use ROM as Storage?

I use the nRF51822 as my main MCU,

In my project, i have many data need storage, the HeadStorage many be not enough, so, i want to know is here a way to write data into ROM.

1 Answer

5 years ago.

I don't have experience with the nRF51822, so will have to generalize my answers.

Flash Memory can take a few forms -

ROM - Read-Only Memory, which permits you to have both code and data in it. If this satisfies your needs, then yes certainly you can. And the data could be very simple data types places in const, or structures, or byte-streams of data that when interpreted correctly look like a read-only file. You might find some useful links at flash file system.

On the other hand, if your need is to be able to write to the Flash to store data in it, then this too is possible for mist of the micros. There are some special APIs, referred to as In Application Programming.

I would caution though, that the typical flash memory in a micro has a finite number of flash writes far below what you find in other non-volatile technologies, and so without great care, you could wear it out, which is fatal for the micro. If you only need to write a little, and not very often, then it might be just fine.

Oh, and MBED 5 has the basics for a file system, which can be adapted for read-only, read-write, and with various storage technologies.