English
Language : 

AN1216 Datasheet, PDF (2/11 Pages) STMicroelectronics – Implementing a periodic alarm with TIMEKEEPER
AN1216
TIMEKEEPER® configuration
The TIMEKEEPER register mapping is shown in Table 2. This is divided in two parts: the
clock registers and the alarm registers.
Table 2. Typical TIMEKEEPER® (M48T37V/Y) register map
Data
Address
Function
D7
D6
D5
D4 D3 D2 D1 D0
7FFFh
7FFEh
7FFDh
7FFCh
7FFBh
7FFAh
7FF9h
7FF8h
7FF7h
7FF6h
7FF5h
7FF4h
7FF3h
7FF2h
7FF1h
7FF0h
0
0
0
0
0
ST
W
WDS
AFE
RPT4
RPT3
RPT2
RPT1
WDF
10 Years
Year
0
0
10M
Month
0
10 date
Date
FT
0
0
0
Day
0
10 hours
Hours
10 Minutes
10 Minutes
10 Seconds
Seconds
R
S
Calibration
BMB4 BMB3 BMB2 BMB1 BMB0 RB1 RB0
0
ABE
0
0
0
0
0
0
Al 10 Date
Alarm Date
0
Al 10 Hour
Alarm Hour
Alarm 10 Minutes
Alarm Minutes
Alarm 10 Seconds
Alarm Seconds
1000 Years
100 Years
AF
Z
BL
Z
Z
Z
Z
Year
Month
Date
Day
Hour
Minute
Second
Control
Watchdog
Interrupt
A Date
A Hour
A Minute
A Second
Century
Flags
Range
(in BCD format)
00-99
01-12
01-31
01-7
00-23
00-59
00-59
01-31
00-23
00-59
00-59
00-99
Clock registers
The clock registers can be configured in the C language computer program as follows:
*TIMEKEEPER_CAL |= 0x80
*TIMEKEEPER_SEC= 00 //user clock setting : seconds parameter
*TIMEKEEPER_MIN= 00 //user clock setting : minutes parameter
*TIMEKEEPER_HOUR= 00 //user clock setting : hours parameter
*TIMEKEEPER_CAL&= 0x7F
The process for starting the clock and making the calibration adjustments are described in
the M48T37V/Y datasheet, and in application notes AN925 and AN934.
Alarm registers
For TIMEKEEPER devices it is necessary to set the Write bit, W, at the top of the control
register (at address offset 7FF8h) before proceeding to any clock modification. Modifications
2/11
DocID007016 Rev 2