Fez Cerb 40 II RTC strange problem

Hi,

I have a strange problem with the Fez 40 cerb II. The RTC keeps returning jan. 1, 1980 everytime I tried to get the date time. It was working fine for a few weeks now.

I’ve change the battery, check capacitors and the crystal for proper value and oscillation freq. I have also tried on 4 of my other new Fez 40 Cerb II and still receiving Jan. 1, 1980.

I set the RTC time on a seperate thread once I receive the GPS UTC time. I don’t know if this would cause any problem, but it was working before as is.

Thank you very much

The date isn’t being set to the RTC correctly, if the calls are still showing 1980. Please show some sample code and debug output.

Hi Brett,

I’ve included a sample code with the output. I thought maybe some of the new codes I’ve added to the project that might change something so I’ve create short snippet to test the RTC and it is still producing the same code.

I am using VS2013 with NETMF and Gadgeteer Package 2014 R5 sdk.

I’ve also tried to reflash the firmware a few times. Also tried on 4 other Fez cerb 40 II that I have.

Please have a look, thank you.

using System;
using Microsoft.SPOT;
using GHI.Processor;
using System.Threading;

namespace TestRTC
{
    public class Program
    {
        public static void Main()
        {
            DateTime dt = new DateTime(2015, 6, 14, 1, 1, 1);
            while(true)
            {
                try
                {
                    RealTimeClock.SetDateTime(dt);
                }
                catch
                {
                    Debug.Print("Set RTC failed.");
                }                
                Thread.Sleep(5000);
                try
                {
                    DateTime rtcDt = RealTimeClock.GetDateTime();
                    Debug.Print(rtcDt.ToString());
                }
                catch
                {
                    Debug.Print("Get RTC failed.");
                }
            }
            
        }
    }
}

I’ve finally got the RTC to work normally again. I don’t know if it’s a solution or not but I uninstalled everything and reinstall everything back including VS 2013 and it is working fine.

I doubt that was the cause but glad it is working for you again.

Exactly, I doubt that too, but at this point 6 months into development and testing it was all good and then… the RTC went “weird” on me. I checked everything I could and a fresh install is all I could think of and it works, I’ll just leave it as is. Also, I have four Fez cerb 40 II on hands and it is impossible that all 4 produces the same result with the same code.

I’ll just cross my fingers at the end of the month when the product demo is running for the presentation.

The worst case I’ll just hook up the G120.