Setting up the Real Time Clock in the Coldfilre MCF52223 micro

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Setting up the Real Time Clock in the Coldfilre MCF52223 micro

2,166 次查看
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,
标签 (1)
0 项奖励
回复
3 回复数

760 次查看
JimMcP
Contributor I
The real time clock frequency setting fot the MCF52223 is it

    MCF_CLOCK_RTCDR = 48000000;

OR

    MCF_CLOCK_RTCDR = 25000000;


0 项奖励
回复

760 次查看
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 项奖励
回复

760 次查看
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 项奖励
回复