MMC2001
TIMER/RESET MODULE
MOTOROLA
REFERENCE MANUAL
9-5
9.4.1 TOD Operation
The TOD seconds register (TODSR) is readable and writable at any time. The TOD
fraction register (TODFR) is always cleared to zero when the TODSR is written.
Writes to the TODFR cause the fraction register to be set to all ones, regardless of
the data written. For read operations, always read the TODSR before the TODFR.
This latches the TODFR, which prevents any loss of carry information from the frac-
tion to the seconds registers.
The TOD value is matched every 1/256 second to the alarm register if the alarm func-
tion is enabled. When a match occurs, the alarm interrupt flag (AIF) is set, and when
the alarm interrupt enable bit (AIE) is set, an interrupt is issued to the CPU. A write to
the TOD fraction alarm register (TODFAR) clears the AIF. Writes to the TOD seconds
alarm register (TODSAR) do not affect the clearing of the AIF.
The alarm match function is temporarily disabled after a write to the TODSAR until
the TODFAR is written. This prevents an alarm match from occurring before the entire
40-bit alarm value is written.
The TOD fraction and seconds counters are undefined after a POR operation and are
unaffected by any other reset source. The TOD alarm is disabled by any reset source.
9.4.2 TOD in Low-Power Modes
The TOD is unaffected by the low-power modes. An alarm interrupt may be used to
exit from a low power state.
9.4.3 Time-of-Day Control/Status Register (TODCSR)
Figure 9-4 TOD Control/Status Register
Access this register with 32-bit loads and stores only.
AE — Alarm Enable
This bit controls the function of the TOD alarm
0 =
Alarm function is off to save power
1 =
Alarm function is on
AIE — Alarm Interrupt Enable
TODCSR — Time-of-Day Control/Status Register
10001004
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
R
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
W
RESET:
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
R
0
0
0
0
0
0
0
0
0
0
0
0
0
AE
AIE
AIF
W
RESET:
0
0
0
Freescale Semiconductor,
I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc.
..