Electronic – Can flash memory be used in place of RAM in microcontroller applications

msp430

In my application I'm using a MSP430, however I need to buffer 11kB of data from a UART connection. Obviously the 512B of RAM available is not enough to do this, however the MSP430 has 16kB of flash which would easily do the job.

My basic understanding of flash is that it is used for program code so I am wondering if it is possible to use flash for this purpose?

Thanks

Best Answer

Flash is slow to write to, only accessible in blocks for erasing/writing, on many controllers (not sure about MSP430) slow to read data from (in contrast to reading instructions) and flash has limited write cycles (order of 100,000 times).

So the answer is: It can probably be done, but you shouldn't want to do it.

Maybe an external I2C RAM is an option.