8 REAL-TIME CLOCK (RTC)
S1C33L26 TECHNICAL MANUAL
Seiko Epson Corporation
8-11
(7) (After the POWER SW is turned off if it is still on,) The regulator stops generating 1.8 V (and 3.3 V) and
the power of the S1C33L26 except the RTCV
DD
is turned off.
When automatically turning the system power off by software control, start the above procedure from Step (3).
Power On using an RTC interrupt
(1) When an RTC interrupt occurs, the WAKEUP output level goes 1 (high).
(2) The regulator is enabled to output voltage and the 1.8 V (and 3.3 V) voltage is supplied to the S1C33L26
LV
DD
, PLLV
DD
, HV
DD
, and AV
DD
pins.
(3) The CPU starts operating and executes the initialize routine after power-on reset.
(4) Configure GPIO (2) as an output port and set the port output level to 1 (high). This signal is fed to the
#STBY pin resulting that the RTCV
DD
system circuits will be connected to the system.
(5) Write 0x2 to the RTC_WAKEUP register to set the WAKEUP polarity to active high and enable the
WAKEUP pin to output 1 (high). This control fixes the regulator output to be enabled.
(6) Reset RTCIRQ/RTC_INTSTAT register to 0.
(7) Read the key from the specific BBRAM location and check whether the backup data is valid or not (e.g.
valid if 0xaa). Then if valid, read the backup data from the BBRAM.
(8) Clear the key located in the BBRAM (e.g. write a value such as 0x00).
(9) Execute other processing.
Details of Control Registers
8.6
6.1 RTC Register List
Table 8.
Address
Register name
Function
0x300a00
RTC_INTSTAT
RTC Interrupt Status Register
Indicates RTC interrupt status.
0x300a01
RTC_INTMODE
RTC Interrupt Mode Register
Sets up RTC interrupt modes.
0x300a02
RTC_CNTL0
RTC Control 0 Register
Controls the RTC.
0x300a03
RTC_CNTL1
RTC Control 1 Register
0x300a04
RTC_SEC
RTC Second Register
Second counter data
0x300a05
RTC_MIN
RTC Minute Register
Minute counter data
0x300a06
RTC_HOUR
RTC Hour Register
Hour counter data
0x300a07
RTC_DAY
RTC Day Register
Day counter data
0x300a08
RTC_MONTH
RTC Month Register
Month counter data
0x300a09
RTC_YEAR
RTC Year Register
Year counter data
0x300a0a
RTC_WEEK
RTC Days of Week Register
Days of week counter data
0x300a0f
RTC_WAKEUP
RTC Wakeup Configuration Register
Sets up RTC wakeup conditions.
The following describes each RTC register. These are all 8-bit registers.
Notes: • When data is written to the register, the “Reserved” bits must always be written as 0 and not 1.
• The contents of all RTC control registers are indeterminate when power is turned on, and are
not initialized to specific values by initial reset. These registers should be initialized in software.
• If 1 is being carried over when the counters are accessed for read, the correct counter value
may not be read out. Moreover, attempting to write to a counter or other control register may
corrupt the counter value. Therefore, do not write to counters while 1 is being carried over. For
the correct method of operation, see Section 8.3.5, “Counter Hold and Busy Flag,” and Section
8.3.7, “Counter Read.”
RTC Interrupt Status Register (RTC_INTSTAT)
Register name Address
Bit
Name
Function
Setting
Init. R/W
Remarks
RTC Interrupt
Status Register
(RTC_INTSTAT)
0x300a00
(8 bits)
D7–1 –
reserved
–
–
–
0 when being read.
D0
RTCIRQ
Interrupt status
1 Occurred
0 Not occurred X (0) R/W Reset by writing 1.
Init.: ( ) indicates the value set after a software reset (RTCRST
→
1
→
0) is performed.
D[7:1]
Reserved