English
Language : 

WM8352 Datasheet, PDF (189/336 Pages) Wolfson Microelectronics plc – Wolfson AudioPlus™ Stereo CODEC with Power Management
Production Data
WM8352
22 REAL-TIME CLOCK (RTC)
22.1 GENERAL DESCRIPTION
The WM8352 contains a Real Time Clock (RTC), which maintains the current date and time, and
also has the capability to generate alarms and periodic interrupt signals. The RTC is powered by the
backup supply (VRTC), in order that it can keep running when the normal power sources are
unavailable.
The RTC uses the 32.768kHz clock generated by the on-chip crystal oscillator. To compensate for
errors in this clock frequency, the RTC includes a frequency trim option. Alternatively the RTC can be
clocked from external 32.768kHz input on a GPIO pin configured as 32kHz input. See Section 12.2
for details of the 32kHz oscillator control.
22.2 RTC CONTROL
22.2.1 MODES OF OPERATION
The Real Time Clock is enabled when RTC_TICK_ENA is set to 1. (This is the default setting.) See
Table 135 for the definition of this RTC_TICK_ENA.
The RTC can operate as a 24-hour clock or else as a 12-hour clock with a separate AM/PM flag bit.
The RTC time register fields can be treated as BCD (binary-coded decimal) or as binary data
formats. These options are selected as described in Table 130.
ADDRESS
R23 (17h)
RTC Time
control
BIT
LABEL
15 RTC_BCD
14 RTC_12HR
Table 130 RTC Modes of Operation
DEFAULT
0
0
DESCRIPTION
RTC Coding (applies to all time
registers)
0 = Binary
1 = BCD
RTC 12/24 hours mode
1 = 12 hours (MSB of RTC_HRS
indicates AM/PM)
0 = 24 hours (MSB of RTC_HRS is 0)
22.2.2 RTC TIME REGISTERS
The current time and date are held in registers R16 to R19, as described in Table 131.
ADDRESS
R16 (10h)
RTC sec / min
R17 (11h)
RTC hour / day
BIT
LABEL
14:8 RTC_MINS [6:0]
6:0 RTC_SECS [6:0]
10:8 RTC_DAY [2:0]
5 RTC_HPM
4:0 RTC_HRS [4:0]
R18 (12h)
RTC date
12:8 RTC_MTH [5:0]
5:0 RTC_DATE [5:0]
R19 (13h)
RTC year
13:8 RTC_YHUNDRED
S [6:0]
7:0 RTC_YUNITS
[7:0]
Table 131 RTC Time Registers
DEFAULT
000 0000
000 0000
1
0
0 0000
0_0001
00_0001
01_0100
0000_0000
DESCRIPTION
RTC Minutes; 0 to 59
RTC Seconds; 0 to 59
RTC Day of the week; 1 to 7, 1 =
Sunday
RTC Hours AM/PM flag
0 = AM
1 = PM
Only valid in 12hour mode.
Hours register with 0-23 range in
24hour mode and 1-12 in 12 hour
mode.
Month register with range 1-12.
Date register with range 1-31.
Year hundreds register tied to
20(dec)
Year units register with range 0-99.
w
PD, February 2011, Rev 4.4
189