TomE

Re: MCF52259 RTC problems

Discussion created by TomE on Feb 8, 2013
Latest reply on Feb 14, 2013 by TomE

Hi

We have a problem with the RTC on MCF52259.

We put a crystal 32.768Hz between the RTC-EXTAL and RTC-XTAL pins. A battery backup (3V button lithium) to the VSTBY pin.

The RTC works only in battery backup mode. In this case it is possible to see a 32K768 oscillation on pin RTC-XTAL. When we put the the micro in normal operation (power supply from 3.3V), the oscillation on RTC-XTAL is stopped and the RTC stop to work.

How is possible? Can you help us, as soon as possible?

Thank you

 

 

BY: Marco Maioli

 

 

Searching the manual for "RTC" finds:

 

7.3.2 RTC ModeA dedicated RTC oscillator can be selected to run the RTC circuitry. In normal operation, this oscillator is powered by the VDDPLL and VSSPLL pins. When the part is shut down, this oscillator is powered by the VSTBY pin.

 

I guess those other voltages have to be present or your chip probably wouldn't work properly when on.

 

7.7.1.9 Real-Time Clock Control Register (RTCCR) The RTCCR is used to configure the RTC oscillator. The EXTALEN bit enables and disables the RTC_EXTAL pin, RTC registers are reset only once, during the first power-on reset (POR), and are never reset again as long as the power source is connected.

This bit resets to the OFF state. So does the OSCEN bit. The oscillator is disabled on a power on reset. Is your code enabling the oscillator and pin? It has to do this somewhere.

 

Where it says "as long as the power source is connected" it doesn't say WHICH power supply they're talking about. If these registers are all powered from VSTBY then it you need to turn the oscillator on on every Reset, and the bits should stay that way. If they reset when the 3V3 goes off it wouldn't be a very useful design. It should state which supply, but it doesn't.


There's nothing in the Reference Manual or Data Sheet detailing how this works or how to use it. There are no App Notes on this subject.

 

You'll have to find someone who has worked this out already (why you're asking in the forum), or you'll have to experiment and reverse-engineer it yourself. This happens a lot with Freescale chips. I've spend months doing this.

 

I'd recommend you change the design to use an external RTC chip on an SPI or I2C bus. They come with documentation.

 

Although not for your chip, you might like to read AN4503.

 

Tom

 


 

Message was edited by: Monica Arvizu

Outcomes