Schmidty1913:
Is there any way I can retain a long variable stored in ram, through a micro reset?i would like my long variable that I am using to store time to be maintained.
If it is time related: There are RTC modules which offer a couple of bytes RAM (backup battery buffered). I.e. the DS1307 module, operated by I2C, offers 56 bytes of RAM. Other than EEPROM, this RAM has unlimited write cycles.
Is your project using a RTC module?
If yes, can you use aRTC module offering some bytes of RAM, like DS1307, maybe?