Community
cancel
Showing results for 
Search instead for 
Did you mean: 
SDijk
New Contributor I
1,218 Views

Clock resets after power off?

Jump to solution

I'm using Edison to log data in a prototype that's deployed without an internet connection. The device is turned off during the night. Now that I'm reading out the logged data, it seems like all sessions start at the same time: November 9, 17:08, continuing up to different end times. This may well have been the last time the Edison had an internet connection, so my hypotheses right now are:

(A) The internal clock doesn't continue when the device is powered off (using the ON/OFF switch on the SparkFun Battery Block). This seems to be why there is a V_VBAT_BKUP pin mentioned in the http://download.intel.com/support/edison/sb/edisonmodule_hg_331189004.pdf Hardware Guide; the Battery Block (https://cdn.sparkfun.com/datasheets/Dev/Edison/SFE_Battery_Block.pdf schematic) doesn't seem to connect to this pin.

(B) The internal clock resets when powered on again. The reset time seems to be the last NTP sync time, and not the last time recorded when it was turned on.

I've got three questions:

1. Is this right?

2. What can I do about it in the future? E.g., connecting to V_VBAT_BKUP using the Battery Block, turning off NTP sync. Right now my plan is to assign subsequent IDs to each session, so that I at least know in which order they were created.

3. Each session has a separate log file. Right now I can't verify the order in which these were created. Each file is an sqlite3 database. Is there a way to still make a good guess about the order in which the already recorded logs were created?


Accepted Solutions
Sergio_A_Intel
Employee
63 Views

Hi,

Yes, the clock stops working if the Edison is turned off. In order to have the clock working while the Edison is powered off you need to power V_VBAT_BKUP. According to the Hardware guide you should connect an external power source to pin 23. The voltage and ampere values are programmable. The default settings are 2.5V/10uA. You can see a discussion about that here . When the RTC is being powered I don't see the need to have NTP enabled, try turning it off.

As for the log files, I'm not sure if there are some kind of timestamps that can help you tell the order of creation of the file. Take a look here https://www.sqlite.org/lang_datefunc.html SQLite Query Language: Date And Time Functions . Hopefully you find this useful.

Sergio

View solution in original post

2 Replies
Sergio_A_Intel
Employee
64 Views

Hi,

Yes, the clock stops working if the Edison is turned off. In order to have the clock working while the Edison is powered off you need to power V_VBAT_BKUP. According to the Hardware guide you should connect an external power source to pin 23. The voltage and ampere values are programmable. The default settings are 2.5V/10uA. You can see a discussion about that here . When the RTC is being powered I don't see the need to have NTP enabled, try turning it off.

As for the log files, I'm not sure if there are some kind of timestamps that can help you tell the order of creation of the file. Take a look here https://www.sqlite.org/lang_datefunc.html SQLite Query Language: Date And Time Functions . Hopefully you find this useful.

Sergio

View solution in original post

SDijk
New Contributor I
63 Views

Thank you Sergio. It seems the SparkFun blocks don't break out or connect to pin 23, I don't have an Intel breakout board and soldering to the header appears risky. So I'll try to have the prototype fully powered continuously during next deployment. For accidental power loss I'll see whether disabling NTP or regularly setting the hwclock helps.

Reply