Description: We are developed a PCB Controller board using theMCF52259. We have been successful at configuring the system clock based on an external crystal, controlling LEDs and reading dip swiches using GPIO, using Pit timers and using the UARTs for communication.
We are currently developing using USBDM and the Codesourcery Lite tool chain in conjunction with Eclipse/CDT Kepler. We are coding in C99.
We are attempting to use the RTC in the MCF52259 and econuntering difficulties. When we attempt to read back the RTC registers (and the RTC control register in the clock module) after configuring them, the values read do not reflect the values written into them. The values seem to be the reset values of the registers and not the values written into them.
We have tried checking the PPMR to insure that the RTC module is enabled. When we read PPMRL we get a value of 0x4000 0004, for PPMRH we get a value of 0x0000 8064. According to the reference manual, it should be impossible to obtain these values.
The minimal test code that we are using to try to bring up the RTC is attached. We have also tried many variations of this attempting to follow the reference manual.
We are confused about the dummy RTC reads referred to the in the Reference Manual.
The attached is a ZIPed file named RTC_test.zip.
Original Attachment has been moved to: RTC_test.zip