Greg Semeraro

MCF5222x RTC Confusion

Discussion created by Greg Semeraro on Jan 5, 2007
Latest reply on Jan 5, 2007 by James Williams
I'm using the MCF52221 and trying to use the integrated RTC. The latest versions of the RM (v1.0 and v2.0) indicate that the prescaler control for the RTC clock (used to generate the 1 Hz RTC clock) is in the RTC control register but fails to indicates the bits used or the magic numbers. I found a table in v0.0 of the RM that gives the magic numbers for selecting one of 4 clock sources but no indication of the location of the bits in the register or where the clock is actually coming from. The IDE is no help either because it doesn't even list the RTC as a device in the "register" view of the debugger. I'm running the CPU at 27.5 MHz and in the default mode (whatever that is) the RTC seems to be running slow - ~70 seconds of wall time measured as ~39 seconds by the RTC.

Is there anyone who can explain the RTC or point me to the Freescale document which describes it?

Thanks,
Greg

Outcomes