7.S5PV210之RTC相關暫存器詳解
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控制暫存器:
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
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.
5、Alarm Second Data Register (ALMSEC, R/W, Address = 0xE280_0054)
設定鬧鐘的秒數暫存器
下面這幾個也是設定鬧鐘相關日期/時間的暫存器:
下面這幾個是設定正常時實時時鐘的時間暫存器:
最後一個是設定TICK相關的暫存器,暫時我們還不用: