Owners manual
System
H3 Datasheet(Revision1.2) Copyright© 2015 Allwinner Technology Co.,Ltd.All Rights Reserved. Page 171
4.8. RTC
4.8.1. Overview
The real time clock (RTC) is for calendar usage. It is built around a 30-bit counter and used to count elapsed time in
YY-MM-DD and HH-MM-SS. The unit can be operated by the backup battery while the system power is off. It has a
built-in leap year generator and a independent power pin (RTC_VIO).
The alarm generates an alarm signal at a specified time in the power-off mode or normal operation mode. In normal
operation mode, both the alarm interrupt and the power management wakeup are activated. In power-off mode, the
power management wakeup signal is activated. In this section, there are two kinds of alarm. Alarm 0 is a general alarm,
its counter is based on second. Alarm 1 is a weekly alarm, its counter is based on the real time.
The 32768Hz oscillator is used only to provide a low power, accurate reference for the RTC.
General Purpose Register can be flag register, and it will save the value all the time when the VDD_RTC is not power off.
4.8.2. RTC Register List
Module Name
Base Address
RTC
0x01F00000
Register Name
Offset
Description
LOSC_CTRL_REG
0x0
Low Oscillator Control Register
LOSC_AUTO_SWT_STA_REG
0x4
LOSC Auto Switch Status Register
INTOSC_CLK_PRESCAL_REG
0x8
Internal OSC Clock Prescalar Register
RTC_YY_MM_DD_REG
0x10
RTC Year-Month-Day Register
RTC_HH_MM_SS_REG
0x14
RTC Hour-Minute-Second Register
ALARM0_COUNTER_REG
0x20
Alarm 0 Counter Register
ALARM0_CUR_VLU_REG
0x24
Alarm 0 Counter Current Value Register
ALARM0_ENABLE_REG
0x28
Alarm 0 Enable Register
ALARM0_IRQ_EN
0x2C
Alarm 0 IRQ Enable Register
ALARM0_IRQ_STA_REG
0x30
Alarm 0 IRQ Status Register
ALARM1_WK_HH_MM-SS
0x40
Alarm 1 Week HMS Register
ALARM1_ENABLE_REG
0x44
Alarm 1 Enable Register
ALARM1_IRQ_EN
0x48
Alarm 1 IRQ Enable Register
ALARM1_IRQ_STA_REG
0x4C
Alarm 1 IRQ Status Register
ALARM_CONFIG_REG
0x50
Alarm Config Register
LOSC_OUT_GATING_REG
0x60
LOSC output gating register
GP_DATA_REG
0x100 + N*0x4
General Purpose Register (N=0~7)
confidential