Non volatile data storing

If you have a simple question and just want an answer.
Post Reply
darshan2210
Member++
Posts: 22
Joined: Tue Jan 24, 2017 10:47 am

Non volatile data storing

Post by darshan2210 »

Hello i am new to xmos.
I am using Xmos startkit.
In datasheet they said it gave 64 kb sram .
So,i need to store some variable to non volatile internal memory.
So is there any application notes? or any source code?
i need to store hardly 10 variable not a block of data.


User avatar
Bianco
XCore Expert
Posts: 754
Joined: Thu Dec 10, 2009 6:56 pm
Contact:

Post by Bianco »

You can use flashlib to read and write data to the same external SPI flash chip that contains your firmware:
https://github.com/xcore/sw_flashlib_examples
darshan2210
Member++
Posts: 22
Joined: Tue Jan 24, 2017 10:47 am

Post by darshan2210 »

Thanks. Bianco
But what about the internal SRAM can we use it?
User avatar
mon2
XCore Legend
Posts: 1913
Joined: Thu Jun 10, 2010 11:43 am
Contact:

Post by mon2 »

SRAM is volatile so you will lose the contents with the absence of power. But yes, you may certainly save your values to SRAM. Or do you plan to use battery power to keep the SRAM active ?

FLASH memory is non-volatile and will also retain the contents without power. XMOS devices do not feature internal EEprom which is another option for non-volatile storage. However, varying with your project requirements, you could slap on an external low cost I2C or SPI EEprom.
Post Reply