Date() returned "1/1/2000"

Hi,

Recently we installed couple of sensors at customer site. While others are working fine, one sensor just collected one measurement then went offline and never connected.

Timestamp captured for collected measurement is really wield, it is “1/1/2000 12:00:00 AM”

Can any one share their thoughts on this behavior?.

Is this an imp002? If the real-time clock isn’t working at all (bad crystal?) then yes one of the side-effects is that whenever it goes to sleep on a timer, it won’t wake up.

Peter

It’s imp003. It was working ok for a few days. Stopped working when we went out for the customer install.

This is a symptom of the imp not having a correct RTC initialization. There are three main reasons this happens:

  1. The imp had a power outage then started running in offline mode. This is correctable by forcing a connection before you start collecting data.

  2. There is an issue with VDD_VBAT and you tried to sleep. This pin powers the imp while it is asleep, if there is an issues (voltage too low, solder open, etc) then imp behaves unpredictably when you try to sleep but will almost certainly re-initialize the RTC to 1/1/2000.

  3. (The most likely) Something is wrong with your 32K crystal and it is not running. In this case the imp detects the crystal but since it never runs you are stuck at 1/1/2000 forever. One cause for this could be a crystal with too high of a load capacitance as this will cause the crystal to sometimes not start. The imp003 requires very specific crystals and load caps as the low power crystal driver is very sensitive. Please ensure that you are using a crystal with a 6pF C_load as specified in the datasheet and the required load caps (typically about 2pF but depends on design). If you are in this situation, you will need to change the crystal and caps to the correct values

Hope this helps.
Brandon