Main Site Documentation

G400D RealTimeClock.SetTime Lock Up


#1

I believe there is an issue with the RealTimeClock SetTime that appears to be randomly locking up the G400D. I’ve attached a code snippet.


using System;
using Microsoft.SPOT;

using GHI.Premium.Hardware;

namespace MFConsoleApplication1
{
   public class Program
   {
      public static void Main()
      {

         DateTime CurTime = DateTime.Now;
         int Count = 0;

         do
         {
            Count++;
            CurTime = DateTime.Now;
            SetClock(CurTime);
            Debug.Print(Count.ToString() + " - Clock Set - " + CurTime.ToString());
            System.Threading.Thread.Sleep(5 * 1000);
         } while (true);

      }

      static void SetClock(DateTime CurrentDateTime)
      {
         Debug.Print("SetClock - RealTimeClock.SetTime" + CurrentDateTime.ToString());
         RealTimeClock.SetTime(CurrentDateTime);
         Debug.Print("SetClock - RealTimeClock Updated!");
      }


   }
}


#2

I was unable to reproduce this issue after letting it run for 30 minutes using the firmware we just released today. Can you upgrade to the latest version and see if the problem persists?


#3

Thanks John, the latest firmware v4.2.11.2, does seem to fix this issue.