Hi,
The problem I am trying to solve is to keep track of time while out of communication with the PC connected via USB.
I am using an Artemis Nano that has battery backup.
When the PC is up and running it can inform the Nano of what time it is and the Nano can then increment time as it passes.
This context is lost if the Nano gets rebooted by the PC.
Since I want to be accurate to within a few seconds, writing the current value to EEPROM (emulated via flash) is not an option. It would slow things down (EEPROM writes take time) and burn it out (yes flash is better than EEPROM, but writing once/sec would still burn it out).
I have not been able to figure out a way to prevent the PC from rebooting the Nano if AC fails on the PC and then the PC gets power again. During the Windows initialization, the Nano gets rebooted. Until my PC app is invoked, the Nano doesn’t know what time it is.
I see a couple option:
-
Is there a way to prevent the Nano from being rebooted during Windows initialization?
-
I have attempted to get the variable attribute ‘noinit’ to work. It compiles and I see a ‘noinit’ section in the memory map, but it is still being initialized to zero on startup.
Can you help me with either of the above or is there another way?