… but the system hangs at RTC.Initialize – (WARN: Total initialization time exceeds ten seconds. : ProgramStarted is blocking execution… wonk wonk wonk). If I comment out RTC.Initialize the program runs but RTC.GetTime equals 01/01/1980 00:00:00 no matter what I set it to.
I know there is a problem with the Cerb40 C21 & C22 capcitors. Does that problem apply to the Cerberus C1 and C10 capcitors as well? [/quote]
Yeah, if you don’t call Initialize, the Crystal is never turned on, so it is not a surprise that it doesn’t keep time.
I have been using the RTC on the Cerb40 and it keeps time quite well. So I just took a look at the drawings for the FEZ Cerberus and it is exactly the same as the Cerb40 (other than the length of the traces, which are longer on the Cerberus, adding more capacitance). It has two capacitors C10 and C11 that are 27pF (too big). So, I would get a 6pF crystal and remove one or both of the capacitors (C10, C11).
Typically, when the clock initialization times out, it is because the crystal will not stabilize. This crystal should stabilize in 1 second or less (preferrably <0.1s). If you want to know for sure what is happening, I suggest that you download the spec sheet for the ST chip and lookup the LSE Ready bit. This bit will change to 1 when the crystal is stable. You can use the GHI Register classes to read this bit. Alternatively, you can go to the GHI codeplex.com site for the fiirmware and download the RTC.cs file. This contains the RTC class. Add this to your project, change the class name and instantiate that class instead (will require some modifications to work). Then you can step through the code and see exactly where the problem is.
Or you can buy an ENC28 module, and just hit the NTP servers on the internet to get the time everytime you boot!
Or you could just get a Uninterruptible Power Supply for the whole device.
Either way, GHI has given us the source code and all the docs needed here. Good Luck.