Setting up the Real Time Clock in the Coldfilre MCF52223 micro

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Setting up the Real Time Clock in the Coldfilre MCF52223 micro

2,167 Views
JimMcP
Contributor I
Is there any  code example on setting up the Real Time Clock  in the MCF52223. And to be able to read and write to it.

Thanks,
Labels (1)
0 Kudos
Reply
3 Replies

761 Views
JimMcP
Contributor I
The real time clock frequency setting fot the MCF52223 is it

    MCF_CLOCK_RTCDR = 48000000;

OR

    MCF_CLOCK_RTCDR = 25000000;


0 Kudos
Reply

761 Views
mjbcswitzerland
Specialist V
Hi Jim

I believe that the oscillator input is valid.

The M52223 is generally clocked from 48MHz (due to USB) so
MCF_CLOCK_RTCDR = (48000000-1); seems to be the exact value required.

Regards

Mark

0 Kudos
Reply

761 Views
mjbcswitzerland
Specialist V
Hi Jim

Take a look at the following link which discusses the RTC in the M5223X (I belive it is identical to the RTC in the M52223).

http://www.utasker.com/forum/index.php?topic=35.0

The RTC is fully supported in the uTasker project and also simulated in the uTasker simulator.
Complete code and a demo is available in the latest service pack - the project also supports the M52223.

Regards

Mark

0 Kudos
Reply