- 论坛徽章:
- 0
|
参考S3C2440的datasheet, 为了开启RTC中断,我们需要做如下工作:
1) 在中断控制器中打开TICK中断,---即unmask TICK控制位。
2) 设置 rRTCCON = 0x0;
/*should not enable CLKRST, otherwise the counter does not work.*/
3) 设置rTICNT = 0x87; /*enable the RTC TICK intrrupt (BIT 7 ) */
/*set timer cnt = (7+1)==> 1/16 second */
WatchDog 定时器的使用方法---仅作为定时器,禁止自动重启。
1) 在中断控制器中开启WatchDog中断,source mask & subsource mask.
2) 设置 rWTCNT = 0x0100; rWTDAT = 0x0100; /*timer count.*/
3) 设置 rWTCON = 0x8024;
/*disable reset, enalbe intrrupt, enable timeout counter*/
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u3/94507/showart_1933241.html |
|