Go Down

Topic: Use PROGMEM on Zero to save variable for power reset (Read 171 times) previous topic - next topic

klemko

Hello,

i made a clone of Arduino Zero board for myself and have been using it in a project for some weeks now. But now i noticed that i need a correction variable i na system, that i input via my touch lcd. But the problem is that Cortex M0 on Arduino Zero does not have a EEPROM to store this correction variable on there. The variable itself is modified maybe once or twice per month, but the PCB is turned off and on from power couple of times per week. And i also dont want to have to order new PCB just to add a eeprom chip on, just to store one float variable.
That is why i was wondering if i can use PROGMEM to store this variable on flash and to keep it there to be available even after power reset? The variable itself is a float that has max 999.99 and -999.99 values.

Thanks in advance

Koepel

Do you know the status of the EEPROM emulation ? I don't know the latest situation for the Zero.
This seems to be your only option: https://github.com/cmaglie/FlashStorage.
It is in the Library Manager as: "FlashStorage by Various".

Is there a RTC with a battery ? Or a OneWire bus that can be used to add storage ?

DKWatson

I share any sentiment against MCUs that don't have internal EEPROM, unfortunately that list is longer than those with. The concept of storing to internal flash is certainly an option if you cam deal with the erase/write cycle limitations. Another option, especially since you're building your own board, is external EEPROM, which is gaining popularity vis-a-vis libraries, etc. One chip particularly worth looking at is the Microchip 24xx256. It's a 256Kb I2C capable of being utilized as a single 32KB or daisy chained x8 for 256KB. Datasheet claims >1,000,000 erase/write cycles.
Live as if you were to die tomorrow. Learn as if you were to live forever. - Mahatma Gandhi

westfw

Adafruit "metro m0 express" (and several,related boards) have a separate 2mb spi flash chip...
No debug, though.

Go Up