Flash memory (was EEPROM library)

did I read that the Wixel has EEPROM?
and so my question is - is there library (any) support for it?

I want to store some parameters that are user-settable within my project


There is no EEPROM, but you should be able to use a block of flash to store user parameters. We don’t have a library for reading or writing from the CC2511’s flash, but you can read the datasheet and make your own.


been glaring at the datasheet
seems to imply a maximum guaranteed number of writes to flash of around 1000

since that’s also used for programs
does that mean a limited number of program uploads?

also, I guess the bootloader lives in flash too?
can you tell me (or how to find out) where it lives (so I don’t nuke it!)

Hello, mmcp42.

As we say in the Wixel User’s Guide in the “Wixel USB Bootloader” chapter, the bootloader occupies the first 1 KB (1024 bytes) and the last 2 KB of the CC2511F32’s flash memory. You don’t need to worry about nuking it because we have configured those blocks to be write-protected.

Yes, the programs are stored in flash so there will be a limited number of program uploads, but the datasheet guarantees at least 1000 and you will probably get many more than that. We haven’t tested it.


Also, if this data you want to store in flash is going to change frequently and you are worried about wearing out the flash, you can use an EEPROM emulation scheme like the one shown in this video:

The way they suggest doing reads from the EEPROM in that video would be pretty slow. Instead I would store a cache of the value of each record in RAM.

I’ve never done anything like this before, but you can find more information by searching Google for “emulate eeprom on flash”.


thanks for your feedback, David

I have decided to go down the route of external EEPROM
SPI would be easy enough as I have an SPI library
but I don’t have enough spare pins, dammit

I’m looking at 1-wire as a possibility
is there a 1-wire library?


I looked at the SDK - spotted the I2C library
I2C EEPROM is a lot cheaper than 1-wire
similar price to SPI in fact
so may go down that route

thanks for listening
will let you know when it’s all working!

No, I don’t know of any 1-wire library for the Wixel. --David

I now have a working eeprom!

I’m using the i2c library to talk to a 2kbit eeprom (M24C02)

it’s part of a remote camera trigger I’m working on
I’m using it to store the settings between sessions