7.S5PV210之RTC相关寄存器详解

来源:互联网 发布:实况2017数据 编辑:程序博客网 时间:2024/06/08 03:19

1、Interrupt Pending Register (INTP, R/W, Address = 0xE280_0030)

中断挂起寄存器:

You can clear specific bits of INTP register by writing 1’s to the bits that you want to clear regardless of RTCEN value.



不论RTCEN的值是多少,如果你想清除INTP特定的位可以通过对相应的位写入1.

2、Real Time Clock Control Register (RTCCON, R/W, Address = 0xE280_0040)

RTC控制寄存器:
The RTCCON register consists of 10 bits such as the RTCEN, which controls the read/ write enable of the BCDSEL, CNTSEL, CLKRST, TICCKSEL and TICEN for testing, and CLKOUTEN for RTC clock output control.
RTCEN bit controls all interfaces between the CPU and the RTC, therefore it should be set to 1 in an RTC control routine to enable data read/ write after a system reset. To prevent inadvertent writing into BCD counter registers the RTCEN bit should be cleared to 0 before power off.
CLKRST is counter reset for 2
15clock divider. Before RTC clock setting, 215clock divider must be reset for exact RTC operation.
RTCCON寄存器包含10个位,如下图所示。RTCEN控制CPU和RTC所有的接口,因此在系统复位后在RTC中使能相应的读写数据操作RTCEN应该被置1。为了防止因为数据意外写到BCD计数器寄存器时,应该在电源关闭前将RTCEN位置0。

CLKRST是对2^15时钟分频器的计数器复位。在RTC时钟设置之前,为了RTC精确的运行,2^15时钟分频器必须复位。


3、Tick Time Count Register (TICNT, R/W, Address = 0xE280_0044)

这个寄存器暂时我们不用,它一般用在操作系统中。


4、RTC Alarm Control Register (RTCALM, R/W, Address = 0xE280_0050)
The RTCALM register determines the alarm enable and the alarm time. Note that the RTCALM register
generates the alarm signal through both ALARM_INT and ALARM_WK in power down mode, but only through ALARM_INT in the normal operation mode. Enable ALMEN to use ALARM_INT and ALARM_WK.
If compare value is year, ALMEN and YEAREN must be enabled. If compare values are year, month, day, hour,min and sec, ALMEN, YEAREN, MONEN, DAYEN, HOUREN, MINEN and SECEN must be enabled.
 

RTC闹钟控制寄存器:
RTCALM寄存器决定使能闹钟和设置闹钟时间。注意:RTCALM寄存器产生闹钟信号,在断电模式下通过闹钟中断和闹钟唤醒信号,在正常运行模式下只能通过闹钟中断信号。使能ALMEN后使用闹钟中断和闹钟唤醒信号。如果比较的是只是年份则必须同时ALMEN和YEAREN使能。如果是年月日时分秒则必须ALMEN, YEAREN, MONEN, DAYEN, HOUREN, MINEN and SECEN都使能。

5、Alarm Second Data Register (ALMSEC, R/W, Address = 0xE280_0054)
设置闹钟的秒数寄存器


下面这几个也是设置闹钟相关日期/时间的寄存器:



下面这几个是设置正常时实时时钟的时间寄存器:





最后一个是设置TICK相关的寄存器,暂时我们还不用:




原创粉丝点击